[mapguide-commits] r9699 - in trunk/MgDev: . Oem Server/src/Wms UnitTest/WebTier/MapAgent/MapAgentForms Web/src Web/src/HttpHandler Web/src/viewerfiles cmake/modules

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Aug 4 05:00:13 PDT 2020


Author: jng
Date: 2020-08-04 05:00:10 -0700 (Tue, 04 Aug 2020)
New Revision: 9699

Added:
   trunk/MgDev/Oem/cpp-httplib/
   trunk/MgDev/Web/src/DevHttpServer/
   trunk/MgDev/Web/src/WebTestRunner/
   trunk/MgDev/Web/src/viewerfiles/ol.css
   trunk/MgDev/Web/src/viewerfiles/ol.css.map
   trunk/MgDev/Web/src/viewerfiles/ol.js
   trunk/MgDev/Web/src/viewerfiles/ol.js.map
   trunk/MgDev/cmake/modules/FindCppHttpLib.cmake
Removed:
   trunk/MgDev/License.html
Modified:
   trunk/MgDev/
   trunk/MgDev/License.txt
   trunk/MgDev/Server/src/Wms/1.0.0.xml.awd
   trunk/MgDev/Server/src/Wms/1.1.0.xml.awd
   trunk/MgDev/Server/src/Wms/1.1.1.xml.awd
   trunk/MgDev/Server/src/Wms/1.3.0.xml.awd
   trunk/MgDev/Server/src/Wms/OgcWmsService.config.awd
   trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getmapwmsform.html
   trunk/MgDev/Web/src/CMakeLists.txt
   trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp
   trunk/MgDev/Web/src/HttpHandler/HttpWmsGetMap.cpp
   trunk/MgDev/Web/src/HttpHandler/OgcFramework.h
   trunk/MgDev/Web/src/HttpHandler/OgcServer.cpp
   trunk/MgDev/Web/src/HttpHandler/OgcServer.h
   trunk/MgDev/Web/src/HttpHandler/OgcWmsServer.cpp
   trunk/MgDev/Web/src/HttpHandler/OgcWmsServer.h
   trunk/MgDev/Web/src/WebTier.sln
   trunk/MgDev/Web/src/viewerfiles/
   trunk/MgDev/cmake/modules/FindMapGuideThirdparty.cmake
Log:
Merged revision(s) 9678-9698 from sandbox/jng/ogc_viewer_representation: Implement MapGuide RFC 181


Index: trunk/MgDev
===================================================================
--- trunk/MgDev	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev	2020-08-04 12:00:10 UTC (rev 9699)

Property changes on: trunk/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
## -24,6 +24,7 ##
 /sandbox/jng/mvt:9527-9528,9535,9537,9546-9547
 /sandbox/jng/mvt_alt:9604-9629
 /sandbox/jng/ogc:9240-9255
+/sandbox/jng/ogc_viewer_representation:9678-9698
 /sandbox/jng/php56x:8975-8985
 /sandbox/jng/querymapfeatures_selectionkey:9590-9591
 /sandbox/jng/remove_gd:9548-9558
Deleted: trunk/MgDev/License.html
===================================================================
--- trunk/MgDev/License.html	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/License.html	2020-08-04 12:00:10 UTC (rev 9699)
@@ -1,3772 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 11">
-<meta name=Originator content="Microsoft Word 11">
-<link rel=File-List href="License_ild_files/filelist.xml">
-<title>Copyright and Licensing Information for MapGuide Open Source</title>
-<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
- name="PlaceName"/>
-<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
- name="PlaceType"/>
-<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
- name="City"/>
-<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
- name="place"/>
-<!--[if gte mso 9]><xml>
- <w:WordDocument>
-  <w:ValidateAgainstSchemas/>
-  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
-  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
-  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
-  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
- </w:WordDocument>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
- </w:LatentStyles>
-</xml><![endif]--><!--[if !mso]><object
- classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
-<style>
-st1\:*{behavior:url(#ieooui) }
-</style>
-<![endif]-->
-<style>
-<!--
- /* Style Definitions */
- p.MsoNormal, li.MsoNormal, div.MsoNormal
-	{mso-style-parent:"";
-	margin:0in;
-	margin-bottom:.0001pt;
-	mso-pagination:widow-orphan;
-	font-size:12.0pt;
-	font-family:"Times New Roman";
-	mso-fareast-font-family:"Times New Roman";}
- at page Section1
-	{size:8.5in 11.0in;
-	margin:1.0in 1.25in 1.0in 1.25in;
-	mso-header-margin:.5in;
-	mso-footer-margin:.5in;
-	mso-paper-source:0;}
-div.Section1
-	{page:Section1;}
--->
-</style>
-<!--[if gte mso 10]>
-<style>
- /* Style Definitions */
- table.MsoNormalTable
-	{mso-style-name:"Table Normal";
-	mso-tstyle-rowband-size:0;
-	mso-tstyle-colband-size:0;
-	mso-style-noshow:yes;
-	mso-style-parent:"";
-	mso-padding-alt:0in 5.4pt 0in 5.4pt;
-	mso-para-margin:0in;
-	mso-para-margin-bottom:.0001pt;
-	mso-pagination:widow-orphan;
-	font-size:10.0pt;
-	font-family:"Times New Roman";
-	mso-ansi-language:#0400;
-	mso-fareast-language:#0400;
-	mso-bidi-language:#0400;}
-</style>
-<![endif]-->
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p class=MsoNormal>Copyright and Licensing Information for MapGuide Open Source<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Copyright (C) 2004-2011 by Autodesk, Inc.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>MapGuide Open Source
-is free software; you can redistribute it<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>and/or modify it
-under the terms of version 2.1 of the GNU Lesser<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>General Public License
-(LGPL) as published by the Free Software<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>Foundation.<span
-style='mso-spacerun:yes'>� </span>It is distributed in the hope that it will be
-useful,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>but WITHOUT ANY
-WARRANTY; without even the implied warranty of<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>The full text of the
-LGPL can be found at the bottom of this file.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>"Autodesk
-MapGuide" is a registered trademark of Autodesk, Inc.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>and nothing herein
-shall grant any license or permission to use <o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>such trademark.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>***Third Party Credits***<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>MapGuide Open Source also contains third party software that
-is<o:p></o:p></p>
-
-<p class=MsoNormal>licensed by the copyright holder on terms specific to that
-software.<o:p></o:p></p>
-
-<p class=MsoNormal>You are responsible for complying with the terms of these
-licenses.<o:p></o:p></p>
-
-<p class=MsoNormal>For ease of reference, this file contains information on all
-of these<o:p></o:p></p>
-
-<p class=MsoNormal>third party licenses.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Simplified Wrapper and Interface Generator<span
-style='mso-spacerun:yes'>� </span>(SWIG)<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>SWIG is distributed
-under the following terms:<o:p></o:p></p>
-
-<p class=MsoNormal><span
-style='mso-spacerun:yes'>�</span>=================================================<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>I. <o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>This software
-includes contributions that are Copyright (c) 1998-2002<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><st1:place w:st="on"><st1:PlaceType
- w:st="on">University</st1:PlaceType> of <st1:PlaceName w:st="on">Chicago</st1:PlaceName></st1:place>.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>All rights reserved.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>Redistribution and
-use in source and binary forms, with or without<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>modification, are
-permitted provided that the following conditions are<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>met:<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>Redistributions of
-source code must retain the above copyright notice,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>this list of
-conditions and the following disclaimer.<span style='mso-spacerun:yes'>�
-</span>Redistributions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>in binary form must
-reproduce the above copyright notice, this list of<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>conditions and the
-following disclaimer in the documentation and/or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>other materials
-provided with the distribution.<span style='mso-spacerun:yes'>� </span>Neither
-the name of<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>the <st1:place w:st="on"><st1:PlaceType
- w:st="on">University</st1:PlaceType> of <st1:PlaceName w:st="on">Chicago</st1:PlaceName></st1:place>
-nor the names of its contributors may be<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>used to endorse or
-promote products derived from this software without<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>specific prior
-written permission.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>THIS SOFTWARE IS
-PROVIDED BY THE <st1:place w:st="on"><st1:PlaceType w:st="on">UNIVERSITY</st1:PlaceType>
- OF <st1:PlaceName w:st="on">CHICAGO</st1:PlaceName></st1:place> AND
-CONTRIBUTORS<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>"AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>CHICAGO OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>SPECIAL, EXEMPLARY,
-OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>II.<span
-style='mso-spacerun:yes'>� </span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>Copyright (c)
-1995-1998<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>The <st1:PlaceType
-w:st="on">University</st1:PlaceType> of <st1:PlaceName w:st="on">Utah</st1:PlaceName>
-and the Regents of the <st1:place w:st="on"><st1:PlaceType w:st="on">University</st1:PlaceType>
- of <st1:PlaceName w:st="on">California</st1:PlaceName></st1:place><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>All Rights Reserved<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>Permission is hereby
-granted, without written agreement and without<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>license or royalty
-fees, to use, copy, modify, and distribute this<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>software and its
-documentation for any purpose, provided that <o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>(1) The above
-copyright notice and the following two paragraphs<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>appear in all copies
-of the source code and (2) redistributions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>including binaries
-reproduces these notices in the supporting<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>documentation.<span
-style='mso-spacerun:yes'>�� </span>Substantial modifications to this software
-may be<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>copyrighted by their
-authors and need not follow the licensing terms<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>described here,
-provided that the new terms are clearly indicated in<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>all files where they
-apply.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>IN NO EVENT SHALL THE
-AUTHOR, THE <st1:place w:st="on"><st1:PlaceType w:st="on">UNIVERSITY</st1:PlaceType>
- OF <st1:PlaceName w:st="on">CALIFORNIA</st1:PlaceName></st1:place>, THE <o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><st1:place w:st="on"><st1:PlaceType
- w:st="on">UNIVERSITY</st1:PlaceType> OF <st1:PlaceName w:st="on">UTAH</st1:PlaceName></st1:place>
-OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>PARTY FOR DIRECT,
-INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>DAMAGES ARISING OUT
-OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>EVEN IF THE AUTHORS
-OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>THE POSSIBILITY OF
-SUCH DAMAGE.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>THE AUTHOR, THE <st1:PlaceType
-w:st="on">UNIVERSITY</st1:PlaceType> OF <st1:PlaceName w:st="on">CALIFORNIA</st1:PlaceName>,
-AND THE <st1:place w:st="on"><st1:PlaceType w:st="on">UNIVERSITY</st1:PlaceType>
- OF <st1:PlaceName w:st="on">UTAH</st1:PlaceName></st1:place><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>SPECIFICALLY DISCLAIM
-ANY WARRANTIES,INCLUDING, BUT NOT LIMITED TO, <o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>PURPOSE. THE SOFTWARE
-PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND <o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>THE AUTHORS AND
-DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>SUPPORT, UPDATES,
-ENHANCEMENTS, OR MODIFICATIONS.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Copyright and Licensing Information for ACE(TM)<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>ACE(TM), TAO(TM), CIAO(TM), and CoSMIC(TM) (henceforth
-referred to as "DOC <o:p></o:p></p>
-
-<p class=MsoNormal>software") are copyrighted by Douglas C. Schmidt and
-his research group at <o:p></o:p></p>
-
-<p class=MsoNormal><st1:PlaceName w:st="on">Washington</st1:PlaceName> <st1:PlaceType
-w:st="on">University</st1:PlaceType>, <st1:PlaceType w:st="on">University</st1:PlaceType>
-of <st1:PlaceName w:st="on">California</st1:PlaceName>, <st1:City w:st="on"><st1:place
- w:st="on">Irvine</st1:place></st1:City>, and Vanderbilt <o:p></o:p></p>
-
-<p class=MsoNormal>University, Copyright (c) 1993-2005, all rights reserved.
-Since DOC software is <o:p></o:p></p>
-
-<p class=MsoNormal>open-source, freely available software, you are free to use,
-modify, copy, and <o:p></o:p></p>
-
-<p class=MsoNormal>distribute--perpetually and irrevocably--the DOC software
-source code and object <o:p></o:p></p>
-
-<p class=MsoNormal>code produced from the source, as well as copy and
-distribute modified versions <o:p></o:p></p>
-
-<p class=MsoNormal>of this software. You must, however, include this copyright
-statement along with <o:p></o:p></p>
-
-<p class=MsoNormal>code built using DOC software. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>You can use DOC software in commercial and/or binary
-software releases and are <o:p></o:p></p>
-
-<p class=MsoNormal>under no obligation to redistribute any of your source code
-that is built using <o:p></o:p></p>
-
-<p class=MsoNormal>DOC software. Note, however, that you may not do anything to
-the DOC software <o:p></o:p></p>
-
-<p class=MsoNormal>code, such as copyrighting it yourself or claiming
-authorship of the DOC <o:p></o:p></p>
-
-<p class=MsoNormal>software code, that will prevent DOC software from being
-distributed freely <o:p></o:p></p>
-
-<p class=MsoNormal>using an open-source development model. You needn't inform
-anyone that you're <o:p></o:p></p>
-
-<p class=MsoNormal>using DOC software in your software, though we encourage you
-to let us know so <o:p></o:p></p>
-
-<p class=MsoNormal>we can promote your project in the DOC software success
-stories. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><st1:City w:st="on"><st1:place w:st="on">Berkeley</st1:place></st1:City>
-DB<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal>/*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Copyright (c)
-1990-2004<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-tab-count:1'>�������� </span>Sleepycat Software.<span
-style='mso-spacerun:yes'>� </span>All rights reserved.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Redistribution and
-use in source and binary forms, with or without<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* modification, are
-permitted provided that the following conditions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* are met:<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 1. Redistributions
-of source code must retain the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 2. Redistributions
-in binary form must reproduce the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer in the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>documentation and/or other materials
-provided with the distribution.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 3. Redistributions
-in any form must be accompanied by information on<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>how to obtain complete source code for the
-DB software and any<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>accompanying software that uses the DB
-software.<span style='mso-spacerun:yes'>� </span>The source code<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>must either be included in the distribution
-or be available for no<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>�� </span><span style='mso-spacerun:yes'>�</span>more
-than the cost of distribution plus a nominal fee, and must be<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>freely redistributable under reasonable
-conditions.<span style='mso-spacerun:yes'>� </span>For an<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>executable file, complete source code means
-the source code for all<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>modules it contains.<span
-style='mso-spacerun:yes'>� </span>It does not include source code for modules
-or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>files that typically accompany the major
-components of the operating<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>system on which the executable file runs.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* THIS SOFTWARE IS
-PROVIDED BY SLEEPYCAT SOFTWARE ``AS IS'' AND ANY EXPRESS<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* NON-INFRINGEMENT,
-ARE DISCLAIMED.<span style='mso-spacerun:yes'>� </span>IN NO EVENT SHALL
-SLEEPYCAT SOFTWARE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* THE POSSIBILITY OF
-SUCH DAMAGE.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*/<o:p></o:p></p>
-
-<p class=MsoNormal>/*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Copyright (c) 1990,
-1993, 1994, 1995<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-tab-count:1'>�������� </span>The Regents of the <st1:place w:st="on"><st1:PlaceType
- w:st="on">University</st1:PlaceType> of <st1:PlaceName w:st="on">California</st1:PlaceName></st1:place>.<span
-style='mso-spacerun:yes'>� </span>All rights reserved.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Redistribution and
-use in source and binary forms, with or without<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* modification, are
-permitted provided that the following conditions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* are met:<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 1. Redistributions
-of source code must retain the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 2. Redistributions
-in binary form must reproduce the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer in the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>� </span><span
-style='mso-spacerun:yes'>��</span>documentation and/or other materials provided
-with the distribution.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 3. Neither the name
-of the University nor the names of its contributors<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>may be used to endorse or promote products
-derived from this software<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>without specific prior written permission.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* THIS SOFTWARE IS
-PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* ARE DISCLAIMED.<span
-style='mso-spacerun:yes'>� </span>IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
-BE LIABLE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* OR SERVICES; LOSS
-OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* SUCH DAMAGE.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*/<o:p></o:p></p>
-
-<p class=MsoNormal>/*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Copyright (c) 1995,
-1996<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-tab-count:1'>�������� </span>The President and Fellows of <st1:place
-w:st="on"><st1:PlaceName w:st="on">Harvard</st1:PlaceName> <st1:PlaceType
- w:st="on">University</st1:PlaceType></st1:place>.<span
-style='mso-spacerun:yes'>� </span>All rights reserved.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Redistribution and
-use in source and binary forms, with or without<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* modification, are
-permitted provided that the following conditions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* are met:<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 1. Redistributions
-of source code must retain the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 2. Redistributions
-in binary form must reproduce the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer in the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>documentation and/or other materials
-provided with the distribution.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 3. Neither the name
-of the University nor the names of its contributors<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>may be used to endorse or promote products
-derived from this software<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>without specific prior written permission.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* THIS SOFTWARE IS
-PROVIDED BY HARVARD AND ITS CONTRIBUTORS ``AS IS'' AND<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* ARE
-DISCLAIMED.<span style='mso-spacerun:yes'>� </span>IN NO EVENT SHALL HARVARD OR
-ITS CONTRIBUTORS BE LIABLE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* OR SERVICES; LOSS
-OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* SUCH DAMAGE.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*/<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><st1:City w:st="on"><st1:place w:st="on">Berkeley</st1:place></st1:City>
-DB XML<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>/*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Copyright (c)
-2001-2005<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>Sleepycat Software.<span
-style='mso-spacerun:yes'>� </span>All rights reserved.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Redistribution and
-use in source and binary forms, with or without<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* modification, are
-permitted provided that the following conditions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* are met:<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 1. Redistributions
-of source code must retain the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 2. Redistributions
-in binary form must reproduce the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer in the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>documentation and/or other materials
-provided with the distribution.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 3. Redistributions
-in any form must be accompanied by information on<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>how to obtain complete source code for the
-DB software and any<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>accompanying software that uses the DB
-software.<span style='mso-spacerun:yes'>� </span>The source code<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>must either be included in the distribution
-or be available for no<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>more than the cost of distribution plus a
-nominal fee, and must be<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>freely redistributable under reasonable
-conditions.<span style='mso-spacerun:yes'>� </span>For an<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>executable file, complete source code means
-the source code for all<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>modules it contains.<span
-style='mso-spacerun:yes'>� </span>It does not include source code for modules
-or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>files that typically accompany the major
-components of the operating<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>system on which the executable file runs.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* THIS SOFTWARE IS
-PROVIDED BY SLEEPYCAT SOFTWARE ``AS IS'' AND ANY EXPRESS<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* NON-INFRINGEMENT,
-ARE DISCLAIMED.<span style='mso-spacerun:yes'>� </span>IN NO EVENT SHALL
-SLEEPYCAT SOFTWARE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* THE POSSIBILITY OF
-SUCH DAMAGE.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*/<o:p></o:p></p>
-
-<p class=MsoNormal>/*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* The Apache Software
-License, Version 1.1<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Copyright (c) 2000
-The Apache Software Foundation.<span style='mso-spacerun:yes'>� </span>All
-rights<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* reserved.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Redistribution and
-use in source and binary forms, with or without<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* modification, are
-permitted provided that the following conditions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* are met:<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 1. Redistributions
-of source code must retain the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 2. Redistributions
-in binary form must reproduce the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer in<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>the documentation and/or other materials
-provided with the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>distribution.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 3. The end-user
-documentation included with the redistribution,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>if any, must include the following
-acknowledgment:<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>������ </span>"This product includes software
-developed by the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>������� </span>Apache Software Foundation
-(http://www.apache.org/)."<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>Alternately, this acknowledgment may appear
-in the software itself,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>if and wherever such third-party
-acknowledgments normally appear.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 4. The names
-"Apache" and "Apache Software Foundation" must<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>not be used to endorse or promote products
-derived from this<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>software without prior written permission.
-For written<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>permission, please contact
-apache at apache.org.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 5. Products derived
-from this software may not be called "Apache",<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>nor may "Apache" appear in their
-name, without prior written<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>permission of the Apache Software
-Foundation.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* THIS SOFTWARE IS
-PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE ARE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* DISCLAIMED.<span
-style='mso-spacerun:yes'>� </span>IN NO EVENT SHALL THE APACHE SOFTWARE
-FOUNDATION OR<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* ITS CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* SPECIAL, EXEMPLARY,
-OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* SUCH DAMAGE.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*
-====================================================================<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* This software
-consists of voluntary contributions made by many<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* individuals on
-behalf of the Apache Software Foundation.<span style='mso-spacerun:yes'>�
-</span>For more<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* information on the
-Apache Software Foundation, please see<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* .<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Portions of this
-software are based upon public domain software<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* originally written
-at the <st1:place w:st="on"><st1:PlaceName w:st="on">National</st1:PlaceName> <st1:PlaceType
- w:st="on">Center</st1:PlaceType></st1:place> for Supercomputing Applications,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* <st1:place w:st="on"><st1:PlaceType
- w:st="on">University</st1:PlaceType> of <st1:PlaceName w:st="on">Illinois</st1:PlaceName></st1:place>,
-Urbana-Champaign.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*/<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Xerxes, Xalan & Apache Tomcat<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span
-style='mso-spacerun:yes'>�������������������������������� </span>Apache License<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�������������������������
-</span><span style='mso-spacerun:yes'>�</span>Version 2.0, January 2004<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�����������������������
-</span>http://www.apache.org/licenses/<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>TERMS AND
-CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>1. Definitions.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�����
-</span>"License" shall mean the terms and conditions for use,
-reproduction,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>and distribution
-as defined by Sections 1 through 9 of this document.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�����
-</span>"Licensor" shall mean the copyright owner or entity authorized
-by<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>the copyright
-owner that is granting the License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>"Legal
-Entity" shall mean the union of the acting entity and all<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>other entities
-that control, are controlled by, or are under common<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>control with
-that entity. For the purposes of this definition,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�����
-</span>"control" means (i) the power, direct or indirect, to cause
-the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>direction or
-management of such entity, whether by contract or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>otherwise, or
-(ii) ownership of fifty percent (50%) or more of the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>outstanding
-shares, or (iii) beneficial ownership of such entity.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>"You"
-(or "Your") shall mean an individual or Legal Entity<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>exercising
-permissions granted by this License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�����
-</span>"Source" form shall mean the preferred form for making
-modifications,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>including but
-not limited to software source code, documentation<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span><span
-style='mso-spacerun:yes'>����</span>source, and configuration files.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�����
-</span>"Object" form shall mean any form resulting from mechanical<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>transformation
-or translation of a Source form, including but<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>not limited to
-compiled object code, generated documentation,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>and conversions
-to other media types.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>"Work"
-shall mean the work of authorship, whether in Source or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>Object form,
-made available under the License, as indicated by a<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>copyright notice
-that is included in or attached to the work<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>(an example is
-provided in the Appendix below).<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>"Derivative
-Works" shall mean any work, whether in Source or Object<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>form, that is
-based on (or derived from) the Work and for which the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>editorial
-revisions, annotations, elaborations, or other modifications<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>represent, as a
-whole, an original work of authorship. For the purposes<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>of this License,
-Derivative Works shall not include works that remain<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>separable from,
-or merely link (or bind by name) to the interfaces of,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>the Work and
-Derivative Works thereof.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�����
-</span>"Contribution" shall mean any work of authorship, including<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>the original
-version of the Work and any modifications or additions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>to that Work or
-Derivative Works thereof, that is intentionally<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>submitted to
-Licensor for inclusion in the Work by the copyright owner<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>or by an
-individual or Legal Entity authorized to submit on behalf of<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>the copyright
-owner. For the purposes of this definition, "submitted"<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>means any form
-of electronic, verbal, or written communication sent<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>to the Licensor
-or its representatives, including but not limited to<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>communication on
-electronic mailing lists, source code control systems,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>and issue
-tracking systems that are managed by, or on behalf of, the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>Licensor for the
-purpose of discussing and improving the Work, but<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>excluding
-communication that is conspicuously marked or otherwise<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>designated in
-writing by the copyright owner as "Not a Contribution."<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>"Contributor"
-shall mean Licensor and any individual or Legal Entity<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>on behalf of
-whom a Contribution has been received by Licensor and<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>subsequently
-incorporated within the Work.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>2. Grant of
-Copyright License. Subject to the terms and conditions of<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>this License,
-each Contributor hereby grants to You a perpetual,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>worldwide,
-non-exclusive, no-charge, royalty-free, irrevocable<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>copyright
-license to reproduce, prepare Derivative Works of,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>publicly
-display, publicly perform, sublicense, and distribute the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>Work and such
-Derivative Works in Source or Object form.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>3. Grant of Patent
-License. Subject to the terms and conditions of<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>this License,
-each Contributor hereby grants to You a perpetual,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>worldwide,
-non-exclusive, no-charge, royalty-free, irrevocable<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>(except as
-stated in this section) patent license to make, have made,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>use, offer to
-sell, sell, import, and otherwise transfer the Work,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>where such
-license applies only to those patent claims licensable<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>by such
-Contributor that are necessarily infringed by their<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>Contribution(s)
-alone or by combination of their Contribution(s)<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>with the Work to
-which such Contribution(s) was submitted. If You<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>institute patent
-litigation against any entity (including a<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>cross-claim or
-counterclaim in a lawsuit) alleging that the Work<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>or a
-Contribution incorporated within the Work constitutes direct<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>or contributory
-patent infringement, then any patent licenses<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>granted to You
-under this License for that Work shall terminate<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>as of the date
-such litigation is filed.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>4. Redistribution.
-You may reproduce and distribute copies of the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>Work or
-Derivative Works thereof in any medium, with or without<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>modifications,
-and in Source or Object form, provided that You<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>meet the
-following conditions:<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>(a) You must
-give any other recipients of the Work or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>Derivative
-Works a copy of this License; and<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>(b) You must
-cause any modified files to carry prominent notices<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>stating that
-You changed the files; and<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>(c) You must
-retain, in the Source form of any Derivative Works<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>that You
-distribute, all copyright, patent, trademark, and<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>attribution
-notices from the Source form of the Work,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>excluding
-those notices that do not pertain to any part of<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>the
-Derivative Works; and<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>(d) If the Work
-includes a "NOTICE" text file as part of its<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>distribution,
-then any Derivative Works that You distribute must<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>include a
-readable copy of the attribution notices contained<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>within such
-NOTICE file, excluding those notices that do not<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>pertain to
-any part of the Derivative Works, in at least one<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>of the
-following places: within a NOTICE text file distributed<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>as part of
-the Derivative Works; within the Source form or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���������
-</span>documentation, if provided along with the Derivative Works; or,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>within a
-display generated by the Derivative Works, if and<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>wherever
-such third-party notices normally appear. The contents<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>of the
-NOTICE file are for informational purposes only and<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>do not
-modify the License. You may add Your own attribution<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><span
-style='mso-spacerun:yes'>�������� </span>notices within Derivative Works that
-You distribute, alongside<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>or as an
-addendum to the NOTICE text from the Work, provided<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>that such
-additional attribution notices cannot be construed<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��������� </span>as modifying
-the License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span><span
-style='mso-spacerun:yes'>�</span>You may add Your own copyright statement to
-Your modifications and<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>may provide
-additional or different license terms and conditions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>for use,
-reproduction, or distribution of Your modifications, or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>for any such
-Derivative Works as a whole, provided Your use,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>reproduction,
-and distribution of the Work otherwise complies with<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>the conditions
-stated in this License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>5. Submission of
-Contributions. Unless You explicitly state otherwise,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>any Contribution
-intentionally submitted for inclusion in the Work<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>by You to the
-Licensor shall be under the terms and conditions of<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>this License,
-without any additional terms or conditions.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>Notwithstanding
-the above, nothing herein shall supersede or modify<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>the terms of any
-separate license agreement you may have executed<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>with Licensor
-regarding such Contributions.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>6. Trademarks. This
-License does not grant permission to use the trade<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>names,
-trademarks, service marks, or product names of the Licensor,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>except as
-required for reasonable and customary use in describing the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>origin of the
-Work and reproducing the content of the NOTICE file.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>7. Disclaimer of
-Warranty. Unless required by applicable law or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>agreed to in
-writing, Licensor provides the Work (and each<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>Contributor
-provides its Contributions) on an "AS IS" BASIS,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>implied,
-including, without limitation, any warranties or conditions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>of TITLE,
-NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>PARTICULAR
-PURPOSE. You are solely responsible for determining the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>appropriateness
-of using or redistributing the Work and assume any<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>risks associated
-with Your exercise of permissions under this License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>8. Limitation of
-Liability. In no event and under no legal theory,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>whether in tort
-(including negligence), contract, or otherwise,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>unless required
-by applicable law (such as deliberate and grossly<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>negligent acts)
-or agreed to in writing, shall any Contributor be<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>liable to You
-for damages, including any direct, indirect, special,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>incidental, or
-consequential damages of any character arising as a<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>result of this
-License or out of the use or inability to use the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>Work (including
-but not limited to damages for loss of goodwill,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>work stoppage,
-computer failure or malfunction, or any and all<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>other commercial
-damages or losses), even if such Contributor<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>has been advised
-of the possibility of such damages.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>9. Accepting
-Warranty or Additional Liability. While redistributing<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>the Work or
-Derivative Works thereof, You may choose to offer,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>and charge a fee
-for, acceptance of support, warranty, indemnity,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>or other
-liability obligations and/or rights consistent with this<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>License.
-However, in accepting such obligations, You may act only<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>on Your own
-behalf and on Your sole responsibility, not on behalf<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><span
-style='mso-spacerun:yes'>���� </span>of any other Contributor, and only if You
-agree to indemnify,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>defend, and hold
-each Contributor harmless for any liability<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>incurred by, or
-claims asserted against, such Contributor by reason<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����� </span>of your
-accepting any such warranty or additional liability.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>END OF TERMS AND
-CONDITIONS<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Pathan<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal>The DecisionSoft Open Source Licence<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>This licence is based on the BSD Licence template.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Copyright (c) 2001, DecisionSoft Limited<o:p></o:p></p>
-
-<p class=MsoNormal>All rights reserved.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Redistribution and use in source and binary forms, with or
-without<o:p></o:p></p>
-
-<p class=MsoNormal>modification, are permitted provided that the following
-conditions are<o:p></o:p></p>
-
-<p class=MsoNormal>met:<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>* Redistributions of source code must retain the above
-copyright<o:p></o:p></p>
-
-<p class=MsoNormal>notice, this list of conditions and the following
-disclaimer.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>* Redistributions in binary form must reproduce the above
-copyright<o:p></o:p></p>
-
-<p class=MsoNormal>notice, this list of conditions and the following disclaimer
-in the<o:p></o:p></p>
-
-<p class=MsoNormal>documentation and/or other materials provided with the distribution.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>* Neither the name of DecisionSoft Limited nor the names of
-its<o:p></o:p></p>
-
-<p class=MsoNormal>contributors may be used to endorse or promote products
-derived from<o:p></o:p></p>
-
-<p class=MsoNormal>this software without specific prior written permission.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS<o:p></o:p></p>
-
-<p class=MsoNormal>"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT<o:p></o:p></p>
-
-<p class=MsoNormal>LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR<o:p></o:p></p>
-
-<p class=MsoNormal>A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT<o:p></o:p></p>
-
-<p class=MsoNormal>HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,<o:p></o:p></p>
-
-<p class=MsoNormal>INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING,<o:p></o:p></p>
-
-<p class=MsoNormal>BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS<o:p></o:p></p>
-
-<p class=MsoNormal>OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND<o:p></o:p></p>
-
-<p class=MsoNormal>ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR<o:p></o:p></p>
-
-<p class=MsoNormal>TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE<o:p></o:p></p>
-
-<p class=MsoNormal>USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH<o:p></o:p></p>
-
-<p class=MsoNormal>DAMAGE<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Berkeley DB XML XQuery<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>/*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Copyright (c)
-2001-2005<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-tab-count:1'>�������� </span>Sleepycat Software.<span
-style='mso-spacerun:yes'>� </span>All rights reserved.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Redistribution and
-use in source and binary forms, with or without<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* modification, are
-permitted provided that the following conditions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* are met:<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 1. Redistributions
-of source code must retain the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 2. Redistributions
-in binary form must reproduce the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer in the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>documentation and/or other materials
-provided with the distribution.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 3. Redistributions
-in any form must be accompanied by information on<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>how to obtain complete source code for the
-DB software and any<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>accompanying software that uses the DB
-software.<span style='mso-spacerun:yes'>� </span>The source code<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>must either be included in the distribution
-or be available for no<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>more than the cost of distribution plus a
-nominal fee, and must be<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>freely redistributable under reasonable
-conditions.<span style='mso-spacerun:yes'>� </span>For an<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>executable file, complete source code means
-the source code for all<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>modules it contains.<span
-style='mso-spacerun:yes'>� </span>It does not include source code for modules
-or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>files that typically accompany the major
-components of the operating<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>system on which the executable file runs.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* THIS SOFTWARE IS
-PROVIDED BY SLEEPYCAT SOFTWARE ``AS IS'' AND ANY EXPRESS<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* NON-INFRINGEMENT,
-ARE DISCLAIMED.<span style='mso-spacerun:yes'>� </span>IN NO EVENT SHALL
-SLEEPYCAT SOFTWARE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* THE POSSIBILITY OF
-SUCH DAMAGE.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*/<o:p></o:p></p>
-
-<p class=MsoNormal>/*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Copyright (c) 2005<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-tab-count:1'>�������� </span>Progress Software Corporation.<span
-style='mso-spacerun:yes'>� </span>All rights reserved.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* Redistribution and
-use in source and binary forms, with or without<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* modification, are
-permitted provided that the following conditions<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* are met:<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 1. Redistributions
-of source code must retain the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* notice, this list
-of conditions and the following disclaimer.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 2. Redistributions
-in binary form must reproduce the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>notice, this list of conditions and the
-following disclaimer in the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>documentation and/or other materials
-provided with the distribution.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* 3. The end-user
-documentation included with the redistribution, if any,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>must include the following acknowledgment:
-"This product includes<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>software developed by Progress Software
-Corporation." Alternately,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>this acknowledgment may appear in the
-software itself, if and wherever<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<span
-style='mso-spacerun:yes'>��� </span>such third-party acknowledgments normally
-appear.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* THIS SOFTWARE IS
-PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.<span
-style='mso-spacerun:yes'>� </span>IN<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* NO EVENT SHALL
-PROGRESS SOFTWARE CORPORATION BE LIABLE FOR ANY DIRECT,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* IN ANY WAY OUT OF
-THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>* POSSIBILITY OF SUCH
-DAMAGE.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>*/<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Proj.4 and GDAL<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Copyright (c) 2000, Frank Warmerdam<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>Permission is hereby
-granted, free of charge, to any person obtaining a<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>copy of this software
-and associated documentation files (the "Software"),<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>to deal in the
-Software without restriction, including without limitation<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>the rights to use,
-copy, modify, merge, publish, distribute, sublicense,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>and/or sell copies of
-the Software, and to permit persons to whom the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>Software is furnished
-to do so, subject to the following conditions:<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>The above copyright
-notice and this permission notice shall be included<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>in all copies or
-substantial portions of the Software.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>THE SOFTWARE IS
-PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>OR IMPLIED, INCLUDING
-BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>DEALINGS IN THE
-SOFTWARE.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>GD Graphics Library<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002,<o:p></o:p></p>
-
-<p class=MsoNormal>2003, 2004 by Cold Spring Harbor Laboratory. Funded under
-Grant P41-RR02188<o:p></o:p></p>
-
-<p class=MsoNormal>by the National Institutes of Health. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-2003, 2004<o:p></o:p></p>
-
-<p class=MsoNormal>by Boutell.Com, Inc. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Portions relating to GD2 format copyright 1999, 2000, 2001,
-2002, 2003,<o:p></o:p></p>
-
-<p class=MsoNormal>2004 Philip Warner. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Portions relating to PNG copyright 1999, 2000, 2001, 2002,
-2003, 2004<o:p></o:p></p>
-
-<p class=MsoNormal>Greg Roelofs. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Portions relating to gdttf.c copyright 1999, 2000, 2001,
-2002, 2003,<o:p></o:p></p>
-
-<p class=MsoNormal>2004 John Ellson (ellson at graphviz.org). <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Portions relating to gdft.c copyright 2001, 2002, 2003, 2004
-John Ellson<o:p></o:p></p>
-
-<p class=MsoNormal>(ellson at graphviz.org). <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Portions relating to JPEG and to color quantization
-copyright 2000, 2001,<o:p></o:p></p>
-
-<p class=MsoNormal>2002, 2003, 2004, Doug Becker and copyright (C) 1994, 1995,
-1996, 1997,<o:p></o:p></p>
-
-<p class=MsoNormal>1998, 1999, 2000, 2001, 2002, 2003, 2004 Thomas G. Lane.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>This software is based in part on the work of the Independent
-JPEG Group.<o:p></o:p></p>
-
-<p class=MsoNormal>See the file README-JPEG.TXT in the GD Source Code for more
-information. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Portions relating to GIF compression copyright 1989 by Jef
-Poskanzer and<o:p></o:p></p>
-
-<p class=MsoNormal>David Rowley, with modifications for thread safety by Thomas
-Boutell. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Portions relating to GIF decompression copyright 1990, 1991,
-1993 by<o:p></o:p></p>
-
-<p class=MsoNormal>David Koblas, with modifications for thread safety by Thomas
-Boutell. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Portions relating to WBMP copyright 2000, 2001, 2002, 2003,
-2004<o:p></o:p></p>
-
-<p class=MsoNormal>Maurice Szmurlo and Johan Van den Brande. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Portions relating to GIF animations copyright 2004 Jaakko
-Hyv�tti<o:p></o:p></p>
-
-<p class=MsoNormal>(jaakko.hyvatti at iki.fi) <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Permission has been granted to copy, distribute and modify
-gd in any context<o:p></o:p></p>
-
-<p class=MsoNormal>without fee, including a commercial application, provided
-that this notice<o:p></o:p></p>
-
-<p class=MsoNormal>is present in user-accessible supporting documentation. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>This does not affect your ownership of the derived work
-itself, and the<o:p></o:p></p>
-
-<p class=MsoNormal>intent is to assure proper credit for the authors of gd, not
-to interfere<o:p></o:p></p>
-
-<p class=MsoNormal>with your productive use of gd. If you have questions, ask.
-"Derived works"<o:p></o:p></p>
-
-<p class=MsoNormal>includes all programs that utilize the library. Credit must
-be given in<o:p></o:p></p>
-
-<p class=MsoNormal>user-accessible documentation. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>This software is provided "AS IS." The copyright
-holders disclaim all warranties,<o:p></o:p></p>
-
-<p class=MsoNormal>either express or implied, including but not limited to
-implied warranties<o:p></o:p></p>
-
-<p class=MsoNormal>of merchantability and fitness for a particular purpose,
-with respect to this <o:p></o:p></p>
-
-<p class=MsoNormal>code and accompanying documentation. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Although their code does not appear in the current release,
-the authors also<o:p></o:p></p>
-
-<p class=MsoNormal>wish to thank Hutchison Avenue Software Corporation for
-their prior contributions. <o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>FastCGI<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>This FastCGI application library source and object code (the<o:p></o:p></p>
-
-<p class=MsoNormal>"Software") and its documentation (the
-"Documentation") are<o:p></o:p></p>
-
-<p class=MsoNormal>copyrighted by Open Market, Inc ("Open
-Market").<span style='mso-spacerun:yes'>� </span>The following terms<o:p></o:p></p>
-
-<p class=MsoNormal>apply to all files associated with the Software and
-Documentation<o:p></o:p></p>
-
-<p class=MsoNormal>unless explicitly disclaimed in individual files.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Open Market permits you to use, copy, modify, distribute,
-and license<o:p></o:p></p>
-
-<p class=MsoNormal>this Software and the Documentation solely for the purpose
-of<o:p></o:p></p>
-
-<p class=MsoNormal>implementing the FastCGI specification defined by Open
-Market or<o:p></o:p></p>
-
-<p class=MsoNormal>derivative specifications publicly endorsed by Open Market
-and<o:p></o:p></p>
-
-<p class=MsoNormal>promulgated by an open standards organization and for no
-other<o:p></o:p></p>
-
-<p class=MsoNormal>purpose, provided that existing copyright notices are
-retained in all<o:p></o:p></p>
-
-<p class=MsoNormal>copies and that this notice is included verbatim in any
-distributions.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>No written agreement, license, or royalty fee is required
-for any of<o:p></o:p></p>
-
-<p class=MsoNormal>the authorized uses.<span style='mso-spacerun:yes'>�
-</span>Modifications to this Software and Documentation<o:p></o:p></p>
-
-<p class=MsoNormal>may be copyrighted by their authors and need not follow the
-licensing<o:p></o:p></p>
-
-<p class=MsoNormal>terms described here, but the modified Software and
-Documentation must<o:p></o:p></p>
-
-<p class=MsoNormal>be used for the sole purpose of implementing the FastCGI
-specification<o:p></o:p></p>
-
-<p class=MsoNormal>defined by Open Market or derivative specifications publicly
-endorsed<o:p></o:p></p>
-
-<p class=MsoNormal>by Open Market and promulgated by an open standards
-organization and<o:p></o:p></p>
-
-<p class=MsoNormal>for no other purpose.<span style='mso-spacerun:yes'>�
-</span>If modifications to this Software and<o:p></o:p></p>
-
-<p class=MsoNormal>Documentation have new licensing terms, the new terms must
-protect Open<o:p></o:p></p>
-
-<p class=MsoNormal>Market's proprietary rights in the Software and
-Documentation to the<o:p></o:p></p>
-
-<p class=MsoNormal>same extent as these licensing terms and must be clearly
-indicated on<o:p></o:p></p>
-
-<p class=MsoNormal>the first page of each file where they apply.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Open Market shall retain all right, title and interest in
-and to the<o:p></o:p></p>
-
-<p class=MsoNormal>Software and Documentation, including without limitation all
-patent,<o:p></o:p></p>
-
-<p class=MsoNormal>copyright, trade secret and other proprietary rights.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>OPEN MARKET MAKES NO EXPRESS OR IMPLIED WARRANTY WITH
-RESPECT TO THE<o:p></o:p></p>
-
-<p class=MsoNormal>SOFTWARE OR THE DOCUMENTATION, INCLUDING WITHOUT LIMITATION
-ANY<o:p></o:p></p>
-
-<p class=MsoNormal>WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
-PURPOSE.<span style='mso-spacerun:yes'>� </span>IN<o:p></o:p></p>
-
-<p class=MsoNormal>NO EVENT SHALL OPEN MARKET BE LIABLE TO YOU OR ANY THIRD
-PARTY FOR ANY<o:p></o:p></p>
-
-<p class=MsoNormal>DAMAGES ARISING FROM OR RELATING TO THIS SOFTWARE OR THE<o:p></o:p></p>
-
-<p class=MsoNormal>DOCUMENTATION, INCLUDING, WITHOUT LIMITATION, ANY INDIRECT,
-SPECIAL OR<o:p></o:p></p>
-
-<p class=MsoNormal>CONSEQUENTIAL DAMAGES OR SIMILAR DAMAGES, INCLUDING LOST
-PROFITS OR<o:p></o:p></p>
-
-<p class=MsoNormal>LOST DATA, EVEN IF OPEN MARKET HAS BEEN ADVISED OF THE
-POSSIBILITY OF<o:p></o:p></p>
-
-<p class=MsoNormal>SUCH DAMAGES.<span style='mso-spacerun:yes'>� </span>THE
-SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS".<o:p></o:p></p>
-
-<p class=MsoNormal>OPEN MARKET HAS NO LIABILITY IN CONTRACT, TORT, NEGLIGENCE
-OR<o:p></o:p></p>
-
-<p class=MsoNormal>OTHERWISE ARISING OUT OF THIS SOFTWARE OR THE DOCUMENTATION.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>PHP<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����������������� </span>The
-PHP License, version 3.0<o:p></o:p></p>
-
-<p class=MsoNormal>Copyright (c) 1999 - 2005 The PHP Group. All rights
-reserved.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Redistribution and use in source and binary forms, with or
-without<o:p></o:p></p>
-
-<p class=MsoNormal>modification, is permitted provided that the following
-conditions<o:p></o:p></p>
-
-<p class=MsoNormal>are met:<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>1. Redistributions
-of source code must retain the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>notice, this list
-of conditions and the following disclaimer.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>2. Redistributions
-in binary form must reproduce the above copyright<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>notice, this list
-of conditions and the following disclaimer in<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>the documentation
-and/or other materials provided with the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>distribution.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>3. The name "PHP"
-must not be used to endorse or promote products<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>derived from this
-software without prior written permission. For<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>written
-permission, please contact group at php.net.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>4. Products derived
-from this software may not be called "PHP", nor<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>may
-"PHP" appear in their name, without prior written permission<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>from
-group at php.net.<span style='mso-spacerun:yes'>� </span>You may indicate that
-your software works in<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>conjunction with
-PHP by saying "Foo for PHP" instead of calling<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>it "PHP
-Foo" or "phpfoo"<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>5. The PHP Group may
-publish revised and/or new versions of the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>license from time
-to time. Each version will be given a<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>distinguishing
-version number.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>Once covered code
-has been published under a particular version<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>of the license,
-you may always continue to use it under the terms<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>of that version.
-You may also choose to use such covered code<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>under the terms
-of any subsequent version of the license<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>published by the
-PHP Group. No one other than the PHP Group has<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>the right to
-modify the terms applicable to covered code created<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>under this
-License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>6. Redistributions
-of any form whatsoever must retain the following<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>acknowledgment:<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>"This
-product includes PHP, freely available from<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>����
-</span><http://www.php.net/>".<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS
-IS'' AND <o:p></o:p></p>
-
-<p class=MsoNormal>ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO,<o:p></o:p></p>
-
-<p class=MsoNormal>THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A <o:p></o:p></p>
-
-<p class=MsoNormal>PARTICULAR PURPOSE ARE DISCLAIMED.<span
-style='mso-spacerun:yes'>� </span>IN NO EVENT SHALL THE PHP<o:p></o:p></p>
-
-<p class=MsoNormal>DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, <o:p></o:p></p>
-
-<p class=MsoNormal>INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES <o:p></o:p></p>
-
-<p class=MsoNormal>(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR <o:p></o:p></p>
-
-<p class=MsoNormal>SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION)<o:p></o:p></p>
-
-<p class=MsoNormal>HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT,<o:p></o:p></p>
-
-<p class=MsoNormal>STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE)<o:p></o:p></p>
-
-<p class=MsoNormal>ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED<o:p></o:p></p>
-
-<p class=MsoNormal>OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>This software consists of voluntary contributions made by
-many<o:p></o:p></p>
-
-<p class=MsoNormal>individuals on behalf of the PHP Group.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>The PHP Group can be contacted via Email at group at php.net.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>For more information on the PHP Group and the PHP project, <o:p></o:p></p>
-
-<p class=MsoNormal>please see <http://www.php.net>.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>This product includes the Zend Engine, freely available at<o:p></o:p></p>
-
-<p class=MsoNormal><http://www.zend.com>.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>StampVer<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>StampVer - Win32 Version Resource Stamping<o:p></o:p></p>
-
-<p class=MsoNormal>Written by Paul Dixon (paul at elphin.com) Jan 1998<o:p></o:p></p>
-
-<p class=MsoNormal>http://www.elphin.com/products/stampver.html<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>tclap<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Copyright (c) 2003 Michael E. Smoot <o:p></o:p></p>
-<p class=MsoNormal>Copyright (c) 2004 Daniel Aarno<o:p></o:p></p>
-<p class=MsoNormal>Copyright (c) 2017 Google Inc.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Permission is hereby granted, free of charge, to any person <o:p></o:p></p>
-<p class=MsoNormal>obtaining a copy of this software and associated documentation <o:p></o:p></p>
-<p class=MsoNormal>files (the "Software"), to deal in the Software without restriction, <o:p></o:p></p>
-<p class=MsoNormal>including without limitation the rights to use, copy, modify, merge, <o:p></o:p></p>
-<p class=MsoNormal>publish, distribute, sublicense, and/or sell copies of the Software, <o:p></o:p></p>
-<p class=MsoNormal>and to permit persons to whom the Software is furnished to do so, <o:p></o:p></p>
-<p class=MsoNormal>subject to the following conditions:<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>The above copyright notice and this permission notice shall be <o:p></o:p></p>
-<p class=MsoNormal>included in all copies or substantial portions of the Software.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, <o:p></o:p></p>
-<p class=MsoNormal>EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES <o:p></o:p></p>
-<p class=MsoNormal>OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND <o:p></o:p></p>
-<p class=MsoNormal>NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS <o:p></o:p></p>
-<p class=MsoNormal>BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN <o:p></o:p></p>
-<p class=MsoNormal>AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR <o:p></o:p></p>
-<p class=MsoNormal>IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <o:p></o:p></p>
-<p class=MsoNormal>THE SOFTWARE.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>MapGuide Open Source, CppUnit, GEOS, SQLite, FDO and the Javascript
-Vector Graphics
-  <o:p></o:p></p>
-
-<p class=MsoNormal>Library are each licensed under the GNU Lesser General
-Public License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>GNU Lesser General Public License<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-tab-count:2'>����������������������� </span><span
-style='mso-spacerun:yes'>� </span>GNU LESSER GENERAL PUBLIC LICENSE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-tab-count:2'>����������������������� </span><span
-style='mso-spacerun:yes'>������ </span>Version 2.1, February 1999<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>Copyright (C) 1991,
-1999 Free Software Foundation, Inc.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���� </span>51 Franklin St,
-Fifth Floor, Boston, MA<span style='mso-spacerun:yes'>� </span>02110-1301<span
-style='mso-spacerun:yes'>� </span>USA<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>Everyone is permitted
-to copy and distribute verbatim copies<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>of this license
-document, but changing it is not allowed.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>[This is the first released version of the Lesser GPL.<span
-style='mso-spacerun:yes'>� </span>It also counts<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>as the successor of
-the GNU Library Public License, version 2, hence<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�</span>the version number
-2.1.]<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-tab-count:3'>����������������������������������� </span><span
-style='mso-spacerun:yes'>��� </span>Preamble<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>The licenses for
-most software are designed to take away your<o:p></o:p></p>
-
-<p class=MsoNormal>freedom to share and change it.<span
-style='mso-spacerun:yes'>� </span>By contrast, the GNU General Public<o:p></o:p></p>
-
-<p class=MsoNormal>Licenses are intended to guarantee your freedom to share and
-change<o:p></o:p></p>
-
-<p class=MsoNormal>free software--to make sure the software is free for all its
-users.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>This license, the
-Lesser General Public License, applies to some<o:p></o:p></p>
-
-<p class=MsoNormal>specially designated software packages--typically
-libraries--of the<o:p></o:p></p>
-
-<p class=MsoNormal>Free Software Foundation and other authors who decide to use
-it.<span style='mso-spacerun:yes'>� </span>You<o:p></o:p></p>
-
-<p class=MsoNormal>can use it too, but we suggest you first think carefully
-about whether<o:p></o:p></p>
-
-<p class=MsoNormal>this license or the ordinary General Public License is the
-better<o:p></o:p></p>
-
-<p class=MsoNormal>strategy to use in any particular case, based on the
-explanations below.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>When we speak of
-free software, we are referring to freedom of use,<o:p></o:p></p>
-
-<p class=MsoNormal>not price.<span style='mso-spacerun:yes'>� </span>Our
-General Public Licenses are designed to make sure that<o:p></o:p></p>
-
-<p class=MsoNormal>you have the freedom to distribute copies of free software
-(and charge<o:p></o:p></p>
-
-<p class=MsoNormal>for this service if you wish); that you receive source code
-or can get<o:p></o:p></p>
-
-<p class=MsoNormal>it if you want it; that you can change the software and use
-pieces of<o:p></o:p></p>
-
-<p class=MsoNormal>it in new free programs; and that you are informed that you
-can do<o:p></o:p></p>
-
-<p class=MsoNormal>these things.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>To protect your
-rights, we need to make restrictions that forbid<o:p></o:p></p>
-
-<p class=MsoNormal>distributors to deny you these rights or to ask you to
-surrender these<o:p></o:p></p>
-
-<p class=MsoNormal>rights.<span style='mso-spacerun:yes'>� </span>These
-restrictions translate to certain responsibilities for<o:p></o:p></p>
-
-<p class=MsoNormal>you if you distribute copies of the library or if you modify
-it.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>For example, if you
-distribute copies of the library, whether gratis<o:p></o:p></p>
-
-<p class=MsoNormal>or for a fee, you must give the recipients all the rights
-that we gave<o:p></o:p></p>
-
-<p class=MsoNormal>you.<span style='mso-spacerun:yes'>� </span>You must make
-sure that they, too, receive or can get the source<o:p></o:p></p>
-
-<p class=MsoNormal>code.<span style='mso-spacerun:yes'>� </span>If you link
-other code with the library, you must provide<o:p></o:p></p>
-
-<p class=MsoNormal>complete object files to the recipients, so that they can
-relink them<o:p></o:p></p>
-
-<p class=MsoNormal>with the library after making changes to the library and
-recompiling<o:p></o:p></p>
-
-<p class=MsoNormal>it.<span style='mso-spacerun:yes'>� </span>And you must show
-them these terms so they know their rights.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>We protect your
-rights with a two-step method: (1) we copyright the<o:p></o:p></p>
-
-<p class=MsoNormal>library, and (2) we offer you this license, which gives you
-legal<o:p></o:p></p>
-
-<p class=MsoNormal>permission to copy, distribute and/or modify the library.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>To protect each
-distributor, we want to make it very clear that<o:p></o:p></p>
-
-<p class=MsoNormal>there is no warranty for the free library.<span
-style='mso-spacerun:yes'>� </span>Also, if the library is<o:p></o:p></p>
-
-<p class=MsoNormal>modified by someone else and passed on, the recipients
-should know<o:p></o:p></p>
-
-<p class=MsoNormal>that what they have is not the original version, so that the
-original<o:p></o:p></p>
-
-<p class=MsoNormal>author's reputation will not be affected by problems that
-might be<o:p></o:p></p>
-
-<p class=MsoNormal>introduced by others.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>Finally, software
-patents pose a constant threat to the existence of<o:p></o:p></p>
-
-<p class=MsoNormal>any free program.<span style='mso-spacerun:yes'>� </span>We
-wish to make sure that a company cannot<o:p></o:p></p>
-
-<p class=MsoNormal>effectively restrict the users of a free program by
-obtaining a<o:p></o:p></p>
-
-<p class=MsoNormal>restrictive license from a patent holder.<span
-style='mso-spacerun:yes'>� </span>Therefore, we insist that<o:p></o:p></p>
-
-<p class=MsoNormal>any patent license obtained for a version of the library
-must be<o:p></o:p></p>
-
-<p class=MsoNormal>consistent with the full freedom of use specified in this
-license.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>Most GNU software,
-including some libraries, is covered by the<o:p></o:p></p>
-
-<p class=MsoNormal>ordinary GNU General Public License.<span
-style='mso-spacerun:yes'>� </span>This license, the GNU Lesser<o:p></o:p></p>
-
-<p class=MsoNormal>General Public License, applies to certain designated
-libraries, and<o:p></o:p></p>
-
-<p class=MsoNormal>is quite different from the ordinary General Public
-License.<span style='mso-spacerun:yes'>� </span>We use<o:p></o:p></p>
-
-<p class=MsoNormal>this license for certain libraries in order to permit
-linking those<o:p></o:p></p>
-
-<p class=MsoNormal>libraries into non-free programs.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>When a program is
-linked with a library, whether statically or using<o:p></o:p></p>
-
-<p class=MsoNormal>a shared library, the combination of the two is legally
-speaking a<o:p></o:p></p>
-
-<p class=MsoNormal>combined work, a derivative of the original library.<span
-style='mso-spacerun:yes'>� </span>The ordinary<o:p></o:p></p>
-
-<p class=MsoNormal>General Public License therefore permits such linking only
-if the<o:p></o:p></p>
-
-<p class=MsoNormal>entire combination fits its criteria of freedom.<span
-style='mso-spacerun:yes'>� </span>The Lesser General<o:p></o:p></p>
-
-<p class=MsoNormal>Public License permits more lax criteria for linking other
-code with<o:p></o:p></p>
-
-<p class=MsoNormal>the library.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>We call this license
-the "Lesser" General Public License because it<o:p></o:p></p>
-
-<p class=MsoNormal>does Less to protect the user's freedom than the ordinary
-General<o:p></o:p></p>
-
-<p class=MsoNormal>Public License.<span style='mso-spacerun:yes'>� </span>It
-also provides other free software developers Less<o:p></o:p></p>
-
-<p class=MsoNormal>of an advantage over competing non-free programs.<span
-style='mso-spacerun:yes'>� </span>These disadvantages<o:p></o:p></p>
-
-<p class=MsoNormal>are the reason we use the ordinary General Public License
-for many<o:p></o:p></p>
-
-<p class=MsoNormal>libraries.<span style='mso-spacerun:yes'>� </span>However,
-the Lesser license provides advantages in certain<o:p></o:p></p>
-
-<p class=MsoNormal>special circumstances.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>For example, on rare
-occasions, there may be a special need to<o:p></o:p></p>
-
-<p class=MsoNormal>encourage the widest possible use of a certain library, so
-that it becomes<o:p></o:p></p>
-
-<p class=MsoNormal>a de-facto standard.<span style='mso-spacerun:yes'>�
-</span>To achieve this, non-free programs must be<o:p></o:p></p>
-
-<p class=MsoNormal>allowed to use the library.<span style='mso-spacerun:yes'>�
-</span>A more frequent case is that a free<o:p></o:p></p>
-
-<p class=MsoNormal>library does the same job as widely used non-free
-libraries.<span style='mso-spacerun:yes'>� </span>In this<o:p></o:p></p>
-
-<p class=MsoNormal>case, there is little to gain by limiting the free library
-to free<o:p></o:p></p>
-
-<p class=MsoNormal>software only, so we use the Lesser General Public License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>In other cases,
-permission to use a particular library in non-free<o:p></o:p></p>
-
-<p class=MsoNormal>programs enables a greater number of people to use a large
-body of<o:p></o:p></p>
-
-<p class=MsoNormal>free software.<span style='mso-spacerun:yes'>� </span>For
-example, permission to use the GNU C Library in<o:p></o:p></p>
-
-<p class=MsoNormal>non-free programs enables many more people to use the whole
-GNU<o:p></o:p></p>
-
-<p class=MsoNormal>operating system, as well as its variant, the GNU/Linux
-operating<o:p></o:p></p>
-
-<p class=MsoNormal>system.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>Although the Lesser
-General Public License is Less protective of the<o:p></o:p></p>
-
-<p class=MsoNormal>users' freedom, it does ensure that the user of a program
-that is<o:p></o:p></p>
-
-<p class=MsoNormal>linked with the Library has the freedom and the wherewithal
-to run<o:p></o:p></p>
-
-<p class=MsoNormal>that program using a modified version of the Library.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>The precise terms
-and conditions for copying, distribution and<o:p></o:p></p>
-
-<p class=MsoNormal>modification follow.<span style='mso-spacerun:yes'>�
-</span>Pay close attention to the difference between a<o:p></o:p></p>
-
-<p class=MsoNormal>"work based on the library" and a "work that
-uses the library".<span style='mso-spacerun:yes'>� </span>The<o:p></o:p></p>
-
-<p class=MsoNormal>former contains code derived from the library, whereas the
-latter must<o:p></o:p></p>
-
-<p class=MsoNormal>be combined with the library in order to run.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-tab-count:2'>����������������������� </span><span
-style='mso-spacerun:yes'>� </span>GNU LESSER GENERAL PUBLIC LICENSE<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>�� </span>TERMS AND
-CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>0. This License
-Agreement applies to any software library or other<o:p></o:p></p>
-
-<p class=MsoNormal>program which contains a notice placed by the copyright
-holder or<o:p></o:p></p>
-
-<p class=MsoNormal>other authorized party saying it may be distributed under
-the terms of<o:p></o:p></p>
-
-<p class=MsoNormal>this Lesser General Public License (also called "this
-License").<o:p></o:p></p>
-
-<p class=MsoNormal>Each licensee is addressed as "you".<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>A
-"library" means a collection of software functions and/or data<o:p></o:p></p>
-
-<p class=MsoNormal>prepared so as to be conveniently linked with application
-programs<o:p></o:p></p>
-
-<p class=MsoNormal>(which use some of those functions and data) to form
-executables.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>The
-"Library", below, refers to any such software library or work<o:p></o:p></p>
-
-<p class=MsoNormal>which has been distributed under these terms.<span
-style='mso-spacerun:yes'>� </span>A "work based on the<o:p></o:p></p>
-
-<p class=MsoNormal>Library" means either the Library or any derivative
-work under<o:p></o:p></p>
-
-<p class=MsoNormal>copyright law: that is to say, a work containing the Library
-or a<o:p></o:p></p>
-
-<p class=MsoNormal>portion of it, either verbatim or with modifications and/or
-translated<o:p></o:p></p>
-
-<p class=MsoNormal>straightforwardly into another language.<span
-style='mso-spacerun:yes'>� </span>(Hereinafter, translation is<o:p></o:p></p>
-
-<p class=MsoNormal>included without limitation in the term
-"modification".)<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>"Source
-code" for a work means the preferred form of the work for<o:p></o:p></p>
-
-<p class=MsoNormal>making modifications to it.<span style='mso-spacerun:yes'>�
-</span>For a library, complete source code means<o:p></o:p></p>
-
-<p class=MsoNormal>all the source code for all modules it contains, plus any associated<o:p></o:p></p>
-
-<p class=MsoNormal>interface definition files, plus the scripts used to control
-compilation<o:p></o:p></p>
-
-<p class=MsoNormal>and installation of the library.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>Activities other
-than copying, distribution and modification are not<o:p></o:p></p>
-
-<p class=MsoNormal>covered by this License; they are outside its scope.<span
-style='mso-spacerun:yes'>� </span>The act of<o:p></o:p></p>
-
-<p class=MsoNormal>running a program using the Library is not restricted, and
-output from<o:p></o:p></p>
-
-<p class=MsoNormal>such a program is covered only if its contents constitute a
-work based<o:p></o:p></p>
-
-<p class=MsoNormal>on the Library (independent of the use of the Library in a
-tool for<o:p></o:p></p>
-
-<p class=MsoNormal>writing it).<span style='mso-spacerun:yes'>� </span>Whether
-that is true depends on what the Library does<o:p></o:p></p>
-
-<p class=MsoNormal>and what the program that uses the Library does.<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span><o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>1. You may copy and
-distribute verbatim copies of the Library's<o:p></o:p></p>
-
-<p class=MsoNormal>complete source code as you receive it, in any medium,
-provided that<o:p></o:p></p>
-
-<p class=MsoNormal>you conspicuously and appropriately publish on each copy an<o:p></o:p></p>
-
-<p class=MsoNormal>appropriate copyright notice and disclaimer of warranty;
-keep intact<o:p></o:p></p>
-
-<p class=MsoNormal>all the notices that refer to this License and to the
-absence of any<o:p></o:p></p>
-
-<p class=MsoNormal>warranty; and distribute a copy of this License along with
-the<o:p></o:p></p>
-
-<p class=MsoNormal>Library.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>You may charge a fee
-for the physical act of transferring a copy,<o:p></o:p></p>
-
-<p class=MsoNormal>and you may at your option offer warranty protection in
-exchange for a<o:p></o:p></p>
-
-<p class=MsoNormal>fee.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>2. You may modify
-your copy or copies of the Library or any portion<o:p></o:p></p>
-
-<p class=MsoNormal>of it, thus forming a work based on the Library, and copy
-and<o:p></o:p></p>
-
-<p class=MsoNormal>distribute such modifications or work under the terms of
-Section 1<o:p></o:p></p>
-
-<p class=MsoNormal>above, provided that you also meet all of these conditions:<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>a) The modified
-work must itself be a software library.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>b) You must cause
-the files modified to carry prominent notices<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>stating that you
-changed the files and the date of any change.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>c) You must cause
-the whole of the work to be licensed at no<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>charge to all
-third parties under the terms of this License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>d) If a facility
-in the modified Library refers to a function or a<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>table of data to
-be supplied by an application program that uses<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>the facility,
-other than as an argument passed when the facility<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>is invoked, then
-you must make a good faith effort to ensure that,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>in the event an
-application does not supply such function or<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>table, the
-facility still operates, and performs whatever part of<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>its purpose
-remains meaningful.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>(For example, a
-function in a library to compute square roots has<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>a purpose that is
-entirely well-defined independent of the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>application.<span
-style='mso-spacerun:yes'>� </span>Therefore, Subsection 2d requires that any<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���
-</span>application-supplied function or table used by this function must<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>be optional: if
-the application does not supply it, the square<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>root function must
-still compute square roots.)<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>These requirements apply to the modified work as a
-whole.<span style='mso-spacerun:yes'>� </span>If<o:p></o:p></p>
-
-<p class=MsoNormal>identifiable sections of that work are not derived from the
-Library,<o:p></o:p></p>
-
-<p class=MsoNormal>and can be reasonably considered independent and separate
-works in<o:p></o:p></p>
-
-<p class=MsoNormal>themselves, then this License, and its terms, do not apply
-to those<o:p></o:p></p>
-
-<p class=MsoNormal>sections when you distribute them as separate works.<span
-style='mso-spacerun:yes'>� </span>But when you<o:p></o:p></p>
-
-<p class=MsoNormal>distribute the same sections as part of a whole which is a
-work based<o:p></o:p></p>
-
-<p class=MsoNormal>on the Library, the distribution of the whole must be on the
-terms of<o:p></o:p></p>
-
-<p class=MsoNormal>this License, whose permissions for other licensees extend
-to the<o:p></o:p></p>
-
-<p class=MsoNormal>entire whole, and thus to each and every part regardless of
-who wrote<o:p></o:p></p>
-
-<p class=MsoNormal>it.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Thus, it is not the intent of this section to claim rights
-or contest<o:p></o:p></p>
-
-<p class=MsoNormal>your rights to work written entirely by you; rather, the
-intent is to<o:p></o:p></p>
-
-<p class=MsoNormal>exercise the right to control the distribution of derivative
-or<o:p></o:p></p>
-
-<p class=MsoNormal>collective works based on the Library.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>In addition, mere aggregation of another work not based on
-the Library<o:p></o:p></p>
-
-<p class=MsoNormal>with the Library (or with a work based on the Library) on a
-volume of<o:p></o:p></p>
-
-<p class=MsoNormal>a storage or distribution medium does not bring the other
-work under<o:p></o:p></p>
-
-<p class=MsoNormal>the scope of this License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>3. You may opt to
-apply the terms of the ordinary GNU General Public<o:p></o:p></p>
-
-<p class=MsoNormal>License instead of this License to a given copy of the
-Library.<span style='mso-spacerun:yes'>� </span>To do<o:p></o:p></p>
-
-<p class=MsoNormal>this, you must alter all the notices that refer to this
-License, so<o:p></o:p></p>
-
-<p class=MsoNormal>that they refer to the ordinary GNU General Public License,
-version 2,<o:p></o:p></p>
-
-<p class=MsoNormal>instead of to this License.<span style='mso-spacerun:yes'>�
-</span>(If a newer version than version 2 of the<o:p></o:p></p>
-
-<p class=MsoNormal>ordinary GNU General Public License has appeared, then you
-can specify<o:p></o:p></p>
-
-<p class=MsoNormal>that version instead if you wish.)<span
-style='mso-spacerun:yes'>� </span>Do not make any other change in<o:p></o:p></p>
-
-<p class=MsoNormal>these notices.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>Once this change is
-made in a given copy, it is irreversible for<o:p></o:p></p>
-
-<p class=MsoNormal>that copy, so the ordinary GNU General Public License
-applies to all<o:p></o:p></p>
-
-<p class=MsoNormal>subsequent copies and derivative works made from that copy.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>This option is
-useful when you wish to copy part of the code of<o:p></o:p></p>
-
-<p class=MsoNormal>the Library into a program that is not a library.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>4. You may copy and
-distribute the Library (or a portion or<o:p></o:p></p>
-
-<p class=MsoNormal>derivative of it, under Section 2) in object code or
-executable form<o:p></o:p></p>
-
-<p class=MsoNormal>under the terms of Sections 1 and 2 above provided that you
-accompany<o:p></o:p></p>
-
-<p class=MsoNormal>it with the complete corresponding machine-readable source
-code, which<o:p></o:p></p>
-
-<p class=MsoNormal>must be distributed under the terms of Sections 1 and 2
-above on a<o:p></o:p></p>
-
-<p class=MsoNormal>medium customarily used for software interchange.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>If distribution of
-object code is made by offering access to copy<o:p></o:p></p>
-
-<p class=MsoNormal>from a designated place, then offering equivalent access to
-copy the<o:p></o:p></p>
-
-<p class=MsoNormal>source code from the same place satisfies the requirement to<o:p></o:p></p>
-
-<p class=MsoNormal>distribute the source code, even though third parties are
-not<o:p></o:p></p>
-
-<p class=MsoNormal>compelled to copy the source along with the object code.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>5. A program that
-contains no derivative of any portion of the<o:p></o:p></p>
-
-<p class=MsoNormal>Library, but is designed to work with the Library by being
-compiled or<o:p></o:p></p>
-
-<p class=MsoNormal>linked with it, is called a "work that uses the
-Library".<span style='mso-spacerun:yes'>� </span>Such a<o:p></o:p></p>
-
-<p class=MsoNormal>work, in isolation, is not a derivative work of the Library,
-and<o:p></o:p></p>
-
-<p class=MsoNormal>therefore falls outside the scope of this License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>However, linking a
-"work that uses the Library" with the Library<o:p></o:p></p>
-
-<p class=MsoNormal>creates an executable that is a derivative of the Library
-(because it<o:p></o:p></p>
-
-<p class=MsoNormal>contains portions of the Library), rather than a "work
-that uses the<o:p></o:p></p>
-
-<p class=MsoNormal>library".<span style='mso-spacerun:yes'>� </span>The
-executable is therefore covered by this License.<o:p></o:p></p>
-
-<p class=MsoNormal>Section 6 states terms for distribution of such executables.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>When a "work
-that uses the Library" uses material from a header file<o:p></o:p></p>
-
-<p class=MsoNormal>that is part of the Library, the object code for the work
-may be a<o:p></o:p></p>
-
-<p class=MsoNormal>derivative work of the Library even though the source code
-is not.<o:p></o:p></p>
-
-<p class=MsoNormal>Whether this is true is especially significant if the work
-can be<o:p></o:p></p>
-
-<p class=MsoNormal>linked without the Library, or if the work is itself a
-library.<span style='mso-spacerun:yes'>� </span>The<o:p></o:p></p>
-
-<p class=MsoNormal>threshold for this to be true is not precisely defined by
-law.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>If such an object
-file uses only numerical parameters, data<o:p></o:p></p>
-
-<p class=MsoNormal>structure layouts and accessors, and small macros and small
-inline<o:p></o:p></p>
-
-<p class=MsoNormal>functions (ten lines or less in length), then the use of the
-object<o:p></o:p></p>
-
-<p class=MsoNormal>file is unrestricted, regardless of whether it is legally a
-derivative<o:p></o:p></p>
-
-<p class=MsoNormal>work.<span style='mso-spacerun:yes'>� </span>(Executables
-containing this object code plus portions of the<o:p></o:p></p>
-
-<p class=MsoNormal>Library will still fall under Section 6.)<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>Otherwise, if the
-work is a derivative of the Library, you may<o:p></o:p></p>
-
-<p class=MsoNormal>distribute the object code for the work under the terms of
-Section 6.<o:p></o:p></p>
-
-<p class=MsoNormal>Any executables containing that work also fall under Section
-6,<o:p></o:p></p>
-
-<p class=MsoNormal>whether or not they are linked directly with the Library
-itself.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>6. As an exception
-to the Sections above, you may also combine or<o:p></o:p></p>
-
-<p class=MsoNormal>link a "work that uses the Library" with the
-Library to produce a<o:p></o:p></p>
-
-<p class=MsoNormal>work containing portions of the Library, and distribute that
-work<o:p></o:p></p>
-
-<p class=MsoNormal>under terms of your choice, provided that the terms permit<o:p></o:p></p>
-
-<p class=MsoNormal>modification of the work for the customer's own use and
-reverse<o:p></o:p></p>
-
-<p class=MsoNormal>engineering for debugging such modifications.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>You must give
-prominent notice with each copy of the work that the<o:p></o:p></p>
-
-<p class=MsoNormal>Library is used in it and that the Library and its use are
-covered by<o:p></o:p></p>
-
-<p class=MsoNormal>this License.<span style='mso-spacerun:yes'>� </span>You
-must supply a copy of this License.<span style='mso-spacerun:yes'>� </span>If
-the work<o:p></o:p></p>
-
-<p class=MsoNormal>during execution displays copyright notices, you must include
-the<o:p></o:p></p>
-
-<p class=MsoNormal>copyright notice for the Library among them, as well as a
-reference<o:p></o:p></p>
-
-<p class=MsoNormal>directing the user to the copy of this License.<span
-style='mso-spacerun:yes'>� </span>Also, you must do one<o:p></o:p></p>
-
-<p class=MsoNormal>of these things:<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>a) Accompany the
-work with the complete corresponding<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>machine-readable
-source code for the Library including whatever<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>changes were used
-in the work (which must be distributed under<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>Sections 1 and 2
-above); and, if the work is an executable linked<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>with the Library,
-with the complete machine-readable "work that<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>uses the
-Library", as object code and/or source code, so that the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>user can modify
-the Library and then relink to produce a modified<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>executable
-containing the modified Library.<span style='mso-spacerun:yes'>� </span>(It is
-understood<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>that the user who
-changes the contents of definitions files in the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>Library will not
-necessarily be able to recompile the application<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>to use the
-modified definitions.)<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>b) Use a suitable
-shared library mechanism for linking with the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>Library.<span
-style='mso-spacerun:yes'>� </span>A suitable mechanism is one that (1) uses at
-run time a<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>copy of the
-library already present on the user's computer system,<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>rather than
-copying library functions into the executable, and (2)<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>will operate
-properly with a modified version of the library, if<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>the user installs
-one, as long as the modified version is<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>���
-</span>interface-compatible with the version that the work was made with.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>c) Accompany the
-work with a written offer, valid for at<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>least three years,
-to give the same user the materials<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>specified in Subsection
-6a, above, for a charge no more<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>than the cost of
-performing this distribution.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>d) If distribution
-of the work is made by offering access to copy<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>from a designated
-place, offer equivalent access to copy the above<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>specified materials
-from the same place.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>e) Verify that the
-user has already received a copy of these<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>materials or that
-you have already sent this user a copy.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>For an executable,
-the required form of the "work that uses the<o:p></o:p></p>
-
-<p class=MsoNormal>Library" must include any data and utility programs
-needed for<o:p></o:p></p>
-
-<p class=MsoNormal>reproducing the executable from it.<span
-style='mso-spacerun:yes'>� </span>However, as a special exception,<o:p></o:p></p>
-
-<p class=MsoNormal>the materials to be distributed need not include anything
-that is<o:p></o:p></p>
-
-<p class=MsoNormal>normally distributed (in either source or binary form) with
-the major<o:p></o:p></p>
-
-<p class=MsoNormal>components (compiler, kernel, and so on) of the operating
-system on<o:p></o:p></p>
-
-<p class=MsoNormal>which the executable runs, unless that component itself
-accompanies<o:p></o:p></p>
-
-<p class=MsoNormal>the executable.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>It may happen that
-this requirement contradicts the license<o:p></o:p></p>
-
-<p class=MsoNormal>restrictions of other proprietary libraries that do not
-normally<o:p></o:p></p>
-
-<p class=MsoNormal>accompany the operating system.<span
-style='mso-spacerun:yes'>� </span>Such a contradiction means you cannot<o:p></o:p></p>
-
-<p class=MsoNormal>use both them and the Library together in an executable that
-you<o:p></o:p></p>
-
-<p class=MsoNormal>distribute.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>7. You may place
-library facilities that are a work based on the<o:p></o:p></p>
-
-<p class=MsoNormal>Library side-by-side in a single library together with other
-library<o:p></o:p></p>
-
-<p class=MsoNormal>facilities not covered by this License, and distribute such
-a combined<o:p></o:p></p>
-
-<p class=MsoNormal>library, provided that the separate distribution of the work
-based on<o:p></o:p></p>
-
-<p class=MsoNormal>the Library and of the other library facilities is otherwise<o:p></o:p></p>
-
-<p class=MsoNormal>permitted, and provided that you do these two things:<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>a) Accompany the
-combined library with a copy of the same work<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>based on the
-Library, uncombined with any other library<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>facilities.<span
-style='mso-spacerun:yes'>� </span>This must be distributed under the terms of
-the<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>Sections above.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>b) Give prominent
-notice with the combined library of the fact<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>that part of it is
-a work based on the Library, and explaining<o:p></o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>��� </span>where to find the
-accompanying uncombined form of the same work.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>8. You may not copy,
-modify, sublicense, link with, or distribute<o:p></o:p></p>
-
-<p class=MsoNormal>the Library except as expressly provided under this
-License.<span style='mso-spacerun:yes'>� </span>Any<o:p></o:p></p>
-
-<p class=MsoNormal>attempt otherwise to copy, modify, sublicense, link with, or<o:p></o:p></p>
-
-<p class=MsoNormal>distribute the Library is void, and will automatically
-terminate your<o:p></o:p></p>
-
-<p class=MsoNormal>rights under this License.<span style='mso-spacerun:yes'>�
-</span>However, parties who have received copies,<o:p></o:p></p>
-
-<p class=MsoNormal>or rights, from you under this License will not have their
-licenses<o:p></o:p></p>
-
-<p class=MsoNormal>terminated so long as such parties remain in full
-compliance.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>9. You are not
-required to accept this License, since you have not<o:p></o:p></p>
-
-<p class=MsoNormal>signed it.<span style='mso-spacerun:yes'>� </span>However,
-nothing else grants you permission to modify or<o:p></o:p></p>
-
-<p class=MsoNormal>distribute the Library or its derivative works.<span
-style='mso-spacerun:yes'>� </span>These actions are<o:p></o:p></p>
-
-<p class=MsoNormal>prohibited by law if you do not accept this License.<span
-style='mso-spacerun:yes'>� </span>Therefore, by<o:p></o:p></p>
-
-<p class=MsoNormal>modifying or distributing the Library (or any work based on
-the<o:p></o:p></p>
-
-<p class=MsoNormal>Library), you indicate your acceptance of this License to do
-so, and<o:p></o:p></p>
-
-<p class=MsoNormal>all its terms and conditions for copying, distributing or
-modifying<o:p></o:p></p>
-
-<p class=MsoNormal>the Library or works based on it.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>10. Each time you
-redistribute the Library (or any work based on the<o:p></o:p></p>
-
-<p class=MsoNormal>Library), the recipient automatically receives a license
-from the<o:p></o:p></p>
-
-<p class=MsoNormal>original licensor to copy, distribute, link with or modify
-the Library<o:p></o:p></p>
-
-<p class=MsoNormal>subject to these terms and conditions.<span
-style='mso-spacerun:yes'>� </span>You may not impose any further<o:p></o:p></p>
-
-<p class=MsoNormal>restrictions on the recipients' exercise of the rights
-granted herein.<o:p></o:p></p>
-
-<p class=MsoNormal>You are not responsible for enforcing compliance by third
-parties with<o:p></o:p></p>
-
-<p class=MsoNormal>this License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>11. If, as a
-consequence of a court judgment or allegation of patent<o:p></o:p></p>
-
-<p class=MsoNormal>infringement or for any other reason (not limited to patent
-issues),<o:p></o:p></p>
-
-<p class=MsoNormal>conditions are imposed on you (whether by court order,
-agreement or<o:p></o:p></p>
-
-<p class=MsoNormal>otherwise) that contradict the conditions of this License,
-they do not<o:p></o:p></p>
-
-<p class=MsoNormal>excuse you from the conditions of this License. <span
-style='mso-spacerun:yes'>�</span>If you cannot<o:p></o:p></p>
-
-<p class=MsoNormal>distribute so as to satisfy simultaneously your obligations
-under this<o:p></o:p></p>
-
-<p class=MsoNormal>License and any other pertinent obligations, then as a
-consequence you<o:p></o:p></p>
-
-<p class=MsoNormal>may not distribute the Library at all.<span
-style='mso-spacerun:yes'>� </span>For example, if a patent<o:p></o:p></p>
-
-<p class=MsoNormal>license would not permit royalty-free redistribution of the
-Library by<o:p></o:p></p>
-
-<p class=MsoNormal>all those who receive copies directly or indirectly through
-you, then<o:p></o:p></p>
-
-<p class=MsoNormal>the only way you could satisfy both it and this License
-would be to<o:p></o:p></p>
-
-<p class=MsoNormal>refrain entirely from distribution of the Library.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>If any portion of this section is held invalid or
-unenforceable under any<o:p></o:p></p>
-
-<p class=MsoNormal>particular circumstance, the balance of the section is
-intended to apply,<o:p></o:p></p>
-
-<p class=MsoNormal>and the section as a whole is intended to apply in other
-circumstances.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>It is not the purpose of this section to induce you to
-infringe any<o:p></o:p></p>
-
-<p class=MsoNormal>patents or other property right claims or to contest
-validity of any<o:p></o:p></p>
-
-<p class=MsoNormal>such claims; this section has the sole purpose of protecting
-the<o:p></o:p></p>
-
-<p class=MsoNormal>integrity of the free software distribution system which is<o:p></o:p></p>
-
-<p class=MsoNormal>implemented by public license practices.<span
-style='mso-spacerun:yes'>� </span>Many people have made<o:p></o:p></p>
-
-<p class=MsoNormal>generous contributions to the wide range of software
-distributed<o:p></o:p></p>
-
-<p class=MsoNormal>through that system in reliance on consistent application of
-that<o:p></o:p></p>
-
-<p class=MsoNormal>system; it is up to the author/donor to decide if he or she
-is willing<o:p></o:p></p>
-
-<p class=MsoNormal>to distribute software through any other system and a
-licensee cannot<o:p></o:p></p>
-
-<p class=MsoNormal>impose that choice.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>This section is intended to make thoroughly clear what is
-believed to<o:p></o:p></p>
-
-<p class=MsoNormal>be a consequence of the rest of this License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>12. If the
-distribution and/or use of the Library is restricted in<o:p></o:p></p>
-
-<p class=MsoNormal>certain countries either by patents or by copyrighted
-interfaces, the<o:p></o:p></p>
-
-<p class=MsoNormal>original copyright holder who places the Library under this
-License may add<o:p></o:p></p>
-
-<p class=MsoNormal>an explicit geographical distribution limitation excluding
-those countries,<o:p></o:p></p>
-
-<p class=MsoNormal>so that distribution is permitted only in or among countries
-not thus<o:p></o:p></p>
-
-<p class=MsoNormal>excluded.<span style='mso-spacerun:yes'>� </span>In such
-case, this License incorporates the limitation as if<o:p></o:p></p>
-
-<p class=MsoNormal>written in the body of this License.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>13. The Free
-Software Foundation may publish revised and/or new<o:p></o:p></p>
-
-<p class=MsoNormal>versions of the Lesser General Public License from time to
-time.<o:p></o:p></p>
-
-<p class=MsoNormal>Such new versions will be similar in spirit to the present
-version,<o:p></o:p></p>
-
-<p class=MsoNormal>but may differ in detail to address new problems or
-concerns.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>Each version is given a distinguishing version number.<span
-style='mso-spacerun:yes'>� </span>If the Library<o:p></o:p></p>
-
-<p class=MsoNormal>specifies a version number of this License which applies to
-it and<o:p></o:p></p>
-
-<p class=MsoNormal>"any later version", you have the option of
-following the terms and<o:p></o:p></p>
-
-<p class=MsoNormal>conditions either of that version or of any later version
-published by<o:p></o:p></p>
-
-<p class=MsoNormal>the Free Software Foundation.<span
-style='mso-spacerun:yes'>� </span>If the Library does not specify a<o:p></o:p></p>
-
-<p class=MsoNormal>license version number, you may choose any version ever
-published by<o:p></o:p></p>
-
-<p class=MsoNormal>the Free Software Foundation.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>14. If you wish to
-incorporate parts of the Library into other free<o:p></o:p></p>
-
-<p class=MsoNormal>programs whose distribution conditions are incompatible with
-these,<o:p></o:p></p>
-
-<p class=MsoNormal>write to the author to ask for permission.<span
-style='mso-spacerun:yes'>� </span>For software which is<o:p></o:p></p>
-
-<p class=MsoNormal>copyrighted by the Free Software Foundation, write to the
-Free<o:p></o:p></p>
-
-<p class=MsoNormal>Software Foundation; we sometimes make exceptions for
-this.<span style='mso-spacerun:yes'>� </span>Our<o:p></o:p></p>
-
-<p class=MsoNormal>decision will be guided by the two goals of preserving the
-free status<o:p></o:p></p>
-
-<p class=MsoNormal>of all derivatives of our free software and of promoting the
-sharing<o:p></o:p></p>
-
-<p class=MsoNormal>and reuse of software generally.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-tab-count:3'>����������������������������������� </span><span
-style='mso-spacerun:yes'>��� </span>NO WARRANTY<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>15. BECAUSE THE
-LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO<o:p></o:p></p>
-
-<p class=MsoNormal>WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE
-LAW.<o:p></o:p></p>
-
-<p class=MsoNormal>EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR<o:p></o:p></p>
-
-<p class=MsoNormal>OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT
-WARRANTY OF ANY<o:p></o:p></p>
-
-<p class=MsoNormal>KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, THE<o:p></o:p></p>
-
-<p class=MsoNormal>IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR<o:p></o:p></p>
-
-<p class=MsoNormal>PURPOSE.<span style='mso-spacerun:yes'>� </span>THE ENTIRE
-RISK AS TO THE QUALITY AND PERFORMANCE OF THE<o:p></o:p></p>
-
-<p class=MsoNormal>LIBRARY IS WITH YOU.<span style='mso-spacerun:yes'>�
-</span>SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME<o:p></o:p></p>
-
-<p class=MsoNormal>THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-spacerun:yes'>� </span>16. IN NO EVENT
-UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN<o:p></o:p></p>
-
-<p class=MsoNormal>WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO
-MAY MODIFY<o:p></o:p></p>
-
-<p class=MsoNormal>AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE
-LIABLE TO YOU<o:p></o:p></p>
-
-<p class=MsoNormal>FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR<o:p></o:p></p>
-
-<p class=MsoNormal>CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO
-USE THE<o:p></o:p></p>
-
-<p class=MsoNormal>LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
-BEING<o:p></o:p></p>
-
-<p class=MsoNormal>RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A<o:p></o:p></p>
-
-<p class=MsoNormal>FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
-EVEN IF<o:p></o:p></p>
-
-<p class=MsoNormal>SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH<o:p></o:p></p>
-
-<p class=MsoNormal>DAMAGES.<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><span style='mso-tab-count:2'>����������������������� </span><span
-style='mso-spacerun:yes'>���� </span>END OF TERMS AND CONDITIONS<o:p></o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal><o:p> </o:p></p>
-
-<p class=MsoNormal>
-  <o:p> =====================================================================</o:p>
-</p>
-<p>License for DWF Toolkit 7<br>
-  NOTICE TO USER:<br>
-  THIS LICENSE AGREEMENT ("AGREEMENT") IS A LEGAL AGREEMENT BETWEEN YOU (EITHER AN INDIVIDUAL OR A SINGLE ENTITY) AND AUTODESK, INC. FOR THE DWF TOOLKIT 7, WHICH INCLUDES COMPUTER SOFTWARE AND MAY INCLUDE ASSOCIATED MEDIA, PRINTED MATERIALS AND ONLINE OR ELECTRONIC DOCUMENTATION ("LICENSED SOFTWARE"). BY INSTALLING THE LICENSED SOFTWARE YOU ACCEPT ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT, DO NOT INSTALL OR USE THE LICENSED SOFTWARE. </p>
-<p> </p>
-<p>1 LICENSE GRANT<br>
-  1.1 Autodesk grants to you ("Licensee") a perpetual, nontransferable, nonexclusive, royalty-free, limited license to: </p>
-<p>1.1.1  (a) Use the Licensed Software for development, research, internal, educational, or commercial purposes; (b) Modify the Licensed Software to create derivative works and applications, including ports; and (c) Compile the Licensed Software, derivative works and applications prepared in accordance with subsection 1.1.1(b) into binary code. <br>
-    <br>
-  1.1.2   Reproduce, distribute and sublicense free of charge or for a fee  the Licensed Software in binary code form in conjunction with derivative works or applications created by Licensee or licensed from third parties by Licensee, provided, that: (a) Licensee makes no use of Autodesk’s trademarks, trade names, or trade dress; (b) In the event Licensee makes any modification to the Licensed Software, Licensee must publish the specification for such modifications for use by third party developers and provide Autodesk with a copy thereof; and (c) The Licensee must sublicense the Licensed Software “as is”, without warranty of any kind. <br>
-  1.1.3  Reproduce, distribute  and sublicense free of charge to sublicensees the source code of the unmodified Licensed Software, provided that (a) Licensee must state in its sublicenses that the Licensed Software is being distributed pursuant to a license granted by Autodesk, Inc.; (b)The terms of sublicenses granted by Licensee must (i) contain all applicable terms of this Agreement, and (ii) not be broader than the terms of the license granted by this Agreement; (c) Licensee must exactly reproduce Autodesk’s copyright and other proprietary rights notices which accompany the copy of the Licensed Software licensed by Autodesk to Licensee; and (d) Licensee shall conspicuously state in its sublicenses that the Licensed Software is offered “as is”, without warranty of any kind. <br>
-  1.1.4  Reproduce, distribute and sublicense the source code of the Licensed Software as modified by Licensee, provided that (a) Licensee must state in its sublicense that the Licensed Software has been modified by Licensee; (b) Licensee must exactly reproduce Autodesk’s copyright and other proprietary rights notices which accompany the copy of the Licensed Software licensed by Autodesk to Licensee; (c) As to the unmodified portions of the Licensed Software, the terms of the sublicenses granted by Licensee must (i) contain all applicable terms of this Agreement, and (ii) not be broader than the terms of the license granted by this Agreement; (d) Licensee must conspicuously state in its sublicenses that the original, unmodified portions of the Licensed Software are offered “as is”, without warranty of any kind; and (e) Licensee must (i) publish the modified Licensed Software to the Worldwide Web, (ii) make available with the modified Licensed Software documentation
  which describes in detail the modifications which Licensee has made to the Licensed Software, and (iii) provide to Autodesk a copy of the modified Licensed Software and the documentation. </p>
-<p> </p>
-<p>1.2 Licensee acquires no right, title, or interest in or to the Licensed Software,</p>
-<p>1.3 Licensee shall retain all rights to any independently developed software, such as applications, developed by or for Licensee.</p>
-<p>1.4 Autodesk is under no obligation to provide maintenance, support, or upgrades for the Licensed Software.<br>
-</p>
-<p>2 COPYRIGHTS AND TRADEMARKS<br>
-  Licensee shall reproduce and apply any copyright or other proprietary rights notices included on or embedded in the Licensed Software to any copies of the Licensed Software or to applications created using the Licensed Software, in any form. Licensee shall have no right to use any Autodesk trademarks, trade names or trade dress absent a separate written agreement between Autodesk and Licensee. Licensee hereby understands and agrees that Autodesk is not granting any rights to Autodesk patents, copyrights, trademarks or trade secret information to Licensee by this Agreement.</p>
-<p>3 FEES<br>
-  Use of the Licensed Software in accordance with the terms of this Agreement shall not require payment of a license fee.<br>
-</p>
-<p>4 TERM AND TERMINATION<br>
-  The grant of a perpetual license notwithstanding, Autodesk may immediately terminate this Agreement and revoke the license granted to Licensee upon written notice to Licensee if Licensee fails to comply with any of the terms or conditions of this Agreement. Upon termination of this Agreement, Licensee shall immediately cease using, reproducing and distributing the Licensed Software, the license and rights granted hereunder shall expire, and Licensee shall immediately destroy or return to Autodesk the Licensed Software and all related documentation, materials or copies thereof.<br>
-</p>
-<p>5 DISCLAIMER OF WARRANTY<br>
-  5.1 The Licensed Software is provided "AS IS" and without any warranty of any kind. <br>
-  5.2 AUTODESK DOES NOT MAKE AND HEREBY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE. <br>
-</p>
-<p>6 LIMITATION OF LIABILITY<br>
-  6.1 In no event will Autodesk be liable for any lost revenues, data, or profits, or special, indirect, or consequential damages, even if Autodesk has been advised of the possibility or probability of such damages. Autodesk’s maximum liability for damages shall be limited to the fees, if any, required under Section 3 for the particular Licensed Software which caused the damages. <br>
-  6.2 The Licensed Software is not fault-tolerant and is not designed, manufactured, or intended for use or resale as online control equipment in hazardous environments requiring fail-safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of the Licensed Software or derived binaries could lead directly to death, personal injury, or severe physical or environmental damage ("High Risk Activities"). Autodesk specifically disclaims any express or implied warranty of fitness for High Risk Activities. Licensee will not knowingly use, distribute, or sublicense the Licensed Software or derived binaries for High Risk Activities and will ensure that its customers and end-users of Licensee's products are provided with a copy of the notice specified in the first sentence of this Section 6.2. <br>
-</p>
-<p>7 PROPRIETARY INFORMATION<br>
-  The Licensed Software is the proprietary information of Autodesk, Inc. ("Confidential Information").  Except as permitted by this Agreement, Licensee shall not disclose Confidential Information and shall use it only for purposes specifically contemplated by this Agreement. This Agreement will not affect any non-disclosure agreement between the parties.</p>
-<p>8 EXPORT<br>
-  Unless properly authorized by the U.S. Government, Licensee shall not export, re-export or transfer, whether directly or indirectly, the Licensed Software or binary derivative or direct products thereof, to any person or company who is (a) present in or controlled by a legal resident of any proscribed country listed in the U.S. Export Administration Regulations (or any equivalent thereof ), or (b) a person or entity named in the entity lists, denied persons lists or specially designated nationals lists maintained by the U.S. Government. </p>
-<p>9 U.S. GOVERNMENT RESTRICTED RIGHTS<br>
-  This Licensed Software is provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software Clause as DFARS 252.227-7013 and FAR 52.227-19 as applicable. Manufacturer is Autodesk, Inc., 111 McInnis Parkway, San Rafael, California 94903.</p>
-<p>10 GOVERNING LAW<br>
-  Any action related to this Agreement will be governed by California law, excluding choice of law rules.</p>
-<p></p>
-<p class=MsoNormal> </p>
-</div>
-
-</body>
-
-</html>

Modified: trunk/MgDev/License.txt
===================================================================
--- trunk/MgDev/License.txt	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/License.txt	2020-08-04 12:00:10 UTC (rev 9699)
@@ -906,7 +906,61 @@
 
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-MapGuide Open Source, CppUnit, GEOS, SQLite, FDO and the Javascript Vector Graphics 
+cpp-httplib
+
+The MIT License (MIT)
+
+Copyright (c) 2017 yhirose
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+catch2
+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+MapGuide Open Source, GEOS, SQLite, FDO and the Javascript Vector Graphics 
 Library are each licensed under the GNU Lesser General Public License.
 
 

Modified: trunk/MgDev/Server/src/Wms/1.0.0.xml.awd
===================================================================
--- trunk/MgDev/Server/src/Wms/1.0.0.xml.awd	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Server/src/Wms/1.0.0.xml.awd	2020-08-04 12:00:10 UTC (rev 9699)
@@ -412,6 +412,15 @@
   "features": [<?EnumFeatureInfo using="&FeatureInfo.json;" ?>]
 }</Response>
 
+<!-- 
+
+  WMS GetFeatureInfo - OpenLayers viewer
+
+-->
+<Response request="GetMap" content-type="application/openlayers">
+&GetMap.html;
+</Response>
+
 <!--
 
   Exception format - XML

Modified: trunk/MgDev/Server/src/Wms/1.1.0.xml.awd
===================================================================
--- trunk/MgDev/Server/src/Wms/1.1.0.xml.awd	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Server/src/Wms/1.1.0.xml.awd	2020-08-04 12:00:10 UTC (rev 9699)
@@ -436,7 +436,15 @@
   "features": [<?EnumFeatureInfo using="&FeatureInfo.json;" ?>]
 }</Response>
 
+<!-- 
 
+  WMS GetFeatureInfo - OpenLayers viewer
+
+-->
+<Response request="GetMap" content-type="application/openlayers">
+&GetMap.html;
+</Response>
+
 <!--
 
   Exception Format  - XML

Modified: trunk/MgDev/Server/src/Wms/1.1.1.xml.awd
===================================================================
--- trunk/MgDev/Server/src/Wms/1.1.1.xml.awd	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Server/src/Wms/1.1.1.xml.awd	2020-08-04 12:00:10 UTC (rev 9699)
@@ -416,7 +416,15 @@
   "features": [<?EnumFeatureInfo using="&FeatureInfo.json;" ?>]
 }</Response>
 
+<!-- 
 
+  WMS GetFeatureInfo - OpenLayers viewer
+
+-->
+<Response request="GetMap" content-type="application/openlayers">
+&GetMap.html;
+</Response>
+
 <!--
 
   Exception format - XML

Modified: trunk/MgDev/Server/src/Wms/1.3.0.xml.awd
===================================================================
--- trunk/MgDev/Server/src/Wms/1.3.0.xml.awd	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Server/src/Wms/1.3.0.xml.awd	2020-08-04 12:00:10 UTC (rev 9699)
@@ -424,6 +424,15 @@
 }</Response>
 
 
+<!-- 
+
+  WMS GetFeatureInfo - OpenLayers viewer
+
+-->
+<Response request="GetMap" content-type="application/openlayers">
+&GetMap.html;
+</Response>
+
 <!--
 
   Exception format - XML

Modified: trunk/MgDev/Server/src/Wms/OgcWmsService.config.awd
===================================================================
--- trunk/MgDev/Server/src/Wms/OgcWmsService.config.awd	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Server/src/Wms/OgcWmsService.config.awd	2020-08-04 12:00:10 UTC (rev 9699)
@@ -140,6 +140,7 @@
    <item>image/png</item>
    <item>image/jpeg</item>
    <item>image/gif</item>
+   <item>application/openlayers</item>
  </Define>
 
  <!-- This value map permits FORMAT= parameters to be  -->
@@ -246,6 +247,116 @@
   <translate from="CRS:84">GEOGCS["LL84",DATUM["WGS84",SPHEROID["WGS84",6378137.000,298.25722293]],PRIMEM["Greenwich",0],UNIT["Degree",0.01745329251994]]</translate>
  </Define>
 
+ <Define item="GetMap.html"><!DOCTYPE html>
+<html>
+  <head>
+    <!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
+    <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"></script>
+    <!-- Pointer events polyfill for old browsers, see https://caniuse.com/#feat=pointer -->
+    <script src="https://unpkg.com/@openlayers/pepjs"></script>
+    <script type="text/javascript" src="../viewerfiles/ol.js" charset="utf-8"></script>
+    <link rel="stylesheet" href="../viewerfiles/ol.css" />
+    <style type="text/css">
+      .map {
+        width: 100%;
+        height:400px;
+      }
+    </style>
+    &html.stylesheet;
+  </head>
+  <body>
+    <div id="map" class="map"></div>
+    <div id="info"></div>
+    <script type="text/javascript">
+
+      function buildTable(features) {
+        var html = "";
+        for (var i = 0; i < features.length; i++) {
+          html += "<table>";
+          html += "<thead>";
+          html += "<tr><td>Name</td><td>Value</td></tr>";
+          html += "</thead>";
+          html += "<tbody>";
+          var props = features[i].getProperties();
+          for (var k in props) {
+            if (k == features[i].getGeometryName()) {
+              continue;
+            }
+            html += "<tr><td>" + k + "</td><td>" + props[k] + "</td></tr>";
+          }
+          html += "</tbody>";
+          html += "</table>";
+        }
+        return html;
+      }
+
+      var bounds = [&Viewer.BBOX;];
+      var format = new ol.format.GeoJSON();
+      var wmsSource = new ol.source.ImageWMS({
+        url: "&Viewer.SelfUrl;",
+        params: {
+          "LAYERS": "&Viewer.LayersParam;",
+          "VERSION": "&Viewer.ServiceVersion;",
+          "TRANSPARENT": "TRUE"
+        },
+        ratio: 1
+      });
+      var vectorSource = new ol.source.Vector();
+      var layers = [
+        new ol.layer.Tile({
+          source: new ol.source.OSM()
+        }),
+        new ol.layer.Image({
+          source: wmsSource
+        }),
+        new ol.layer.Vector({
+          source: vectorSource
+        })
+      ];
+      var view = new ol.View({
+        projection: "&Viewer.SRS;"
+      });
+      view.fit(bounds);
+      var map = new ol.Map({
+        layers: layers,
+        target: "map",
+        view: view
+      });
+      map.on('singleclick', function (evt) {
+        document.getElementById('info').innerHTML = '';
+        var viewResolution = /** @type {number} */ (view.getResolution());
+        var url = wmsSource.getFeatureInfoUrl(
+          evt.coordinate,
+          viewResolution,
+          '&Viewer.SRS;',
+          {'INFO_FORMAT': 'application/json'}
+        );
+        if (url) {
+          fetch(url)
+            .then(function (response) { return response.json(); })
+            .then(function (json) {
+              vectorSource.clear();
+              var features = format.readFeatures(json);
+              vectorSource.addFeatures(features);
+              document.getElementById("info").innerHTML = buildTable(features);
+            });
+        }
+      });
+      map.on('pointermove', function (evt) {
+        if (evt.dragging) {
+          return;
+        }
+        var pixel = map.getEventPixel(evt.originalEvent);
+        var hit = map.forEachLayerAtPixel(pixel, function () {
+          return true;
+        });
+        map.getTargetElement().style.cursor = hit ? 'pointer' : '';
+      });
+    </script>
+  </body>
+</html>
+ </Define>
+
 </Definitions>
 
 

Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getmapwmsform.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getmapwmsform.html	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/getmapwmsform.html	2020-08-04 12:00:10 UTC (rev 9699)
@@ -17,6 +17,7 @@
 <option value="image/png">image/png</option>
 <option value="image/jpeg">image/jpeg</option>
 <option value="image/gif">image/gif</option>
+<option value="application/openlayers">application/openlayers</option>
 </select>
 <p> Layers (comma-separated):
 <input type="text" name="LAYERS" value="Samples/Sheboygan/Layers/Parcels,Samples/Sheboygan/Layers/Roads" size="100">

Modified: trunk/MgDev/Web/src/CMakeLists.txt
===================================================================
--- trunk/MgDev/Web/src/CMakeLists.txt	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Web/src/CMakeLists.txt	2020-08-04 12:00:10 UTC (rev 9699)
@@ -2,6 +2,7 @@
 add_subdirectory(WebApp)
 add_subdirectory(WebSupport)
 add_subdirectory(HttpHandler)
+add_subdirectory(DevHttpServer)
 #add_subdirectory(CgiAgent)
 add_subdirectory(PhpApi)
 if (WITH_JAVA)

Modified: trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp	2020-08-04 12:00:10 UTC (rev 9699)
@@ -230,7 +230,7 @@
             STRING sServiceValue = m_requestParam->GetParameterValue(MgHttpResourceStrings::reqWmsService);
             if(sServiceValue.length() != 0 && (L"WFS" == MgUtil::ToUpper(sServiceValue) || L"WMS" == MgUtil::ToUpper(sServiceValue)))
             {
-                    sParamValue = sServiceValue;
+                sParamValue = sServiceValue;
             }
             else
             {

Modified: trunk/MgDev/Web/src/HttpHandler/HttpWmsGetMap.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpWmsGetMap.cpp	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Web/src/HttpHandler/HttpWmsGetMap.cpp	2020-08-04 12:00:10 UTC (rev 9699)
@@ -168,42 +168,61 @@
     {
         if(wms.ProcessRequest(this))
         {
-            // Get an instance of the resource service
-            Ptr<MgResourceService> resourceService = (MgResourceService*)CreateService(MgServiceType::ResourceService);
-            // Get an instance of the resource service
-            Ptr<MgFeatureService> featureService = (MgFeatureService*)CreateService(MgServiceType::FeatureService);
+            // Get the image format
+            // Note: should be valid, since this mapping has already happened
+            // in the Validate phase.
+            STRING format;
+            wms.MapValue(kpszDefineSupportedFormats, m_format.c_str(), format);
 
-            // Get the background color
-            Ptr<MgColor> bkColor = MgWmsMapUtil::GetBackgroundColor(m_bgColor, m_transparent);
+            if (m_format == kpszOpenLayersMimeType)
+            {
+                // Construct a self url
+                auto selfUrl = m_hRequest->GetAgentUri();
+                STRING sLayers = GetRequestParameter(wms, MgHttpResourceStrings::reqWmsLayers);
+                wms.GenerateViewerResponse(selfUrl, m_version, sLayers, m_crs, m_bbox);
 
-            // Get the extents
-            Ptr<MgEnvelope> extents = MgWmsMapUtil::GetExtents(m_bbox);
+                // Slurp the results.
+                // NOTE: The application/openlayers mime type is just a means to get to the code path
+                // the actual mime type to serve back is HTML
+                responseStream.Stream().SetMimeType(MgMimeType::Html);
+                Ptr<MgByteReader> content = responseStream.Stream().GetReader();
 
-            // Create session
-            Ptr<MgUserInformation> userInfo = m_siteConn->GetUserInfo();
-            site = m_siteConn->GetSite();
-            session = site->CreateSession();
-            userInfo->SetMgSessionId(session);
+                // Set the result
+                hResult->SetResultObject(content, content->GetMimeType());
+            }
+            else
+            {
+                // Get an instance of the resource service
+                Ptr<MgResourceService> resourceService = (MgResourceService*)CreateService(MgServiceType::ResourceService);
+                // Get an instance of the resource service
+                Ptr<MgFeatureService> featureService = (MgFeatureService*)CreateService(MgServiceType::FeatureService);
 
-            // Get a map object corresponding to the request parameters
-            Ptr<MgMap> map = MgWmsMapUtil::GetMap(wms, m_layerDefIds, m_bbox, m_crs,
-                m_width, m_height, resourceService, featureService, session);
-            map->SetWatermarkUsage(MgMap::WMS);
+                // Get the background color
+                Ptr<MgColor> bkColor = MgWmsMapUtil::GetBackgroundColor(m_bgColor, m_transparent);
 
-            // Get the image format
-            // Note: should be valid, since this mapping has already happened
-            // in the Validate phase.
-            STRING format;
-            wms.MapValue(kpszDefineSupportedFormats,m_format.c_str(),format);
+                // Get the extents
+                Ptr<MgEnvelope> extents = MgWmsMapUtil::GetExtents(m_bbox);
 
-            // Render the map
-            Ptr<MgRenderingService> renderingService = (MgRenderingService*)CreateService(MgServiceType::RenderingService);
-            Ptr<MgSelection> selection;
-            Ptr<MgByteReader> mapImage = renderingService->RenderMap(map, selection, extents, m_width, m_height, bkColor, format);
+                // Create session
+                Ptr<MgUserInformation> userInfo = m_siteConn->GetUserInfo();
+                site = m_siteConn->GetSite();
+                session = site->CreateSession();
+                userInfo->SetMgSessionId(session);
 
-            // Set the result
-            STRING sMimeType = mapImage->GetMimeType();
-            hResult->SetResultObject(mapImage, sMimeType.length() > 0 ? sMimeType : m_format);
+                // Get a map object corresponding to the request parameters
+                Ptr<MgMap> map = MgWmsMapUtil::GetMap(wms, m_layerDefIds, m_bbox, m_crs,
+                    m_width, m_height, resourceService, featureService, session);
+                map->SetWatermarkUsage(MgMap::WMS);
+
+                // Render the map
+                Ptr<MgRenderingService> renderingService = (MgRenderingService*)CreateService(MgServiceType::RenderingService);
+                Ptr<MgSelection> selection;
+                Ptr<MgByteReader> mapImage = renderingService->RenderMap(map, selection, extents, m_width, m_height, bkColor, format);
+
+                // Set the result
+                STRING sMimeType = mapImage->GetMimeType();
+                hResult->SetResultObject(mapImage, sMimeType.length() > 0 ? sMimeType : m_format);
+            }
         }
         else
         {

Modified: trunk/MgDev/Web/src/HttpHandler/OgcFramework.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/OgcFramework.h	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Web/src/HttpHandler/OgcFramework.h	2020-08-04 12:00:10 UTC (rev 9699)
@@ -167,4 +167,6 @@
 //
 //extern CPSZ kpszFilenameGlobalConfig       ;// = _("OgcWmsService.config");
 
+extern CPSZ kpszOpenLayersMimeType         ;// = _("application/openlayers");
+
 #endif//_OgcFramework_h

Modified: trunk/MgDev/Web/src/HttpHandler/OgcServer.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/OgcServer.cpp	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Web/src/HttpHandler/OgcServer.cpp	2020-08-04 12:00:10 UTC (rev 9699)
@@ -135,6 +135,12 @@
 CPSZ kpszNewline                    = _("\n");
 CPSZ kpszXmlSlash                   = _("/");
 
+CPSZ kpszViewerSelfUrl              = _("Viewer.SelfUrl");
+CPSZ kpszViewerLayersParam          = _("Viewer.LayersParam");
+CPSZ kpszViewerSrs                  = _("Viewer.SRS");
+CPSZ kpszViewerBounds               = _("Viewer.BBOX");
+CPSZ kpszViewerServiceVersion       = _("Viewer.ServiceVersion");
+
 // BEGIN LOCALIZATION --
 CPSZ kpszDefaultExceptionTemplate   = _("<html><head><title>Server Exception</title></head><body><h1>Server Exception:</h1><p>Type: &Exception.Type;</p><p>Message: &Exception.Message;</p><pre><?EnumDictionary?></pre></body></html>");
 CPSZ kpszInternalErrorNoSupportedVersions = _("Service Config file does not contain any SupportedVersions definition; unable to perform version negotiation.");
@@ -215,6 +221,8 @@
 CPSZ kpszVersionRediculouslyHighVersion = _("9999.9.9"); // If no version is provided, we "ask" for this (to get
                                                          // the highest version possible.
 
+CPSZ kpszOpenLayersMimeType          = _("application/openlayers"); //OpenLayers mime type
+
 DocLoaderFunc MgOgcServer::ms_fnDocLoader = NULL;
 
 
@@ -1888,7 +1896,19 @@
     ProcessExpandableText(pszTextWithExpansion,(int)szlen(pszTextWithExpansion));
 }
 
+void MgOgcServer::GenerateViewerResponse(CREFSTRING selfUrl, CREFSTRING version, CREFSTRING layers, CREFSTRING srs, CREFSTRING bbox)
+{
+    CDictionaryStackFrame forThis(this);
 
+    AddDefinition(kpszViewerSelfUrl, selfUrl);
+    AddDefinition(kpszViewerServiceVersion, version);
+    AddDefinition(kpszViewerLayersParam, layers);
+    AddDefinition(kpszViewerSrs, srs);
+    AddDefinition(kpszViewerBounds, bbox);
+
+    GenerateResponse(kpszQueryValueGetMap, kpszOpenLayersMimeType);
+}
+
 MgOgcServer::CDictionaryStackFrame::CDictionaryStackFrame(MgOgcServer* pServer)
 : m_pServer(pServer)
 {

Modified: trunk/MgDev/Web/src/HttpHandler/OgcServer.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/OgcServer.h	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Web/src/HttpHandler/OgcServer.h	2020-08-04 12:00:10 UTC (rev 9699)
@@ -553,8 +553,9 @@
     // to actually do the loading.  See signature, above.
     static void SetLoader(DocLoaderFunc fnDocLoad);
 
+    void GenerateViewerResponse(CREFSTRING selfUrl, CREFSTRING version, CREFSTRING layers, CREFSTRING srs, CREFSTRING bbox);
+
 private:
-
     // Pointer to the document loader function; modified by SetLoader().
     static DocLoaderFunc ms_fnDocLoader;
 
@@ -561,7 +562,7 @@
     // Handles one <Define>...</Define> element in the template or global config.
     // Assumes that the parser is positioned over the <Define> begin element.
     // Used both by the global initialization, as well as each service instance.
-    static void ProcessDefine(     MgXmlParser& Template,MgUtilDictionary& Dictionary);
+    static void ProcessDefine(MgXmlParser& Template, MgUtilDictionary& Dictionary);
 
     // Used by global initialization to process the default <Exception> form of response.
     // Used as a fallback in case the service instance doesn't find a <Response> for

Modified: trunk/MgDev/Web/src/HttpHandler/OgcWmsServer.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/OgcWmsServer.cpp	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Web/src/HttpHandler/OgcWmsServer.cpp	2020-08-04 12:00:10 UTC (rev 9699)
@@ -48,6 +48,7 @@
                                        _("<translate from=\"image/png\">PNG</translate>")
                                        _("<translate from=\"image/gif\">GIF</translate>")
                                        _("<translate from=\"image/tiff\">TIF</translate>")
+                                       _("<translate from=\"application/openlayers\">application/openlayers</translate>")
                                        // Below is REQUIRED.  Illegal strings should map to "".
                                        _("<translate></translate>");
 

Modified: trunk/MgDev/Web/src/HttpHandler/OgcWmsServer.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/OgcWmsServer.h	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Web/src/HttpHandler/OgcWmsServer.h	2020-08-04 12:00:10 UTC (rev 9699)
@@ -50,7 +50,6 @@
     CPSZ GetServiceType();
     CPSZ GetTemplatePrefix();
 
-
     // Gets the template info for default exception, when no other exception type is at hand.
     void GetDefaultExceptionInfo(REFSTRING sTemplate,REFSTRING sMimeType);
 

Modified: trunk/MgDev/Web/src/WebTier.sln
===================================================================
--- trunk/MgDev/Web/src/WebTier.sln	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Web/src/WebTier.sln	2020-08-04 12:00:10 UTC (rev 9699)
@@ -1,6 +1,6 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.22823.1
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30309.148
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CgiAgent", "CgiAgent\CgiAgent.vcxproj", "{DA3459C2-1430-499F-996F-218DA3DD755D}"
 EndProject
@@ -98,6 +98,10 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IMake", "..\..\BuildTools\WebTools\IMake\IMake.vcxproj", "{B601F04C-0D42-4AFC-A092-B31185E2EA8C}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebTestRunner", "WebTestRunner\WebTestRunner.vcxproj", "{1E4F8EE7-3189-4ACE-9103-D69A50B2102F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevHttpServer", "DevHttpServer\DevHttpServer.vcxproj", "{2F2003C6-D19E-439D-8519-6BFCD7E58E6B}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -354,6 +358,22 @@
 		{B601F04C-0D42-4AFC-A092-B31185E2EA8C}.Release|Win32.Build.0 = Release|Win32
 		{B601F04C-0D42-4AFC-A092-B31185E2EA8C}.Release|x64.ActiveCfg = Release|x64
 		{B601F04C-0D42-4AFC-A092-B31185E2EA8C}.Release|x64.Build.0 = Release|x64
+		{1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Debug|Win32.Build.0 = Debug|Win32
+		{1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Debug|x64.ActiveCfg = Debug|x64
+		{1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Debug|x64.Build.0 = Debug|x64
+		{1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Release|Win32.ActiveCfg = Release|Win32
+		{1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Release|Win32.Build.0 = Release|Win32
+		{1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Release|x64.ActiveCfg = Release|x64
+		{1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Release|x64.Build.0 = Release|x64
+		{2F2003C6-D19E-439D-8519-6BFCD7E58E6B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2F2003C6-D19E-439D-8519-6BFCD7E58E6B}.Debug|Win32.Build.0 = Debug|Win32
+		{2F2003C6-D19E-439D-8519-6BFCD7E58E6B}.Debug|x64.ActiveCfg = Debug|x64
+		{2F2003C6-D19E-439D-8519-6BFCD7E58E6B}.Debug|x64.Build.0 = Debug|x64
+		{2F2003C6-D19E-439D-8519-6BFCD7E58E6B}.Release|Win32.ActiveCfg = Release|Win32
+		{2F2003C6-D19E-439D-8519-6BFCD7E58E6B}.Release|Win32.Build.0 = Release|Win32
+		{2F2003C6-D19E-439D-8519-6BFCD7E58E6B}.Release|x64.ActiveCfg = Release|x64
+		{2F2003C6-D19E-439D-8519-6BFCD7E58E6B}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

Index: trunk/MgDev/Web/src/viewerfiles
===================================================================
--- trunk/MgDev/Web/src/viewerfiles	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/Web/src/viewerfiles	2020-08-04 12:00:10 UTC (rev 9699)

Property changes on: trunk/MgDev/Web/src/viewerfiles
___________________________________________________________________
Modified: svn:mergeinfo
## -7,4 +7,5 ##
 /sandbox/jng/clean_json/Web/src/viewerfiles:8818-9180
 /sandbox/jng/createruntimemap/Web/src/viewerfiles:7486-7555
 /sandbox/jng/layer_bbox_toggle/Web/src/viewerfiles:9635-9643
+/sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles:9678-9698
 /sandbox/jng/v30/Web/src/viewerfiles:8226-8227
\ No newline at end of property
Copied: trunk/MgDev/Web/src/viewerfiles/ol.css (from rev 9698, sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.css)
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ol.css	                        (rev 0)
+++ trunk/MgDev/Web/src/viewerfiles/ol.css	2020-08-04 12:00:10 UTC (rev 9699)
@@ -0,0 +1,2 @@
+.ol-box{box-sizing:border-box;border-radius:2px;border:2px solid #00f}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:rgba(0,60,136,.3);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid #eee;border-top:none;color:#eee;font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-step-marker{width:1px;height:15px;background-color:#000;float:right;z-Index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:12px;z-Index:11;color:#000;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.ol-scale-text{position:absolute;font-size:14px;text-align:center;bottom:25px;color:#000;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.ol-scale-singlebar{position:relative;height:10px;z-Index:9;box-sizing:border-box;border:1px solid #000}.ol-unsupported{display:none}.ol-unselectable,.ol-viewport{-we
 bkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:rgba(255,255,255,.4);border-radius:4px;padding:2px}.ol-control:hover{background-color:rgba(255,255,255,.6)}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-size:1.14em;font-weight:700;text-decoration:none;text-align
 :center;height:1.375em;width:1.375em;line-height:.4em;background-color:rgba(0,60,136,.5);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;font-size:1.2em;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:focus,.ol-control button:hover{text-decoration:none;background-color:rgba(0,60,136,.7)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em)}.ol-attribution ul{margin:0;padding:0 .5em;color:#000;text-shadow:0 0 2px #fff}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button,.ol-attribution ul{display:inline-block}.ol-attrib
 ution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:inline-block}.ol-overviewmap .ol-overviewmap-map{border:1px solid #7b98bc;height:150px;margin:2px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:1px;left:2px;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-overviewmap-box{border:
 2px dotted rgba(0,60,136,.7)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}
+/*# sourceMappingURL=ol.css.map */
\ No newline at end of file

Copied: trunk/MgDev/Web/src/viewerfiles/ol.css.map (from rev 9698, sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.css.map)
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ol.css.map	                        (rev 0)
+++ trunk/MgDev/Web/src/viewerfiles/ol.css.map	2020-08-04 12:00:10 UTC (rev 9699)
@@ -0,0 +1 @@
+{"version":3,"sources":["src/ol/ol.css"],"names":[],"mappings":"AAAA,QACE,WAAY,WACZ,cAAe,IACf,OAAQ,IAAI,MAAM,KAGpB,mBACE,IAAK,IACL,MAAO,IACP,SAAU,SAGZ,eACE,WAAY,kBACZ,cAAe,IACf,OAAQ,IACR,KAAM,IACN,QAAS,IACT,SAAU,SAEZ,qBACE,OAAQ,IAAI,MAAM,KAClB,WAAY,KACZ,MAAO,KACP,UAAW,KACX,WAAY,OACZ,OAAQ,IACR,YAAa,QAAQ,CAAE,MACvB,WAAY,IAAI,KAElB,cACE,SAAU,SACV,OAAQ,IACR,KAAM,IAER,sBACE,MAAO,IACP,OAAQ,KACR,iBAAkB,KAClB,MAAO,MACP,QAAS,GAEX,oBACE,SAAU,SACV,OAAQ,KACR,UAAW,KACX,QAAS,GACT,MAAO,KACP,YAAa,KAAK,EAAE,IAAO,CAAE,EAAE,IAAI,IAAO,CAAE,IAAI,EAAE,IAAO,CAAE,EAAE,KAAK,KAEpE,eACE,SAAU,SACV,UAAW,KACX,WAAY,OACZ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zB,gBACE,WAAY,MACZ,OAAQ,KACR,MAAO,KACP,UAAW,mBAGb,mBACE,OAAQ,EACR,QAAS,EAAE,KACX,MAAO,KACP,YAAa,EAAE,EAAE,IAAI,KAEvB,mBACE,QAAS,OACT,WAAY,KAEd,0CACE,QAAS,IAEX,oBACE,WAAY,IACZ,UAAW,QACX,eAAgB,OAEE,uBAApB,mBACE,QAAS,aAEX,gCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,iCACE,OAAQ,EACR,MAAO,EACP,cAAe,IAAI,EAAE,EAEvB,qCACE,WAAY,MACZ,WAAY,MA
 Ed,wCACE,QAAS,KAGX,eACE,IAAK,MACL,KAAM,KACN,OAAQ,MAEV,sBACE,SAAU,SACV,OAAQ,KAGV,yBACE,IAAK,MAGP,gBACE,KAAM,KACN,OAAQ,KAEV,iCACE,OAAQ,EACR,KAAM,EACN,cAAe,EAAE,IAAI,EAAE,EAEzB,oCACA,uBACE,QAAS,aAEX,oCACE,OAAQ,IAAI,MAAM,QAClB,OAAQ,MACR,OAAQ,IACR,MAAO,MAET,0CACE,OAAQ,IACR,KAAM,IACN,SAAU,SAEZ,iDACA,wCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,oBACE,OAAQ,IAAI,OAAO,kBAGrB,0CACE,OAAQ"}
\ No newline at end of file

Copied: trunk/MgDev/Web/src/viewerfiles/ol.js (from rev 9698, sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.js)
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ol.js	                        (rev 0)
+++ trunk/MgDev/Web/src/viewerfiles/ol.js	2020-08-04 12:00:10 UTC (rev 9699)
@@ -0,0 +1,9 @@
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ol=e():t.ol=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default
 }:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=10)}([function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return $})),r.d(e,"b",(function(){return _r})),r.d(e,"c",(function(){return Kr})),r.d(e,"d",(function(){return hr})),r.d(e,"e",(function(){return Hr})),r.d(e,"f",(function(){return i}));var i={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",e
 xample:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"whi
 te",intensity:.4}},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https:
 //en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_g
 eojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profil
 e is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `ht
 tps:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},sche
 me:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the f
 ollowing order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rg
 b for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification toleran
 ce (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom feat
 ures are not clustered)."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for t
 he geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc
 :"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic funct
 ionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `backgrou
 nd`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-ex
 trusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed."
 ,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"vis
 ible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basi
 c functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2
 ,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpola
 ted:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"
 `line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functi
 onality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first.  When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to t
 he viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",d
 efault:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"pro
 perty-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"fact
 or of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic func
 tionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},e
 xpression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",
 {"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is p
 laced closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"prope
 rty-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0"
 ,ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:
 !1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,
 units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property
 -type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"
 property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"
 The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",value
 s:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.
 6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orienta
 tion. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol 
 collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic func
 tionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, th
 e text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant
 "},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:
 {type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature
  geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the fu
 nction input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the fol
 lowing circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Bin
 ds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-supp
 ort":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise."
 ,group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `["get", "building_type"]`). Each label must be either:\n - a single literal value; or\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `["c", "b"]`). The input matches if any of the values in the array matches, similar to the `"in"` operator.\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"
 6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just les
 s than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth
  results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multip
 le values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one
  is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expr
 ession. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image nam
 e or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`
 . If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc
 39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are pro
 vided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another
  object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object.  Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the reque
 sted property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level.  Note that in style layout and paint properties, ["zoom"] may only appea
 r as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0"}}},"+":{doc:"Return
 s the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the f
 irst input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the in
 put.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{
 js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJ
 SON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise.
  The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0
 .41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Ca
 ses where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0"
 ,macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc
 :"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String"
 ,"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale bei
 ng used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (e
 xtruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{i
 nterpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios
 :"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functiona
 lity":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{i
 nterpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expressio
 n:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectivel
 y.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-suppo
 rt":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0
 ",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}
 ,"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of referenc
 e for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpo
 lated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},exp
 ression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must 
 be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius."
 ,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interp
 olated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The cir
 cle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pit
 ched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"prope
 rty-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,d
 oc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalbl
 ue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-
 driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["
 zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transit
 ion:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-suppo
 rt":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0
 ",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:[
 "zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster
 :{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"numbe
 r",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation 
 method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"
 number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",de
 fault:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorg
 es.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!
 1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, i
 ts values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}};var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function a(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function s(t,e){return t(e={exports:{}},e.exports),e.exports}var u=s((function(t,e){!function(r){var n=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,a
 ="object"==typeof o&&o;a.global!==a&&a.window!==a&&a.self!==a||(r=a);var s,u,l=2147483647,h=/^xn--/,c=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,g=String.fromCharCode;function y(t){throw RangeError(f[t])}function m(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function v(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+m((t=t.replace(p,".")).split("."),e).join(".")}function _(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function b(t){return m(t,(function(t){var e="";return t>65535&&(e+=g((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=g(t)})).join("")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function w(t,e,r){var n=0;for(t=r?d(t/7
 00):t>>1,t+=d(t/e);t>455;n+=36)t=d(t/35);return d(n+36*t/(t+38))}function S(t){var e,r,n,i,o,a,s,u,h,c,p,f=[],g=t.length,m=0,v=128,_=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&y("not-basic"),f.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<g;){for(o=m,a=1,s=36;i>=g&&y("invalid-input"),((u=(p=t.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||u>d((l-m)/a))&&y("overflow"),m+=u*a,!(u<(h=s<=_?1:s>=_+26?26:s-_));s+=36)a>d(l/(c=36-h))&&y("overflow"),a*=c;_=w(m-o,e=f.length+1,0==o),d(m/e)>l-v&&y("overflow"),v+=d(m/e),m%=e,f.splice(m++,0,v)}return b(f)}function T(t){var e,r,n,i,o,a,s,u,h,c,p,f,m,v,b,S=[];for(f=(t=_(t)).length,e=128,r=0,o=72,a=0;a<f;++a)(p=t[a])<128&&S.push(g(p));for(n=i=S.length,i&&S.push("-");n<f;){for(s=l,a=0;a<f;++a)(p=t[a])>=e&&p<s&&(s=p);for(s-e>d((l-r)/(m=n+1))&&y("overflow"),r+=(s-e)*m,e=s,a=0;a<f;++a)if((p=t[a])<e&&++r>l&&y("overflow"),p==e){for(u=r,h=36;!(u<(c=h<=o?1:h>=o+26?26:h-o));h+=36)b=u-c,v=36-c,S.push(g(x(c+b%v,0))),u=d(
 b/v);S.push(g(x(u,0))),o=w(r,m,n==i),r=0,++n}++r,++e}return S.join("")}if(s={version:"1.3.2",ucs2:{decode:_,encode:b},decode:S,encode:T,toASCII:function(t){return v(t,(function(t){return c.test(t)?"xn--"+T(t):t}))},toUnicode:function(t){return v(t,(function(t){return h.test(t)?S(t.slice(4).toLowerCase()):t}))}},n&&i)if(t.exports==n)i.exports=s;else for(u in s)s.hasOwnProperty(u)&&(n[u]=s[u]);else r.punycode=s}(o)})),l=function(t){return"string"==typeof t},h=function(t){return"object"==typeof t&&null!==t},c=function(t){return null===t},p=function(t){return null==t};function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var d=function(t,e,r,n){e=e||"&",r=r||"=";var i={};if("string"!=typeof t||0===t.length)return i;var o=/\+/g;t=t.split(e);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var s=t.length;a>0&&s>a&&(s=a);for(var u=0;u<s;++u){var l,h,c,p,d=t[u].replace(o,"%20"),g=d.indexOf(r);g>=0?(l=d.substr(0,g),h=d.substr(g+1)):(l=d,h=""),c=decodeURIComponent(l),p=decode
 URIComponent(h),f(i,c)?Array.isArray(i[c])?i[c].push(p):i[c]=[i[c],p]:i[c]=p}return i},g=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},y=function(t,e,r,n){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(n){var i=encodeURIComponent(g(n))+r;return Array.isArray(t[n])?t[n].map((function(t){return i+encodeURIComponent(g(t))})).join(e):i+encodeURIComponent(g(t[n]))})).join(e):n?encodeURIComponent(g(n))+r+encodeURIComponent(g(t)):""},m=s((function(t,e){e.decode=e.parse=d,e.encode=e.stringify=y}));m.decode,m.parse,m.encode,m.stringify;function v(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var _=/^([a-z0-9.+-]+:)/i,b=/:[0-9]*$/,x=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w=["{","}","|","\\","^","`"].
 concat(["<",">",'"',"`"," ","\r","\n","\t"]),S=["'"].concat(w),T=["%","/","?",";","#"].concat(S),E=["/","?","#"],C=/^[+a-z0-9A-Z_-]{0,63}$/,P=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,R={javascript:!0,"javascript:":!0},O={javascript:!0,"javascript:":!0},I={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function L(t,e,r){if(t&&h(t)&&t instanceof v)return t;var n=new v;return n.parse(t,e,r),n}v.prototype.parse=function(t,e,r){if(!l(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=-1!==n&&n<t.indexOf("#")?"?":"#",o=t.split(i);o[0]=o[0].replace(/\\/g,"/");var a=t=o.join(i);if(a=a.trim(),!r&&1===t.split("#").length){var s=x.exec(a);if(s)return this.path=a,this.href=a,this.pathname=s[1],s[2]?(this.search=s[2],this.query=e?m.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var h=_.exec(a);if(h){var c=(h=h[0]).toLowerCase();this.protocol=c,a=a.substr(h.length)}
 if(r||h||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var p="//"===a.substr(0,2);!p||h&&O[h]||(a=a.substr(2),this.slashes=!0)}if(!O[h]&&(p||h&&!I[h])){for(var f,d,g=-1,y=0;y<E.length;y++){-1!==(v=a.indexOf(E[y]))&&(-1===g||v<g)&&(g=v)}-1!==(d=-1===g?a.lastIndexOf("@"):a.lastIndexOf("@",g))&&(f=a.slice(0,d),a=a.slice(d+1),this.auth=decodeURIComponent(f)),g=-1;for(y=0;y<T.length;y++){var v;-1!==(v=a.indexOf(T[y]))&&(-1===g||v<g)&&(g=v)}-1===g&&(g=a.length),this.host=a.slice(0,g),a=a.slice(g),this.parseHost(),this.hostname=this.hostname||"";var b="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!b)for(var w=this.hostname.split(/\./),L=(y=0,w.length);y<L;y++){var M=w[y];if(M&&!M.match(C)){for(var F="",A=0,k=M.length;A<k;A++)M.charCodeAt(A)>127?F+="x":F+=M[A];if(!F.match(C)){var N=w.slice(0,y),j=w.slice(y+1),G=M.match(P);G&&(N.push(G[1]),j.unshift(G[2])),j.length&&(a="/"+j.join(".")+a),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=thi
 s.hostname.toLowerCase(),b||(this.hostname=u.toASCII(this.hostname));var D=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+D,this.href+=this.host,b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!R[c])for(y=0,L=S.length;y<L;y++){var U=S[y];if(-1!==a.indexOf(U)){var B=encodeURIComponent(U);B===U&&(B=escape(U)),a=a.split(U).join(B)}}var Y=a.indexOf("#");-1!==Y&&(this.hash=a.substr(Y),a=a.slice(0,Y));var V=a.indexOf("?");if(-1!==V?(this.search=a.substr(V),this.query=a.substr(V+1),e&&(this.query=m.parse(this.query)),a=a.slice(0,V)):e&&(this.search="",this.query={}),a&&(this.pathname=a),I[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var W=this.search||"";this.path=D+W}return this.href=this.format(),this},v.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o=
 "";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&h(this.query)&&Object.keys(this.query).length&&(o=m.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||I[e])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),e+i+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+n},v.prototype.resolve=function(t){return this.resolveObject(L(t,!1,!0)).format()},v.prototype.resolveObject=function(t){if(l(t)){var e=new v;e.parse(t,!1,!0),t=e}for(var r=new v,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),s=0;s<a.length;s++){var u=a[s];"protocol"!==u&&(r[u]=t[u])}return I[r.protocol]&&r.hostn
 ame&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!I[t.protocol]){for(var h=Object.keys(t),f=0;f<h.length;f++){var d=h[f];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||O[t.protocol])r.pathname=t.pathname;else{for(var g=(t.pathname||"").split("/");g.length&&!(t.host=g.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==g[0]&&g.unshift(""),g.length<2&&g.unshift(""),r.pathname=g.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var y=r.pathname||"",m=r.search||"";r.path=y+m}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var _=r.pathname&&"/"===r.pathname.charAt(0),b=t.host||t.pathname&&"/"===t.pathname.charAt(0),x=b||_||r.host&&t.pathname,w=x,S=r.pathname&&r.pathname.split("/")||[],T=(g=t.pathname&&t.pathname.split("/")||[],r.protocol&&!I[r.protocol]);if(T&&(r.hostname="",r.port=null,r.host&&
 (""===S[0]?S[0]=r.host:S.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===g[0]?g[0]=t.host:g.unshift(t.host)),t.host=null),x=x&&(""===g[0]||""===S[0])),b)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,S=g;else if(g.length)S||(S=[]),S.pop(),S=S.concat(g),r.search=t.search,r.query=t.query;else if(!p(t.search)){if(T)r.hostname=r.host=S.shift(),(L=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=L.shift(),r.host=r.hostname=L.shift());return r.search=t.search,r.query=t.query,c(r.pathname)&&c(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=S.slice(-1)[0],C=(r.host||t.host||S.length>1)&&("."===E||".."===E)||""===E,P=0,R=S.length;R>=0;R--)"."===(E=S[R])?S.splice(R,1):".."===E?(S.splice(R,1),P++):P&&(S.splice(R,
 1),P--);if(!x&&!w)for(;P--;P)S.unshift("..");!x||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),C&&"/"!==S.join("/").substr(-1)&&S.push("");var L,M=""===S[0]||S[0]&&"/"===S[0].charAt(0);T&&(r.hostname=r.host=M?"":S.length?S.shift():"",(L=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=L.shift(),r.host=r.hostname=L.shift()));return(x=x||r.host&&S.length)&&!M&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),c(r.pathname)&&c(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},v.prototype.parseHost=function(){var t=this.host,e=b.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};function M(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var o=i[n];for(var a in o)t[a]=o[a]}return t}var F=function(t){function e(e,r){t.call(this,r),this.message=r,
 this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),A=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r<n.length;r+=1){var i=n[r],o=i[0],a=i[1];this.bindings[o]=a}};A.prototype.concat=function(t){return new A(this,t)},A.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},A.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var k={kind:"null"},N={kind:"number"},j={kind:"string"},G={kind:"boolean"},D={kind:"color"},z={kind:"object"},U={kind:"value"},B={kind:"collator"},Y={kind:"formatted"},V={kind:"resolvedImage"};function W(t,e){return{kind:"array",itemType:t,N:e}}function q(t){if("array"===t.kind){var e=q(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var X=[k,N,j,G,D,Y,z,W(U)
 ,V];function Z(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Z(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,n=X;r<n.length;r+=1){if(!Z(n[r],e))return null}}return"Expected "+q(t)+" but found "+q(e)+" instead."}function K(t,e){return e.some((function(e){return e.kind===t.kind}))}function H(t,e){return e.some((function(e){return"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t}))}var J=s((function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],char
 treuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],gre
 en:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblu
 e:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray
 :[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function a(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in r)return r[i].slice();if("#"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))
 >=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=i.indexOf("("),l=i.indexOf(")");if(-1!==u&&l+1===i.length){var h=i.substr(0,u),c=i.substr(u+1,l-(u+1)).split(","),p=1;switch(h){case"rgba":if(4!==c.length)return null;p=a(c.pop());case"rgb":return 3!==c.length?null:[o(c[0]),o(c[1]),o(c[2]),p];case"hsla":if(4!==c.length)return null;p=a(c.pop());case"hsl":if(3!==c.length)return null;var f=(parseFloat(c[0])%360+360)%360/360,d=a(c[1]),g=a(c[2]),y=g<=.5?g*(d+1):g+d-g*d,m=2*g-y;return[n(255*s(m,y,f+1/3)),n(255*s(m,y,f)),n(255*s(m,y,f-1/3)),p];default:return null}}return null}}catch(t){}})).parseCSSColor,$=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};$.parse=function(t){if(t){if(t instanceof $)return t;if("string"==typeof t){var e=J(t);if(e)return new $(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},$.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(n)
 +","+i+")"},$.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]},$.black=new $(0,0,0,1),$.white=new $(1,1,1,1),$.transparent=new $(0,0,0,0),$.red=new $(1,0,0,1);var Q=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Q.prototype.compare=function(t,e){return this.collator.compare(t,e)},Q.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var tt=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},et=function(t){this.sections=t};et.fromString=function(t){return new et([new tt(t,null,null,null,null)])},et.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},et.factory=fun
 ction(t){return t instanceof et?t:et.fromString(t)},et.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},et.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var n=r[e];if(n.image)t.push(["image",n.image.name]);else{t.push(n.text);var i={};n.fontStack&&(i["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(i["font-scale"]=n.scale),n.textColor&&(i["text-color"]=["rgba"].concat(n.textColor.toArray())),t.push(i)}}return t};var rt=function(t){this.name=t.name,this.available=t.available};function nt(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function it(t
 ){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof $)return!0;if(t instanceof Q)return!0;if(t instanceof et)return!0;if(t instanceof rt)return!0;if(Array.isArray(t)){for(var e=0,r=t;e<r.length;e+=1){if(!it(r[e]))return!1}return!0}if("object"==typeof t){for(var n in t)if(!it(t[n]))return!1;return!0}return!1}function ot(t){if(null===t)return k;if("string"==typeof t)return j;if("boolean"==typeof t)return G;if("number"==typeof t)return N;if(t instanceof $)return D;if(t instanceof Q)return B;if(t instanceof et)return Y;if(t instanceof rt)return V;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n<i.length;n+=1){var o=ot(i[n]);if(e){if(e===o)continue;e=U;break}e=o}return W(e||U,r)}return z}function at(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof $||t instanceof et||t instanceof rt?t.toString():JSON.stringify(t)}rt.prototype.toString=function(){return 
 this.name},rt.fromString=function(t){return t?new rt({name:t,available:!1}):null},rt.prototype.serialize=function(){return["image",this.name]};var st=function(t,e){this.type=t,this.value=e};st.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!it(t[1]))return e.error("invalid value");var r=t[1],n=ot(r),i=e.expectedType;return"array"!==n.kind||0!==n.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(n=i),new st(n,r)},st.prototype.evaluate=function(){return this.value},st.prototype.eachChild=function(){},st.prototype.outputDefined=function(){return!0},st.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof $?["rgba"].concat(this.value.toArray()):this.value instanceof et?this.value.serialize():this.value};var ut=function(t){this.name="ExpressionEvaluationError",this.message=t};ut.prototype.toJSON=function()
 {return this.message};var lt={string:j,number:N,boolean:G,object:z},ht=function(t,e){this.type=t,this.args=e};ht.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r,n=1,i=t[0];if("array"===i){var o,a;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in lt)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=lt[s],n++}else o=U;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],n++}r=W(o,a)}else r=lt[i];for(var u=[];n<t.length;n++){var l=e.parse(t[n],n,U);if(!l)return null;u.push(l)}return new ht(r,u)},ht.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!Z(this.type,ot(r)))return r;if(e===this.args.length-1)throw new ut("Expected value to be of type "+q(this.type)+", but found "+q(ot(r))+" instead.")}return nu
 ll},ht.prototype.eachChild=function(t){this.args.forEach(t)},ht.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},ht.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);var n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var ct=function(t){this.type=Y,this.sections=t};ct.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var n=[],i=!1,o=1;o<=t.length-1;++o){var a=t[o];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,N)))return null;var u=null;if(a["text-font"]&&!(u=e.parse(a["text-font"],1,W(j))))return null;var l=null;if(a
 ["text-color"]&&!(l=e.parse(a["text-color"],1,D)))return null;var h=n[n.length-1];h.scale=s,h.font=u,h.textColor=l}else{var c=e.parse(t[o],1,U);if(!c)return null;var p=c.type.kind;if("string"!==p&&"value"!==p&&"null"!==p&&"resolvedImage"!==p)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:c,scale:null,font:null,textColor:null})}}return new ct(n)},ct.prototype.evaluate=function(t){return new et(this.sections.map((function(e){var r=e.content.evaluate(t);return ot(r)===V?new tt("",r,null,null,null):new tt(at(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},ct.prototype.eachChild=function(t){for(var e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t(n.content),n.scale&&t(n.scale),n.font&&t(n.font),n.textColor&&t(n.textColor)}},ct.prototype.outputDefined=function(){return!1},ct.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.l
 ength;e+=1){var n=r[e];t.push(n.content.serialize());var i={};n.scale&&(i["font-scale"]=n.scale.serialize()),n.font&&(i["text-font"]=n.font.serialize()),n.textColor&&(i["text-color"]=n.textColor.serialize()),t.push(i)}return t};var pt=function(t){this.type=V,this.input=t};pt.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,j);return r?new pt(r):e.error("No image name provided.")},pt.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=rt.fromString(e);return r&&t.availableImages&&(r.available=t.availableImages.indexOf(e)>-1),r},pt.prototype.eachChild=function(t){t(this.input)},pt.prototype.outputDefined=function(){return!1},pt.prototype.serialize=function(){return["image",this.input.serialize()]};var ft={"to-boolean":G,"to-color":D,"to-number":N,"to-string":j},dt=function(t,e){this.type=t,this.args=e};dt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-s
 tring"===r)&&2!==t.length)return e.error("Expected one argument.");for(var n=ft[r],i=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,U);if(!a)return null;i.push(a)}return new dt(n,i)},dt.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,r,n=0,i=this.args;n<i.length;n+=1){if(r=null,(e=i[n].evaluate(t))instanceof $)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":nt(e[0],e[1],e[2],e[3])))return new $(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ut(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,u=this.args;s<u.length;s+=1){if(null===(a=u[s].evaluate(t)))return 0;var l=Number(a);if(!isNaN(l))return l}throw new ut("Could not conver
 t "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?et.fromString(at(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?rt.fromString(at(this.args[0].evaluate(t))):at(this.args[0].evaluate(t))},dt.prototype.eachChild=function(t){this.args.forEach(t)},dt.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},dt.prototype.serialize=function(){if("formatted"===this.type.kind)return new ct([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new pt(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var gt=["Unknown","Point","LineString","Polygon"],yt=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};yt.prototype.id=function(){return this.feature&&"id"in this.feature?th
 is.feature.id:null},yt.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?gt[this.feature.type]:this.feature.type:null},yt.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},yt.prototype.canonicalID=function(){return this.canonical},yt.prototype.properties=function(){return this.feature&&this.feature.properties||{}},yt.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=$.parse(t)),e};var mt=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n};mt.prototype.evaluate=function(t){return this._evaluate(t,this.args)},mt.prototype.eachChild=function(t){this.args.forEach(t)},mt.prototype.outputDefined=function(){return!1},mt.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},mt.parse=function(t,e){var r,n=t[0],i=mt.definitions[n];if(!i)return e.error('Unknown expression "'+n
 +'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=a.filter((function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1})),u=null,l=0,h=s;l<h.length;l+=1){var c=h[l],p=c[0],f=c[1];u=new Dt(e.registry,e.path,null,e.scope);for(var d=[],g=!1,y=1;y<t.length;y++){var m=t[y],v=Array.isArray(p)?p[y-1]:p.type,_=u.parse(m,1+d.length,v);if(!_){g=!0;break}d.push(_)}if(!g)if(Array.isArray(p)&&p.length!==d.length)u.error("Expected "+p.length+" arguments, but found "+d.length+" instead.");else{for(var b=0;b<d.length;b++){var x=Array.isArray(p)?p[b]:p.type,w=d[b];u.concat(b+1).checkSubtype(x,w.type)}if(0===u.errors.length)return new mt(n,o,f,d)}}if(1===s.length)(r=e.errors).push.apply(r,u.errors);else{for(var S=(s.length?s:a).map((function(t){var e,r=t[0];return e=r,Array.isArray(e)?"("+e.map(q).join(", ")+")":"("+q(e.type)+"...)"})).join(" | "),T=[],E=1;E<t.length;E++){var C=e.parse(t[E],
 1+T.length);if(!C)return null;T.push(q(C.type))}e.error("Expected arguments of type "+S+", but found ("+T.join(", ")+") instead.")}return null},mt.register=function(t,e){for(var r in mt.definitions=e,e)t[r]=mt};var vt=function(t,e,r){this.type=B,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};vt.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var n=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,G);if(!n)return null;var i=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,G);if(!i)return null;var o=null;return r.locale&&!(o=e.parse(r.locale,1,j))?null:new vt(n,i,o)},vt.prototype.evaluate=function(t){return new Q(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},vt.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensit
 ive),this.locale&&t(this.locale)},vt.prototype.outputDefined=function(){return!1},vt.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};function _t(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function bt(t,e){return!(t[0]<=e[0])&&(!(t[2]>=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function xt(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),o=Math.pow(2,e.z);return[Math.round(n*o*8192),Math.round(i*o*8192)]}function wt(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function St(t,e){for(var r,n,i,o,a,s,u,l=!1,h=0,c=e.length;h<c;h++)for(var p=e[h],f=0,d=p.length;f<d-1;f++){if(r=t,n=p[f],i=p[f+1],o=void 0,a=void 0,s=void 0,u=void 0,o=r[0]-n[0],a=r[1]-n[1],s=r[0]-i[0],u=r[
 1]-i[1],o*u-s*a==0&&o*s<=0&&a*u<=0)return!1;wt(t,p[f],p[f+1])&&(l=!l)}return l}function Tt(t,e){for(var r=0;r<e.length;r++)if(St(t,e[r]))return!0;return!1}function Et(t,e,r,n){var i=t[0]-r[0],o=t[1]-r[1],a=e[0]-r[0],s=e[1]-r[1],u=n[0]-r[0],l=n[1]-r[1],h=i*l-u*o,c=a*l-u*s;return h>0&&c<0||h<0&&c>0}function Ct(t,e,r){for(var n=0,i=r;n<i.length;n+=1)for(var o=i[n],a=0;a<o.length-1;++a)if(s=t,u=e,l=o[a],h=o[a+1],c=void 0,p=void 0,f=void 0,d=void 0,f=[u[0]-s[0],u[1]-s[1]],d=[h[0]-l[0],h[1]-l[1]],0!=(c=d)[0]*(p=f)[1]-c[1]*p[0]&&Et(s,u,l,h)&&Et(l,h,s,u))return!0;var s,u,l,h,c,p,f,d;return!1}function Pt(t,e){for(var r=0;r<t.length;++r)if(!St(t[r],e))return!1;for(var n=0;n<t.length-1;++n)if(Ct(t[n],t[n+1],e))return!1;return!0}function Rt(t,e){for(var r=0;r<e.length;r++)if(Pt(t,e[r]))return!0;return!1}function Ot(t,e,r){for(var n=[],i=0;i<t.length;i++){for(var o=[],a=0;a<t[i].length;a++){var s=xt(t[i][a],r);_t(e,s),o.push(s)}n.push(o)}return n}function It(t,e,r){for(var n=[],i=0;i<t.length;i+
 +){var o=Ot(t[i],e,r);n.push(o)}return n}function Lt(t,e,r,n){if(t[0]<r[0]||t[0]>r[2]){var i=.5*n,o=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===o&&(o=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=o}_t(e,t)}function Mt(t,e,r,n){for(var i=8192*Math.pow(2,n.z),o=[8192*n.x,8192*n.y],a=[],s=0,u=t;s<u.length;s+=1)for(var l=0,h=u[s];l<h.length;l+=1){var c=h[l],p=[c.x+o[0],c.y+o[1]];Lt(p,e,r,i),a.push(p)}return a}function Ft(t,e,r,n){for(var i,o=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],s=[],u=0,l=t;u<l.length;u+=1){for(var h=[],c=0,p=l[u];c<p.length;c+=1){var f=p[c],d=[f.x+a[0],f.y+a[1]];_t(e,d),h.push(d)}s.push(h)}if(e[2]-e[0]<=o/2){(i=e)[0]=i[1]=1/0,i[2]=i[3]=-1/0;for(var g=0,y=s;g<y.length;g+=1)for(var m=0,v=y[g];m<v.length;m+=1){Lt(v[m],e,r,o)}}return s}var At=function(t,e){this.type=G,this.geojson=t,this.geometries=e};function kt(t){if(t instanceof mt){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.n
 ame||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof At)return!1;var e=!0;return t.eachChild((function(t){e&&!kt(t)&&(e=!1)})),e}function Nt(t){if(t instanceof mt&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild((function(t){e&&!Nt(t)&&(e=!1)})),e}function jt(t,e){if(t instanceof mt&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild((function(t){r&&!jt(t,e)&&(r=!1)})),r}At.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(it(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var n=0;n<r.features.length;++n){var i=r.features[n].geometry.type;if("Polygon"===i||"MultiPolygon"===i)return new At(r,r.features[n].geometry)}else if("Feature"===r.type){var o=r.geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new At(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new At(r,r)}return e.error(
 "'within' expression requires valid geojson object that contains polygon geometry type.")},At.prototype.evaluate=function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){var o=Ot(e.coordinates,n,i),a=Mt(t.geometry(),r,n,i);if(!bt(r,n))return!1;for(var s=0,u=a;s<u.length;s+=1){if(!St(u[s],o))return!1}}if("MultiPolygon"===e.type){var l=It(e.coordinates,n,i),h=Mt(t.geometry(),r,n,i);if(!bt(r,n))return!1;for(var c=0,p=h;c<p.length;c+=1){if(!Tt(p[c],l))return!1}}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){var o=Ot(e.coordinates,n,i),a=Ft(t.geometry(),r,n,i);if(!bt(r,n))return!1;for(var s=0,u=a;s<u.length;s+=1){if(!Pt(u[s],o))return!1}}if("MultiPolygon"===e.type){var l=It(e.coordinates,n,i),h=Ft(t.geometry(),r,n,i);if(!bt(
 r,n))return!1;for(var c=0,p=h;c<p.length;c+=1){if(!Rt(p[c],l))return!1}}return!0}(t,this.geometries)}return!1},At.prototype.eachChild=function(){},At.prototype.outputDefined=function(){return!0},At.prototype.serialize=function(){return["within",this.geojson]};var Gt=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Gt.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new Gt(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},Gt.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Gt.prototype.eachChild=function(){},Gt.prototype.outputDefined=function(){return!1},Gt.prototype.serialize=function(){return["var",this.name]};var Dt=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new A),void 0===i&&(i=[]),this.registry=t,this.path=e,this.k
 ey=e.map((function(t){return"["+t+"]"})).join(""),this.scope=n,this.errors=i,this.expectedType=r};function zt(t,e){for(var r,n,i=t.length-1,o=0,a=i,s=0;o<=a;)if(r=t[s=Math.floor((o+a)/2)],n=t[s+1],r<=e){if(s===i||e<n)return s;o=s+1}else{if(!(r>e))throw new ut("Input is not a number.");a=s-1}return 0}Dt.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},Dt.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new ht(e,[t]):"coerce"===r?new dt(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var o=i.par
 se(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=r(o,a,e.typeAnnotation||"coerce");else o=r(o,a,e.typeAnnotation||"assert")}if(!(o instanceof st)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof Gt)return t(e.boundExpression);if(e instanceof mt&&"error"===e.name)return!1;if(e instanceof vt)return!1;if(e instanceof At)return!1;var r=e instanceof dt||e instanceof ht,n=!0;if(e.eachChild((function(e){n=r?n&&t(e):n&&e instanceof st})),!n)return!1;return kt(e)&&jt(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var u=new yt;try{o=new st(o.type,o.evaluate(u))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expre
 ssion "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Dt.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new Dt(this.registry,n,e||null,i,this.errors)},Dt.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new F(n,t))},Dt.prototype.checkSubtype=function(t,e){var r=Z(t,e);return r&&this.error(r),r};var Ut=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n<i.length;n+=1){var o=i[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};Ut.parse=function(t,e){if(t.length-1<4)return e.error("Expected 
 at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");var r=e.parse(t[1],1,N);if(!r)return null;var n=[],i=null;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var o=1;o<t.length;o+=2){var a=1===o?-1/0:t[o],s=t[o+1],u=o,l=o+1;if("number"!=typeof a)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',u);if(n.length&&n[n.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var h=e.parse(s,l,i);if(!h)return null;i=i||h.type,n.push([a,h])}return new Ut(i,r,n)},Ut.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[zt(e,n)].evaluate(t)}
 ,Ut.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e])}},Ut.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},Ut.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Bt=Yt;function Yt(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}function Vt(t,e,r){return t*(1-r)+e*r}Yt.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},Yt.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},Yt.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},Yt.prototype.solveCurveX=function(t,e){var r,n,i,o,a;for(void 0===e&&(e=1e-6),i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,M
 ath.abs(o)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=o/s}if((i=t)<(r=0))return r;if(i>(n=1))return n;for(;r<n;){if(o=this.sampleCurveX(i),Math.abs(o-t)<e)return i;t>o?r=i:n=i,i=.5*(n-r)+r}return i},Yt.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var Wt=Object.freeze({__proto__:null,number:Vt,color:function(t,e,r){return new $(Vt(t.r,e.r,r),Vt(t.g,e.g,r),Vt(t.b,e.b,r),Vt(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return Vt(t,e[n],r)}))}}),qt=6/29,Xt=3*qt*qt,Zt=Math.PI/180,Kt=180/Math.PI;function Ht(t){return t>.008856451679035631?Math.pow(t,1/3):t/Xt+4/29}function Jt(t){return t>qt?t*t*t:Xt*(t-4/29)}function $t(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Qt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function te(t){var e=Qt(t.r),r=Qt(t.g),n=Qt(t.b),i=Ht((.4124564*e+.3575761*r+.1804375*n)/.95047),o=Ht((.2126729*e+.7151522*r+.072175*n)/1);return{l:11
 6*o-16,a:500*(i-o),b:200*(o-Ht((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function ee(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*Jt(e),r=.95047*Jt(r),n=1.08883*Jt(n),new $($t(3.2404542*r-1.5371385*e-.4985314*n),$t(-.969266*r+1.8760108*e+.041556*n),$t(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function re(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var ne={forward:te,reverse:ee,interpolate:function(t,e,r){return{l:Vt(t.l,e.l,r),a:Vt(t.a,e.a,r),b:Vt(t.b,e.b,r),alpha:Vt(t.alpha,e.alpha,r)}}},ie={forward:function(t){var e=te(t),r=e.l,n=e.a,i=e.b,o=Math.atan2(i,n)*Kt;return{h:o<0?o+360:o,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*Zt,r=t.c;return ee({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:re(t.h,e.h,r),c:Vt(t.c,e.c,r),l:Vt(t.l,e.l,r),alpha:Vt(t.alpha,e.alpha,r)}}},oe=Object.freeze({__proto__:null,lab:ne,hcl:ie}),ae=function(t,e,r,n,i){
 this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=i;o<a.length;o+=1){var s=a[o],u=s[0],l=s[1];this.labels.push(u),this.outputs.push(l)}};function se(t,e,r,n){var i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}ae.interpolationFactor=function(t,e,r,n){var i=0;if("exponential"===t.name)i=se(e,t.base,r,n);else if("linear"===t.name)i=se(e,1,r,n);else if("cubic-bezier"===t.name){var o=t.controlPoints;i=new Bt(o[0],o[1],o[2],o[3]).solve(se(e,1,r,n))}return i},ae.parse=function(t,e){var r=t[0],n=t[1],i=t[2],o=t.slice(3);if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return e.error("Unknown interpolation type "+String(n[0]),1,0);va
 r s=n.slice(1);if(4!==s.length||s.some((function(t){return"number"!=typeof t||t<0||t>1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,N)))return null;var u=[],l=null;"interpolate-hcl"===r||"interpolate-lab"===r?l=D:e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var h=0;h<o.length;h+=2){var c=o[h],p=o[h+1],f=h+3,d=h+4;if("number"!=typeof c)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(u.length&&u[u.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var g=
 e.parse(p,d,l);if(!g)return null;l=l||g.type,u.push([c,g])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new ae(l,r,n,i,u):e.error("Type "+q(l)+" is not interpolatable.")},ae.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var o=zt(e,n),a=e[o],s=e[o+1],u=ae.interpolationFactor(this.interpolation,n,a,s),l=r[o].evaluate(t),h=r[o+1].evaluate(t);return"interpolate"===this.operator?Wt[this.type.kind.toLowerCase()](l,h,u):"interpolate-hcl"===this.operator?ie.reverse(ie.interpolate(ie.forward(l),ie.forward(h),u)):ne.reverse(ne.interpolate(ne.forward(l),ne.forward(h),u))},ae.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e])}},ae.prototype.outputDefined=function(){return this.outputs.every((function(t){return t
 .outputDefined()}))},ae.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],r=0;r<this.labels.length;r++)e.push(this.labels[r],this.outputs[r].serialize());return e};var ue=function(t,e){this.type=t,this.args=e};ue.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null,n=e.expectedType;n&&"value"!==n.kind&&(r=n);for(var i=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=a[o],u=e.parse(s,1+i.length,r,void 0,{typeAnnotation:"omit"});if(!u)return null;r=r||u.type,i.push(u)}var l=n&&i.some((function(t){return Z(n,t.type)}));return new ue(l?U:r,i)},ue.prototype.evaluate=function(t){for(var e,r=null,n=0,i=0,o=this.args;i<o.length;i+=1){if(n++,(r=o[i].evaluate(t))&&r instanceof rt&&!r.available&&(
 e||(e=r.name),r=null,n===this.args.length&&(r=e)),null!==r)break}return r},ue.prototype.eachChild=function(t){this.args.forEach(t)},ue.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},ue.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(e){t.push(e.serialize())})),t};var le=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};le.prototype.evaluate=function(t){return this.result.evaluate(t)},le.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1){t(r[e][1])}t(this.result)},le.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],n=1;n<t.length-1;n+=2){var i=t[n];if("string"!=typeof i)return e.error("Expected string, but found "+typeof i+" instead.",n);if(/[^a-zA-Z0-9_]/.test(i))return e.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=e.parse(t[n+1],
 n+1);if(!o)return null;r.push([i,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return a?new le(r,a):null},le.prototype.outputDefined=function(){return this.result.outputDefined()},le.prototype.serialize=function(){for(var t=["let"],e=0,r=this.bindings;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];t.push(i,o.serialize())}return t.push(this.result.serialize()),t};var he=function(t,e,r){this.type=t,this.index=e,this.input=r};he.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,N),n=e.parse(t[2],2,W(e.expectedType||U));if(!r||!n)return null;var i=n.type;return new he(i.itemType,r,n)},he.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new ut("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new ut("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new ut("Array index must be an integer, but found "+e+" 
 instead.");return r[e]},he.prototype.eachChild=function(t){t(this.index),t(this.input)},he.prototype.outputDefined=function(){return!1},he.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ce=function(t,e){this.type=G,this.needle=t,this.haystack=e};ce.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,U),n=e.parse(t[2],2,U);return r&&n?K(r.type,[G,j,N,k,U])?new ce(r,n):e.error("Expected first argument to be of type boolean, string, number or null, but found "+q(r.type)+" instead"):null},ce.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!H(e,["boolean","string","number","null"]))throw new ut("Expected first argument to be of type boolean, string, number or null, but found "+q(ot(e))+" instead.");if(!H(r,["string","array"]))throw new ut("Expected second argument to be of type array or string, but foun
 d "+q(ot(r))+" instead.");return r.indexOf(e)>=0},ce.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},ce.prototype.outputDefined=function(){return!0},ce.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var pe=function(t,e,r){this.type=N,this.needle=t,this.haystack=e,this.fromIndex=r};pe.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,U),n=e.parse(t[2],2,U);if(!r||!n)return null;if(!K(r.type,[G,j,N,k,U]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+q(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,N);return i?new pe(r,n,i):null}return new pe(r,n)},pe.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!H(e,["boolean","string","number","null"]))throw new ut("Expected first argument to be of type boolean, string, number or
  null, but found "+q(ot(e))+" instead.");if(!H(r,["string","array"]))throw new ut("Expected second argument to be of type array or string, but found "+q(ot(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},pe.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},pe.prototype.outputDefined=function(){return!1},pe.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var fe=function(t,e,r,n,i,o){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=o};fe.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,n;e.ex
 pectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],u=t[a+1];Array.isArray(s)||(s=[s]);var l=e.concat(a);if(0===s.length)return l.error("Expected at least one branch label.");for(var h=0,c=s;h<c.length;h+=1){var p=c[h];if("number"!=typeof p&&"string"!=typeof p)return l.error("Branch labels must be numbers or strings.");if("number"==typeof p&&Math.abs(p)>Number.MAX_SAFE_INTEGER)return l.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof p&&Math.floor(p)!==p)return l.error("Numeric branch labels must be integer values.");if(r){if(l.checkSubtype(r,ot(p)))return null}else r=ot(p);if(void 0!==i[String(p)])return l.error("Branch labels must be unique.");i[String(p)]=o.length}var f=e.parse(u,a,n);if(!f)return null;n=n||f.type,o.push(f)}var d=e.parse(t[1],1,U);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,
 d.type)?null:new fe(r,n,d,i,o,g):null},fe.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ot(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},fe.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},fe.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},fe.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,o=Object.keys(this.cases).sort();i<o.length;i+=1){var a=o[i];void 0===(c=n[this.cases[a]])?(n[this.cases[a]]=r.length,r.push([this.cases[a],[a]])):r[c][1].push(a)}for(var s=function(e){return"number"===t.inputType.kind?Number(e):e},u=0,l=r;u<l.length;u+=1){var h=l[u],c=h[0],p=h[1];1===p.length?e.push(s(p[0])):e.push(p.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var de=function(t,e,r){this.type=t,this.branches=e,this.o
 therwise=r};de.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var n=[],i=1;i<t.length-1;i+=2){var o=e.parse(t[i],i,G);if(!o)return null;var a=e.parse(t[i+1],i+1,r);if(!a)return null;n.push([o,a]),r=r||a.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new de(r,n,s):null},de.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];if(i.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},de.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];t(i),t(o)}t(this.otherwise)},de.prototype.outputDefined=function(){return this.branches.every((function(t){t[0];return t[1].outputDefined()}))&&this.otherwise.outputDefined()},de.prototype.serialize=function(){var t=["c
 ase"];return this.eachChild((function(e){t.push(e.serialize())})),t};var ge=function(t,e,r,n){this.type=t,this.input=e,this.beginIndex=r,this.endIndex=n};function ye(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function me(t,e,r,n){return 0===n.compare(e,r)}function ve(t,e,r){var n="=="!==t&&"!="!==t;return function(){function i(t,e,r){this.type=G,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return i.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=t[0],o=e.parse(t[1],1,U);if(!o)return null;if(!ye(r,o.type))return e.concat(1).error('"'+r+"\" comparisons are not supported for type '"+q(o.type)+"'.");var a=e.parse(t[2],2,U);if(!a)return null;if(!ye(r,a.type))return e.concat(2).error('"'+r+"\" comparisons are not supported for type '"+q(a
 .type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+q(o.type)+"' and '"+q(a.type)+"'.");n&&("value"===o.type.kind&&"value"!==a.type.kind?o=new ht(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new ht(o.type,[a])));var s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,B)))return null}return new i(o,a,s)},i.prototype.evaluate=function(i){var o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=ot(o),u=ot(a);if(s.kind!==u.kind||"string"!==s.kind&&"number"!==s.kind)throw new ut('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+u.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var l=ot(o),h=ot(a);if("string"!==l.kind||"string"!==h.kind)return e(i
 ,o,a)}return this.collator?r(i,o,a,this.collator.evaluate(i)):e(i,o,a)},i.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},i}()}ge.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,U),n=e.parse(t[2],2,N);if(!r||!n)return null;if(!K(r.type,[W(U),j,U]))return e.error("Expected first argument to be of type array or string, but found "+q(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,N);return i?new ge(r.type,r,n,i):null}return new ge(r.type,r,n)},ge.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!H(e,["string","array"]))throw new ut("Expected first argument to be of type array or string, but found "+q(ot(e))+" instead.");if(this.endIndex){var
  n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},ge.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},ge.prototype.outputDefined=function(){return!1},ge.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var _e=ve("==",(function(t,e,r){return e===r}),me),be=ve("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!me(0,e,r,n)})),xe=ve("<",(function(t,e,r){return e<r}),(function(t,e,r,n){return n.compare(e,r)<0})),we=ve(">",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Se=ve("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),Te=ve(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),Ee=function(t,e,r,n,i){this.type=j,this.numb
 er=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Ee.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,N);if(!r)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,j)))return null;var o=null;if(n.currency&&!(o=e.parse(n.currency,1,j)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=e.parse(n["min-fraction-digits"],1,N)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,N))?null:new Ee(r,i,o,a,s)},Ee.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?th
 is.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Ee.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Ee.prototype.outputDefined=function(){return!1},Ee.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Ce=function(t){this.type=N,this.input=t};Ce.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type 
 string or array, but found "+q(r.type)+" instead."):new Ce(r):null},Ce.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ut("Expected value to be of type string or array, but found "+q(ot(e))+" instead.")},Ce.prototype.eachChild=function(t){t(this.input)},Ce.prototype.outputDefined=function(){return!1},Ce.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Pe={"==":_e,"!=":be,">":we,"<":xe,">=":Te,"<=":Se,array:ht,at:he,boolean:ht,case:de,coalesce:ue,collator:vt,format:ct,image:pt,in:ce,"index-of":pe,interpolate:ae,"interpolate-hcl":ae,"interpolate-lab":ae,length:Ce,let:le,literal:st,match:fe,number:ht,"number-format":Ee,object:ht,slice:ge,step:Ut,string:ht,"to-boolean":dt,"to-color":dt,"to-number":dt,"to-string":dt,var:Gt,within:At};function Re(t,e){var r=e[0],n=e[1],i=e[2],o=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t)
 ;var a=o?o.evaluate(t):1,s=nt(r,n,i,a);if(s)throw new ut(s);return new $(r/255*a,n/255*a,i/255*a,a)}function Oe(t,e){return t in e}function Ie(t,e){var r=e[t];return void 0===r?null:r}function Le(t){return{type:t}}function Me(t){return{result:"success",value:t}}function Fe(t){return{result:"error",value:t}}function Ae(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function ke(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Ne(t){return!!t.expression&&t.expression.interpolated}function je(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Ge(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function De(t){return t}function ze(t,e){var r,n,i,o="color"===e.type,a=t.stops&&"object"==typeof t.stops[0][0],s=a||void 0!==t.property,u=a||!s,l=t.type||(Ne(e)?"exponential":"interval");if(o&&((t=M({},t)).stops
 &&(t.stops=t.stops.map((function(t){return[t[0],$.parse(t[1])]}))),t.default?t.default=$.parse(t.default):t.default=$.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!oe[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===l)r=Ve;else if("interval"===l)r=Ye;else if("categorical"===l){r=Be,n=Object.create(null);for(var h=0,c=t.stops;h<c.length;h+=1){var p=c[h];n[p[0]]=p[1]}i=typeof t.stops[0][0]}else{if("identity"!==l)throw new Error('Unknown function type "'+l+'"');r=We}if(a){for(var f={},d=[],g=0;g<t.stops.length;g++){var y=t.stops[g],m=y[0].zoom;void 0===f[m]&&(f[m]={zoom:m,type:t.type,property:t.property,default:t.default,stops:[]},d.push(m)),f[m].stops.push([y[0].value,y[1]])}for(var v=[],_=0,b=d;_<b.length;_+=1){var x=b[_];v.push([f[x].zoom,ze(f[x],e)])}var w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:ae.interpolationFactor.bind(void 0,w),zoomStops:v.map((function(t){return t[0]})),evaluate:function(r,
 n){var i=r.zoom;return Ve({stops:v,base:t.base},e,i).evaluate(i,n)}}}if(u){var S="exponential"===l?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:S,interpolationFactor:ae.interpolationFactor.bind(void 0,S),zoomStops:t.stops.map((function(t){return t[0]})),evaluate:function(o){var a=o.zoom;return r(t,e,a,n,i)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[t.property]:void 0;return void 0===s?Ue(t.default,e.default):r(t,e,s,n,i)}}}function Ue(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Be(t,e,r,n,i){return Ue(typeof r===i?n[r]:void 0,t.default,e.default)}function Ye(t,e,r){if("number"!==je(r))return Ue(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=zt(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function Ve(t,e,r){var n=void 0!==t.base?t.base:1;i
 f("number"!==je(r))return Ue(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var o=zt(t.stops.map((function(t){return t[0]})),r),a=function(t,e,r,n){var i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],u=t.stops[o+1][1],l=Wt[e.type]||De;if(t.colorSpace&&"rgb"!==t.colorSpace){var h=oe[t.colorSpace];l=function(t,e){return h.reverse(h.interpolate(h.forward(t),h.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=u.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return l(r,n,a)}}:l(s,u,a)}function We(t,e,r){return"color"===e.type?r=$.parse(r):"formatted"===e.type?r=et.fromString(r.toString()):"resolvedImage"===e.type?r=rt.fromString(r.toString()):je(r)===e.type||"enum"===e.type&&e.values[r]||
 (r=void 0),Ue(r,t.default,e.default)}mt.register(Pe,{error:[{kind:"error"},[j],function(t,e){var r=e[0];throw new ut(r.evaluate(t))}],typeof:[j,[U],function(t,e){return q(ot(e[0].evaluate(t)))}],"to-rgba":[W(N,4),[D],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[D,[N,N,N],Re],rgba:[D,[N,N,N,N],Re],has:{type:G,overloads:[[[j],function(t,e){return Oe(e[0].evaluate(t),t.properties())}],[[j,z],function(t,e){var r=e[0],n=e[1];return Oe(r.evaluate(t),n.evaluate(t))}]]},get:{type:U,overloads:[[[j],function(t,e){return Ie(e[0].evaluate(t),t.properties())}],[[j,z],function(t,e){var r=e[0],n=e[1];return Ie(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[U,[j],function(t,e){return Ie(e[0].evaluate(t),t.featureState||{})}],properties:[z,[],function(t){return t.properties()}],"geometry-type":[j,[],function(t){return t.geometryType()}],id:[U,[],function(t){return t.id()}],zoom:[N,[],function(t){return t.globals.zoom}],"heatmap-density":[N,[],function(t){return t.globals.heatmapDensity|
 |0}],"line-progress":[N,[],function(t){return t.globals.lineProgress||0}],accumulated:[U,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[N,Le(N),function(t,e){for(var r=0,n=0,i=e;n<i.length;n+=1){r+=i[n].evaluate(t)}return r}],"*":[N,Le(N),function(t,e){for(var r=1,n=0,i=e;n<i.length;n+=1){r*=i[n].evaluate(t)}return r}],"-":{type:N,overloads:[[[N,N],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)-n.evaluate(t)}],[[N],function(t,e){return-e[0].evaluate(t)}]]},"/":[N,[N,N],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)/n.evaluate(t)}],"%":[N,[N,N],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)%n.evaluate(t)}],ln2:[N,[],function(){return Math.LN2}],pi:[N,[],function(){return Math.PI}],e:[N,[],function(){return Math.E}],"^":[N,[N,N],function(t,e){var r=e[0],n=e[1];return Math.pow(r.evaluate(t),n.evaluate(t))}],sqrt:[N,[N],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[N,[N],function(t,e){var r=e[0];return Math.lo
 g(r.evaluate(t))/Math.LN10}],ln:[N,[N],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[N,[N],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN2}],sin:[N,[N],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[N,[N],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[N,[N],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[N,[N],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[N,[N],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[N,[N],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[N,Le(N),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[N,Le(N),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[N,[N],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[N,[N],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[N,[N],function(t,e){var r=e[0];r
 eturn Math.floor(r.evaluate(t))}],ceil:[N,[N],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],"filter-==":[G,[j,U],function(t,e){var r=e[0],n=e[1];return t.properties()[r.value]===n.value}],"filter-id-==":[G,[U],function(t,e){var r=e[0];return t.id()===r.value}],"filter-type-==":[G,[j],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[G,[j,U],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i<o}],"filter-id-<":[G,[U],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<i}],"filter->":[G,[j,U],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>o}],"filter-id->":[G,[U],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[G,[j,U],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[G,[U],function(t,e){var r=e[0],n=t.id(),i=r.value;return type
 of n==typeof i&&n<=i}],"filter->=":[G,[j,U],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[G,[U],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[G,[U],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[G,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[G,[W(j)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[G,[W(U)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[G,[j,W(U)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[G,[j,W(U)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:G,overloads:[[[G,G],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Le(G),fun
 ction(t,e){for(var r=0,n=e;r<n.length;r+=1){if(!n[r].evaluate(t))return!1}return!0}]]},any:{type:G,overloads:[[[G,G],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)||n.evaluate(t)}],[Le(G),function(t,e){for(var r=0,n=e;r<n.length;r+=1){if(n[r].evaluate(t))return!0}return!1}]]},"!":[G,[G],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[G,[j],function(t,e){var r=e[0],n=t.globals&&t.globals.isSupportedScript;return!n||n(r.evaluate(t))}],upcase:[j,[j],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[j,[j],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[j,Le(U),function(t,e){return e.map((function(e){return at(e.evaluate(t))})).join("")}],"resolved-locale":[j,[B],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var qe=function(t,e){var r;this.expression=t,this._warningHistory={},this._evaluator=new yt,this._defaultValue=e?"color"===(r=e).type&&Ge(r.default)?new $(0,0,0,0):"color"===r.type?$.parse(r.default)||null:void 0===r.defau
 lt?null:r.default:null,this._enumValues=e&&"enum"===e.type?e.values:null};function Xe(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Pe}function Ze(t,e){var r=new Dt(Pe,[],e?function(t){var e={color:D,string:j,number:N,enum:j,boolean:G,formatted:Y,resolvedImage:V};if("array"===t.type)return W(e[t.value]||U,t.length);return e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Me(new qe(n,e)):Fe(r.errors)}qe.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},qe.prototype.evaluate=function(t,e,r,n,i,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i|
 |null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new ut("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Ke=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Nt(e.expression)};Ke.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,o)},Ke.prototype.evaluate=function(t,e,r,n,i,o){return this._styleExpression.evaluate(t,e,r,n,i,o)};var He=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependen
 t="camera"!==t&&!Nt(e.expression),this.interpolationType=n};function Je(t,e){if("error"===(t=Ze(t,e)).result)return t;var r=t.value.expression,n=kt(r);if(!n&&!Ae(e))return Fe([new F("","data expressions not supported")]);var i=jt(r,["zoom"]);if(!i&&!ke(e))return Fe([new F("","zoom expressions not supported")]);var o=function t(e){var r=null;if(e instanceof le)r=t(e.result);else if(e instanceof ue)for(var n=0,i=e.args;n<i.length;n+=1){var o=i[n];if(r=t(o))break}else(e instanceof Ut||e instanceof ae)&&e.input instanceof mt&&"zoom"===e.input.name&&(r=e);if(r instanceof F)return r;return e.eachChild((function(e){var n=t(e);n instanceof F?r=n:!r&&n?r=new F("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&n&&r!==n&&(r=new F("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),r}(r);if(!o&&!i)return Fe([new F("",'"zoom" expression may only be used as input to a top-level "step" or "interpola
 te" expression.')]);if(o instanceof F)return Fe([o]);if(o instanceof ae&&!Ne(e))return Fe([new F("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Me(new Ke(n?"constant":"source",t.value));var a=o instanceof ae?o.interpolation:void 0;return Me(new He(n?"camera":"composite",t.value,o.labels,a))}He.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,o)},He.prototype.evaluate=function(t,e,r,n,i,o){return this._styleExpression.evaluate(t,e,r,n,i,o)},He.prototype.interpolationFactor=function(t,e,r){return this.interpolationType?ae.interpolationFactor(this.interpolationType,t,e,r):0};var $e=function(t,e){this._parameters=t,this._specification=e,M(this,ze(this._parameters,this._specification))};function Qe(t){return"object"==typeof t?["literal",t]:t}function tr(t,e){var r=t.stops;if(!r)return function(t,e){var r=["get",t.property];if(void 0===t.default)return"string"===e.type?["strin
 g",r]:r;if("enum"===e.type)return["match",r,Object.keys(e.values),r,t.default];var n=["color"===e.type?"to-color":e.type,r,Qe(t.default)];return"array"===e.type&&n.splice(1,0,e.value,e.length||null),n}(t,e);var n=r&&"object"==typeof r[0][0],i=n||void 0!==t.property,o=n||!i;return r=r.map((function(t){return!i&&e.tokens&&"string"==typeof t[1]?[t[0],sr(t[1])]:[t[0],Qe(t[1])]})),n?function(t,e,r){for(var n={},i={},o=[],a=0;a<r.length;a++){var s=r[a],u=s[0].zoom;void 0===n[u]&&(n[u]={zoom:u,type:t.type,property:t.property,default:t.default},i[u]=[],o.push(u)),i[u].push([s[0].value,s[1]])}if("exponential"===ar({},e)){for(var l=[er(t),["linear"],["zoom"]],h=0,c=o;h<c.length;h+=1){var p=c[h],f=nr(n[p],e,i[p]);or(l,p,f,!1)}return l}for(var d=["step",["zoom"]],g=0,y=o;g<y.length;g+=1){var m=y[g],v=nr(n[m],e,i[m]);or(d,m,v,!0)}return ir(d),d}(t,e,r):o?function(t,e,r,n){void 0===n&&(n=["zoom"]);var i,o=ar(t,e),a=!1;if("interval"===o)i=["step",n],a=!0;else{if("exponential"!==o)throw new Error('
 Unknown zoom function type "'+o+'"');var s=void 0!==t.base?t.base:1;i=[er(t),1===s?["linear"]:["exponential",s],n]}for(var u=0,l=r;u<l.length;u+=1){var h=l[u];or(i,h[0],h[1],a)}return ir(i),i}(t,e,r):nr(t,e,r)}function er(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function rr(t,e){return void 0!==t?t:void 0!==e?e:void 0}function nr(t,e,r){var n=ar(t,e),i=["get",t.property];if("categorical"===n&&"boolean"==typeof r[0][0]){for(var o=["case"],a=0,s=r;a<s.length;a+=1){var u=s[a];o.push(["==",i,u[0]],u[1])}return o.push(Qe(rr(t.default,e.default))),o}if("categorical"===n){for(var l=["match",i],h=0,c=r;h<c.length;h+=1){var p=c[h];or(l,p[0],p[1],!1)}return l.push(Qe(rr(t.default,e.default))),l}if("interval"===n){for(var f=["step",["number",i]],d=0,g=r;d<g.length;d+=1){var y=g[d];or(f,y[0],y[1],!0)}return ir(f),void 0===t.default?f:["case",["==",["typeof",i],"number"],f,Qe(t.default)]}if("exponential"===n){for(var
  m=void 0!==t.base?t.base:1,v=[er(t),1===m?["linear"]:["exponential",m],["number",i]],_=0,b=r;_<b.length;_+=1){var x=b[_];or(v,x[0],x[1],!1)}return void 0===t.default?v:["case",["==",["typeof",i],"number"],v,Qe(t.default)]}throw new Error("Unknown property function type "+n)}function ir(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function or(t,e,r,n){t.length>3&&e===t[t.length-2]||(n&&2===t.length||t.push(e),t.push(r))}function ar(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function sr(t){for(var e=["concat"],r=/{([^{}]+)}/g,n=0,i=r.exec(t);null!==i;i=r.exec(t)){var o=t.slice(n,r.lastIndex-i[0].length);n=r.lastIndex,o.length>0&&e.push(o),e.push(["get",i[1]])}if(1===e.length)return t;if(n<t.length)e.push(t.slice(n));else if(2===e.length)return["to-string",e[1]];return e}function ur(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":retu
 rn t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var n=r[e];if(!ur(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}}$e.deserialize=function(t){return new $e(t._parameters,t._specification)},$e.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var lr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function hr(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};ur(t)||(t=pr(t));var e=Ze(t,lr);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return{filter:function(t,r,n){return e.value.evaluate(t,r,{},n)},needGeometry:function t(e){if(!Array.isArray(e))return!1
 ;if("within"===e[0])return!0;for(var r=1;r<e.length;r++)if(t(e[r]))return!0;return!1}(t)}}function cr(t,e){return t<e?-1:t>e?1:0}function pr(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?fr(t[1],t[2],"=="):"!="===r?yr(fr(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?fr(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(pr))):"all"===r?["all"].concat(t.slice(1).map(pr)):"none"===r?["all"].concat(t.slice(1).map(pr).map(yr)):"in"===r?dr(t[1],t.slice(2)):"!in"===r?yr(dr(t[1],t.slice(2))):"has"===r?gr(t[1]):"!has"===r?yr(gr(t[1])):"within"!==r||t}function fr(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function dr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(cr)]
 ]:["filter-in-small",t,["literal",e]]}}function gr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function yr(t){return["!",t]}var mr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function vr(t,e){var r={};for(var n in t)"ref"!==n&&(r[n]=t[n]);return mr.forEach((function(t){t in e&&(r[t]=e[t])})),r}function _r(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var n=0;n<t.length;n++)"ref"in t[n]&&(t[n]=vr(t[n],e[t[n].ref]));return t}var br=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)},xr=function(t){this.error=t,this.message=t.message;var e=t.message.match(/line (\d+)/);this.line=e?parseInt(e[1],10):0};function wr(t){var e=t.key,r=t.value;return r?[new br(e,r,"constants have been deprecated as of v8")]:[]}function Sr(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}fun
 ction Tr(t){if(Array.isArray(t))return t.map(Tr);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e={};for(var r in t)e[r]=Tr(t[r]);return e}return Sr(t)}function Er(t){var e=t.key,r=t.value,n=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],u=je(r);if("object"!==u)return[new br(e,r,"object expected, "+u+" found")];for(var l in r){var h=l.split(".")[0],c=n[h]||n["*"],p=void 0;if(i[h])p=i[h];else if(n[h])p=Ur;else if(i["*"])p=i["*"];else{if(!n["*"]){s.push(new br(e,r[l],'unknown property "'+l+'"'));continue}p=Ur}s=s.concat(p({key:(e?e+".":e)+l,value:r[l],valueSpec:c,style:o,styleSpec:a,object:r,objectKey:l},r))}for(var f in n)i[f]||n[f].required&&void 0===n[f].default&&void 0===r[f]&&s.push(new br(e,r,'missing required property "'+f+'"'));return s}function Cr(t){var e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,o=t.key,a=t.arrayElementValidator||Ur;if("array"!==je(e))return[new br(o,e,"array expected, "+je(e)
 +" found")];if(r.length&&e.length!==r.length)return[new br(o,e,"array length "+r.length+" expected, length "+e.length+" found")];if(r["min-length"]&&e.length<r["min-length"])return[new br(o,e,"array length at least "+r["min-length"]+" expected, length "+e.length+" found")];var s={type:r.value,values:r.values};i.$version<7&&(s.function=r.function),"object"===je(r.value)&&(s=r.value);for(var u=[],l=0;l<e.length;l++)u=u.concat(a({array:e,arrayIndex:l,value:e[l],valueSpec:s,style:n,styleSpec:i,key:o+"["+l+"]"}));return u}function Pr(t){var e=t.key,r=t.value,n=t.valueSpec,i=je(r);return"number"===i&&r!=r&&(i="NaN"),"number"!==i?[new br(e,r,"number expected, "+i+" found")]:"minimum"in n&&r<n.minimum?[new br(e,r,r+" is less than the minimum value "+n.minimum)]:"maximum"in n&&r>n.maximum?[new br(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function Rr(t){var e,r,n,i=t.valueSpec,o=Sr(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,u=!s,l="array"===je(t.value.s
 tops)&&"array"===je(t.value.stops[0])&&"object"===je(t.value.stops[0][0]),h=Er({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new br(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;e=e.concat(Cr({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:c})),"array"===je(r)&&0===r.length&&e.push(new br(t.key,r,"array must have at least one stop"));return e},default:function(t){return Ur({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&h.push(new br(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||h.push(new br(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!Ne(t.valueSpec)&&h.push(new br(t.key,t.value,"exponential functions not supported")),t.styleSpec.$ver
 sion>=8&&(u&&!Ae(t.valueSpec)?h.push(new br(t.key,t.value,"property functions not supported")):s&&!ke(t.valueSpec)&&h.push(new br(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!l||void 0!==t.value.property||h.push(new br(t.key,t.value,'"property" property is required')),h;function c(t){var e=[],o=t.value,s=t.key;if("array"!==je(o))return[new br(s,o,"array expected, "+je(o)+" found")];if(2!==o.length)return[new br(s,o,"array length 2 expected, length "+o.length+" found")];if(l){if("object"!==je(o[0]))return[new br(s,o,"object expected, "+je(o[0])+" found")];if(void 0===o[0].zoom)return[new br(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new br(s,o,"object stop key must have value")];if(n&&n>Sr(o[0].zoom))return[new br(s,o[0].zoom,"stop zoom values must appear in ascending order")];Sr(o[0].zoom)!==n&&(n=Sr(o[0].zoom),r=void 0,a={}),e=e.concat(Er({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementVal
 idators:{zoom:Pr,value:p}}))}else e=e.concat(p({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return Xe(Tr(o[1]))?e.concat([new br(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(Ur({key:s+"[1]",value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function p(t,n){var s=je(t.value),u=Sr(t.value),l=null!==t.value?t.value:n;if(e){if(s!==e)return[new br(t.key,l,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new br(t.key,l,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var h="number expected, "+s+" found";return Ae(i)&&void 0===o&&(h+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new br(t.key,l,h)]}return"categorical"!==o||"number"!==s||isFinite(u)&&Math.floor(u)===u?"categorical"!==o&&"number"===s&&void 0!==r&&u<r?[new br(t.key,l,"stop domain values must appe
 ar in ascending order")]:(r=u,"categorical"===o&&u in a?[new br(t.key,l,"stop domain values must be unique")]:(a[u]=!0,[])):[new br(t.key,l,"integer expected, found "+u)]}}function Or(t){var e=("property"===t.expressionContext?Je:Ze)(Tr(t.value),t.valueSpec);if("error"===e.result)return e.value.map((function(e){return new br(""+t.key+e.key,t.value,e.message)}));var r=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!r.outputDefined())return[new br(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!Nt(r))return[new br(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!Nt(r))return[new br(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContex
 t&&0===t.expressionContext.indexOf("cluster")){if(!jt(r,["zoom","feature-state"]))return[new br(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!kt(r))return[new br(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ir(t){var e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(Sr(r))&&i.push(new br(e,r,"expected one of ["+n.values.join(", ")+"], "+JSON.stringify(r)+" found")):-1===Object.keys(n.values).indexOf(Sr(r))&&i.push(new br(e,r,"expected one of ["+Object.keys(n.values).join(", ")+"], "+JSON.stringify(r)+" found")),i}function Lr(t){return ur(Tr(t.value))?Or(M({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,n=e.key;if("array"!==je(r))return[new br(n,r,"array expected, "+je(r)+" found")];var i,o=e.styleSpec,a=[];if(r.length<
 1)return[new br(n,r,"filter array must have at least 1 element")];switch(a=a.concat(Ir({key:n+"[0]",value:r[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),Sr(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Sr(r[1])&&a.push(new br(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&a.push(new br(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(i=je(r[1]))&&a.push(new br(n+"[1]",r[1],"string expected, "+i+" found"));for(var s=2;s<r.length;s++)i=je(r[s]),"$type"===Sr(r[1])?a=a.concat(Ir({key:n+"["+s+"]",value:r[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==i&&"number"!==i&&"boolean"!==i&&a.push(new br(n+"["+s+"]",r[s],"string, number, or boolean expected, "+i+" found"));break;case"any":case"all":case"none":for(var u=1;u<r.length;u++)a=a.concat(t({key:n+"["+u+"]",value:r[u],style:e.style,styleSpec:e.styleSpec}));break;cas
 e"has":case"!has":i=je(r[1]),2!==r.length?a.push(new br(n,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"string"!==i&&a.push(new br(n+"[1]",r[1],"string expected, "+i+" found"));break;case"within":i=je(r[1]),2!==r.length?a.push(new br(n,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"object"!==i&&a.push(new br(n+"[1]",r[1],"object expected, "+i+" found"))}return a}(t)}function Mr(t,e){var r=t.key,n=t.style,i=t.styleSpec,o=t.value,a=t.objectKey,s=i[e+"_"+t.layerType];if(!s)return[];var u=a.match(/^(.*)-transition$/);if("paint"===e&&u&&s[u[1]]&&s[u[1]].transition)return Ur({key:r,value:o,valueSpec:i.transition,style:n,styleSpec:i});var l,h=t.valueSpec||s[a];if(!h)return[new br(r,o,'unknown property "'+a+'"')];if("string"===je(o)&&Ae(h)&&!h.tokens&&(l=/^{([^}]+)}$/.exec(o)))return[new br(r,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(l[1])+" }`.")];var 
 c=[];return"symbol"===t.layerType&&("text-field"===a&&n&&!n.glyphs&&c.push(new br(r,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Ge(Tr(o))&&"identity"===Sr(o.type)&&c.push(new br(r,o,'"text-font" does not support identity functions'))),c.concat(Ur({key:t.key,value:o,valueSpec:h,style:n,styleSpec:i,expressionContext:"property",propertyType:e,propertyKey:a}))}function Fr(t){return Mr(t,"paint")}function Ar(t){return Mr(t,"layout")}function kr(t){var e=[],r=t.value,n=t.key,i=t.style,o=t.styleSpec;r.type||r.ref||e.push(new br(n,r,'either "type" or "ref" is required'));var a,s=Sr(r.type),u=Sr(r.ref);if(r.id)for(var l=Sr(r.id),h=0;h<t.arrayIndex;h++){var c=i.layers[h];Sr(c.id)===l&&e.push(new br(n,r.id,'duplicate layer id "'+r.id+'", previously used at line '+c.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach((function(t){t in r&&e.push(new br(n,r[t],'"'+t+'" is prohibited for ref layers'))})),i.layers.forEach((function
 (t){Sr(t.id)===u&&(a=t)})),a?a.ref?e.push(new br(n,r.ref,"ref cannot reference another ref layer")):s=Sr(a.type):e.push(new br(n,r.ref,'ref layer "'+u+'" not found'));else if("background"!==s)if(r.source){var p=i.sources&&i.sources[r.source],f=p&&Sr(p.type);p?"vector"===f&&"raster"===s?e.push(new br(n,r.source,'layer "'+r.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new br(n,r.source,'layer "'+r.id+'" requires a vector source')):"vector"!==f||r["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new br(n,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!r.paint||!r.paint["line-gradient"]||"geojson"===f&&p.lineMetrics||e.push(new br(n,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new br(n,r,'layer "'+r.id+'" must specify a "source-layer"')):e.push(new br(n,r.source,'source "'+r.source+'" not found'))}else e.push(new br(n,r,'missing required proper
 ty "source"'));return e=e.concat(Er({key:n,value:r,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Ur({key:n+".type",value:r.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:"type"})},filter:Lr,layout:function(t){return Er({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Ar(M({layerType:s},t))}}})},paint:function(t){return Er({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Fr(M({layerType:s},t))}}})}}}))}function Nr(t){var e=t.value,r=t.key,n=je(e);return"string"!==n?[new br(r,e,"string expected, "+n+" found")]:[]}var jr={promoteId:function(t){var e=t.key,r=t.value;if("string"===je(r))return Nr({key:e,value:r});var n=[];for(var i in r)n.push.apply(n,Nr({key:e+"."+i,value:r[i]}));return n}};function Gr(t){var e=t.value,r=t.key,n=t.styleSp
 ec,i=t.style;if(!e.type)return[new br(r,e,'"type" is required')];var o,a=Sr(e.type);switch(a){case"vector":case"raster":case"raster-dem":return o=Er({key:r,value:e,valueSpec:n["source_"+a.replace("-","_")],style:t.style,styleSpec:n,objectElementValidators:jr});case"geojson":if(o=Er({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n,objectElementValidators:jr}),e.cluster)for(var s in e.clusterProperties){var u=e.clusterProperties[s],l=u[0],h=u[1],c="string"==typeof l?[l,["accumulated"],["get",s]]:l;o.push.apply(o,Or({key:r+"."+s+".map",value:h,expressionContext:"cluster-map"})),o.push.apply(o,Or({key:r+"."+s+".reduce",value:c,expressionContext:"cluster-reduce"}))}return o;case"video":return Er({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case"image":return Er({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case"canvas":return[new br(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canv
 as")];default:return Ir({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,styleSpec:n})}}function Dr(t){var e=t.value,r=t.styleSpec,n=r.light,i=t.style,o=[],a=je(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new br("light",e,"object expected, "+a+" found")]);for(var s in e){var u=s.match(/^(.*)-transition$/);o=u&&n[u[1]]&&n[u[1]].transition?o.concat(Ur({key:s,value:e[s],valueSpec:r.transition,style:i,styleSpec:r})):n[s]?o.concat(Ur({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r})):o.concat([new br(s,e[s],'unknown property "'+s+'"')])}return o}var zr={"*":function(){return[]},array:Cr,boolean:function(t){var e=t.value,r=t.key,n=je(e);return"boolean"!==n?[new br(r,e,"boolean expected, "+n+" found")]:[]},number:Pr,color:function(t){var e=t.key,r=t.value,n=je(r);return"string"!==n?[new br(e,r,"color expected, "+n+" found")]:null===J(r)?[new br(e,r,'color expected, "'+r+'" found')]:[]},constants:wr,enum:
 Ir,filter:Lr,function:Rr,layer:kr,object:Er,source:Gr,light:Dr,string:Nr,formatted:function(t){return 0===Nr(t).length?[]:Or(t)},resolvedImage:function(t){return 0===Nr(t).length?[]:Or(t)}};function Ur(t){var e=t.value,r=t.valueSpec,n=t.styleSpec;return r.expression&&Ge(Sr(e))?Rr(t):r.expression&&Xe(Tr(e))?Or(t):r.type&&zr[r.type]?zr[r.type](t):Er(M({},t,{valueSpec:r.type?n[r.type]:r}))}function Br(t){var e=t.value,r=t.key,n=Nr(t);return n.length||(-1===e.indexOf("{fontstack}")&&n.push(new br(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&n.push(new br(r,e,'"glyphs" url must include a "{range}" token'))),n}function Yr(t,e){void 0===e&&(e=i);var r=[];return r=r.concat(Ur({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Br,"*":function(){return[]}}})),t.constants&&(r=r.concat(wr({key:"constants",value:t.constants,style:t,styleSpec:e}))),Vr(r)}function Vr(t){return[].concat(t).sort((function(t,e){return t.line-e.l
 ine}))}function Wr(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return Vr(t.apply(this,e))}}Yr.source=Wr(Gr),Yr.light=Wr(Dr),Yr.layer=Wr(kr),Yr.filter=Wr(Lr),Yr.paintProperty=Wr(Fr),Yr.layoutProperty=Wr(Ar);var qr=s((function(t,e){var r=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,12],r=[1,13],n=[1,9],i=[1,10],o=[1,11],a=[1,14],s=[1,15],u=[14,18,22,24],l=[18,22],h=[22,24],c={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,
 2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,e,r,n,i,o,a){var s=o.length-1;switch(i){case 1:this.$=new String(t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(t),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=o[s-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=o[s-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[o[s-2],o[s]];break;case 16:this.$={},this.$[o[s][0]]=o[s][1];break;case 17:this.$=o[s-2],o[s-2][o[s][0]]=o[s][1];break;case 18:this.$=[],Object.def
 ineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[o[s]];break;case 21:this.$=o[s-2],o[s-2].push(o[s])}},table:[{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:o,12:1,13:2,15:7,16:8,17:a,23:s},{1:[3]},{14:[1,16]},t(u,[2,7]),t(u,[2,8]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),t(u,[2,3]),t(u,[2,4]),t(u,[2,5]),t([14,18,21,22,24],[2,1]),t(u,[2,2]),{3:20,4:e,18:[1,17],19:18,20:19},{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:o,13:23,15:7,16:8,17:a,23:s,24:[1,21],25:22},{1:[2,6]},t(u,[2,13]),{18:[1,24],22:[1,25]},t(l,[2,16]),{21:[1,26]},t(u,[2,18]),{22:[1,28],24:[1,27]},t(h,[2,20]),t(u,[2,14]),{3:20,4:e,20:29},{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:o,13:30,15:7,16:8,17:a,23:s},t(u,[2,19]),{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:o,13:31,15:7,16:8,17:a,23:s},t(l,[2,17]),t(l,[2,15]),t(h,[2,21])],defaultActions:{16:[2,6]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],o=this.table,a="",s=0,
 u=0,l=2,h=1,c=i.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(f.yy[d]=this.yy[d]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;i.push(g);var y=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=p.lex()||h)&&(t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,S,T,E,C={};;){if(_=r[r.length-1],this.defaultActions[_]?b=this.defaultActions[_]:(null==v&&(v=m()),b=o[_]&&o[_][v]),void 0===b||!b.length||!b[0]){var P="";for(w in E=[],o[_])this.terminals_[w]&&w>l&&E.push("'"+this.terminals_[w]+"'");P=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(s+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'")
 ,this.parseError(P,{text:p.match,token:this.terminals_[v]||v,line:p.yylineno,loc:g,expected:E})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+v);switch(b[0]){case 1:r.push(v),n.push(p.yytext),i.push(p.yylloc),r.push(b[1]),v=null,u=p.yyleng,a=p.yytext,s=p.yylineno,g=p.yylloc;break;case 2:if(S=this.productions_[b[1]][1],C.$=n[n.length-S],C._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},y&&(C._$.range=[i[i.length-(S||1)].range[0],i[i.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[a,u,s,f.yy,b[1],n,i].concat(c))))return x;S&&(r=r.slice(0,-1*S*2),n=n.slice(0,-1*S),i=i.slice(0,-1*S)),r.push(this.productions_[b[1]][0]),n.push(C.$),i.push(C._$),T=o[r[r.length-2]][r[r.length-1]],r.push(T);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);
 this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylinen
 o-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t
 =this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1]
 .match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((r=this._input.match(this.rules[i[o]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===thi
 s._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:retu
 rn 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function f(){this.yy={}}return c.lexer=p,f.prototype=c,c.Parser=f,new f}();void 0!==a&&(e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)})}));qr.parser,qr.Parser,qr.parse;function Xr(t){if(t instanceof String||"string"==typeof t||t instanceof n)try{return qr.parse(t.toString())}catch(t){throw new xr(t)}return t}function Zr(t,e){void 0===e&&(e=i);var r=t;try{r=Xr(r)}catch(t){return[t]}return Yr(r,e)}var Kr={StyleExpression:qe,isExpression:Xe,isExpressionFilter:ur,createExpressio
 n:Ze,createPropertyExpression:Je,normalizePropertyExpression:function(t,e){if(Ge(t))return new $e(t,e);if(Xe(t)){var r=Je(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}var n=t;return"string"==typeof t&&"color"===e.type&&(n=$.parse(t)),{kind:"constant",evaluate:function(){return n}}},ZoomConstantExpression:Ke,ZoomDependentExpression:He,StylePropertyFunction:$e},Hr={convertFunction:tr,createFunction:ze,isFunction:Ge};Zr.parsed=Zr,Zr.latest=Zr}).call(this,r(4),r(7).Buffer)},function(t,e,r){t.exports=function(){"use strict";function t(t,n,i,o,a){!function t(r,n,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=n-i+1,l=Math.log(s),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(s-h)/s)*(u-s/2<0?-1:1),p=Math.max(i,Math.floor(n-u*h/s+c)),f=Math.min(o,Math.floor(n+(s-u)*h/s+c));t(r,n,p,f,a)}var d=r[n],g=i,y=o;for(e(r,i,n),a(r[o],d)>0&&e(r,i,o);g<y;){for(e(r,g,y),g++,y--;a(r[g],d)<0;)g++;for(;a(r[y],d)>0;)y--}0===a(r[i],d)?e(
 r,i,y):(y++,e(r,y,o)),y<=n&&(i=y+1),n<=y&&(o=y-1)}}(t,n,i||0,o||t.length-1,a||r)}function e(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function r(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,r){if(!r)return e.indexOf(t);for(var n=0;n<e.length;n++)if(r(t,e[n]))return n;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,r,n,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<r;o++){var a=t.children[o];s(i,t.leaf?n(a):a)}return i}function s(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function u(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.m
 axX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,r,n,i,o){for(var a=[r,n];a.length;)if(!((n=a.pop())-(r=a.pop())<=i)){var s=r+Math.ceil((n-r)/i/2)*i;t(e,s,r,n,o),a.push(r,s,s,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,r=[];if(!f(t,e))return r;for(var n=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],s=e.leaf?n(a):a;f(t,s)&&(e.leaf?r.push(a):p(t,s)?this._all(a,r):i.push(a))}e=i.pop()}return r},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var r=[];e;){for(var n=0;n<e.children.length;n++){var i=e.children[n],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;r.push(i)}}e=r.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e
 <t.length;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var n=this.data;this.data=r,r=n}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=d([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var r,n,o,a=this.data,s=this.toBBox(t),u=[],l=[];a||u.length;){if(a||(a=u.pop(),n=u[u.length-1],r=l.pop(),o=!0),a.leaf){var h=i(t,a.children,e);if(-1!==h)return a.children.splice(h,1),u.push(a),this._condense(u),this}o||a.leaf||!p(a,s)?n?(r++,a=n.children[r],o=!1):a=null:(u.push(a),l.push(r),r=0,n=a,a=a.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.mi
 nY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var r=[];t;)t.leaf?e.push.apply(e,t.children):r.push.apply(r,t.children),t=r.pop();return e},n.prototype._build=function(t,e,r,n){var i,a=r-e+1,s=this._maxEntries;if(a<=s)return o(i=d(t.slice(e,r+1)),this.toBBox),i;n||(n=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,n-1))),(i=d([])).leaf=!1,i.height=n;var u=Math.ceil(a/s),l=u*Math.ceil(Math.sqrt(s));g(t,e,r,l,this.compareMinX);for(var h=e;h<=r;h+=l){var c=Math.min(h+l-1,r);g(t,h,c,u,this.compareMinY);for(var p=h;p<=c;p+=u){var f=Math.min(p+u-1,c);i.children.push(this._build(t,p,f,n-1))}}return o(i,this.toBBox),i},n.prototype._chooseSubtree=function(t,e,r,n){for(;n.push(e),!e.leaf&&n.length-1!==r;){for(var i=1/0,o=1/0,a=void 0,s=0;s<e.children.length;s++){var u=e.children[s],l=h(u),c=(p=t,f=u,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math
 .min(f.minY,p.minY))-l);c<o?(o=c,i=l<i?l:i,a=u):c===o&&l<i&&(i=l,a=u)}e=a||e.children[0]}var p,f;return e},n.prototype._insert=function(t,e,r){var n=r?t:this.toBBox(t),i=[],o=this._chooseSubtree(n,this.data,e,i);for(o.children.push(t),s(o,n);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(n,i,e)},n.prototype._split=function(t,e){var r=t[e],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var a=this._chooseSplitIndex(r,i,n),s=d(r.children.splice(a,r.children.length-a));s.height=r.height,s.leaf=r.leaf,o(r,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(r,s)},n.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,r){for(var n,i,o,s,u,l,c,p=1/0,f=1/0,d=e;d<=r-e;d++){var g=a(t,0,d,this.toBBox),y=a(t,d,r,this.toBBox),m=(i=g,o=y,s=void 0,u=void 0,l=void 0,c=void 0,s=Math.max(i.minX,o.minX),u
 =Math.max(i.minY,o.minY),l=Math.min(i.maxX,o.maxX),c=Math.min(i.maxY,o.maxY),Math.max(0,l-s)*Math.max(0,c-u)),v=h(g)+h(y);m<p?(p=m,n=d,f=v<f?v:f):m===p&&v<f&&(f=v,n=d)}return n||r-e},n.prototype._chooseSplitAxis=function(t,e,r){var n=t.leaf?this.compareMinX:u,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,r,n)<this._allDistMargin(t,e,r,i)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,r,n){t.children.sort(n);for(var i=this.toBBox,o=a(t,0,e,i),u=a(t,r-e,r,i),l=c(o)+c(u),h=e;h<r-e;h++){var p=t.children[h];s(o,t.leaf?i(p):p),l+=c(o)}for(var f=r-e-1;f>=e;f--){var d=t.children[f];s(u,t.leaf?i(d):d),l+=c(u)}return l},n.prototype._adjustParentBBoxes=function(t,e,r){for(var n=r;n>=0;n--)s(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,r=void 0;e>=0;e--)0===t[e].children.length?e>0?(r=t[e-1].children).splice(r.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n}()},function(t,e){var r={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,bo
 ok:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},n=/(italic|oblique)$/i,i={};t.exports=function(t,e,o){var a=i[t];if(!a){Array.isArray(t)||(t=[t]);for(var s=400,u="normal",l=[],h=0,c=t.length;h<c;++h){var p=t[h].split(" "),f=p[p.length-1].toLowerCase();for(var d in"normal"==f||"italic"==f||"oblique"==f?(u=f,p.pop(),f=p[p.length-1].toLowerCase()):n.test(f)&&(f=f.replace(n,""),u=p[p.length-1].replace(f,"")),r)if(f==d||f==d.replace("-","")||f==d.replace("-"," ")){s=r[d],p.pop();break}"number"==typeof f&&(s=f);var g=p.join(" ").replace("Klokantech Noto Sans","Noto Sans");-1!==g.indexOf(" ")&&(g='"'+g+'"'),l.push(g)}a=i[t]=[u,s,l]}return a[0]+" "+a[1]+" "+e+"px"+(o?"/"+o:"")+" "+a[2]}},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,l=u>>1,h=-7,c=r?i-1:0,p=r?-1:1,f=t[e+c];for
 (c+=p,o=f&(1<<-h)-1,f>>=-h,h+=s;h>0;o=256*o+t[e+c],c+=p,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+t[e+c],c+=p,h-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=l}return(f?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,l=8*o-i-1,h=(1<<l)-1,c=h>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+c>=1?p/u:p*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=h?(s=0,a=h):a+c>=1?(s=(e*u-1)*Math.pow(2,i),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[r+f]=255&a,f+=d,a/=256,l-=8);t[r+f-d]|=128*g}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";t.exports=i;var n=r(3);function i(t){this.buf=ArrayBuf
 fer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var o="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function a(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function s(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function u(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function l(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function h(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function c(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function p(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function f(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function d(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function g(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function y(t,e){for(var r=0;r<
 t.length;r++)e.writeFixed64(t[r])}function m(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function v(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function _(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function b(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,o=this.pos;this.type=7&n,t(i,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=v(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=v(this.buf,this.pos)+4294967296*v(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=v(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=n.read(this.buf,this.po
 s,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,o=r.buf;if(i=o[r.pos++],n=(112&i)>>4,i<128)return s(t,n,e);if(i=o[r.pos++],n|=(127&i)<<3,i<128)return s(t,n,e);if(i=o[r.pos++],n|=(127&i)<<10,i<128)return s(t,n,e);if(i=o[r.pos++],n|=(127&i)<<17,i<128)return s(t,n,e);if(i=o[r.pos++],n|=(127&i)<<24,i<128)return s(t,n,e);if(i=o[r.pos++],n|=(1&i)<<31,i<128)return s(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.
 pos,e=this.pos;return this.pos=t,t-e>=12&&o?function(t,e,r){return o.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){var n="",i=e;for(;i<r;){var o,a,s,u=t[i],l=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h>r)break;1===h?u<128&&(l=u):2===h?128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===h?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===h&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,h=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),i+=h}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var r=a(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},re
 adPackedSVarint:function(t){if(this.type!==i.Bytes)return t.push(this.readSVarint());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==i.Bytes)return t.push(this.readBoolean());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==i.Bytes)return t.push(this.readFloat());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==i.Bytes)return t.push(this.readDouble());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed32());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed32());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(
 this.type!==i.Bytes)return t.push(this.readFixed64());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed64());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===i.Varint)for(;this.buf[this.pos++]>127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),_(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),_(this.buf,t,this.pos),this.pos+=4},writeFixed64:
 function(t){this.realloc(8),_(this.buf,-1&t,this.pos),_(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),_(this.buf,-1&t,this.pos),_(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,n;t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?1
 28:0),!t)return;e.buf[e.pos++]=127&t}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,o=0;o<e.length;o++){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){n>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&u(e,r,this),
 this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),n.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),n.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&u(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,i.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,l,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,d,e)},writePacked
 SFixed32:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},write
 BooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(t,e){(function(){var e;t.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return e},getLink:function(t){return"https://fonts.google.com/specimen/"+t.replace(/( )/g,"+")},normalizeName:function(t){return t}},e=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata",
 "Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenl
 a","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban",
 "Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara
 ","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Led
 ger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountain
 s of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","P
 etit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluk
 o","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo
  Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(this)},function(t,e,r){"use strict";(function(t){
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author   Feross Aboukhadijeh <http://feross.org>
+ * @license  MIT
+ */
+var n=r(8),i=r(3),o=r(9);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return l(this,t,e,r)}function l(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e
 ).__proto__=u.prototype:t=p(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|f(e.length);return 0===(t=s(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?s(t,0):p(t,e);if("Buffer"===e.type&&o(e.data))return p(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e){if(h(e),t=s(t,e<0?0:0|f(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function p(t,e){var r=
 e.length<0?0:0|f(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function f(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(t).length;default:if(n)return z(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":retu
 rn O(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return P(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function
  v(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var h=-1;for(o=r;o<s;o++)if(l(t,o)===l(e,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*a}else-1!==h&&(o-=o-h),h=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var c=!0,p=0;p<u;p++)if(l(t,o+p)!==l(e,p)){c=!1;break}if(c)return o}return-1}function _(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function b(t,e,r,n){return B(z(e,t.length-r),t,r,n)}function x(t,e,r,n){return B(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return x(t,e,r,n)}function S(t,e,r,n){return B(U
 (e),t,r,n)}function T(t,e,r,n){return B(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function C(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,l=t[i],h=null,c=l>239?4:l>223?3:l>191?2:1;if(i+c<=r)switch(c){case 1:l<128&&(h=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(h=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fr
 omCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return l(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return h(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return c(null,
 t)},u.allocUnsafeSlow=function(t){return c(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype
 .swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):g.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")
 ),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),l=this.slice(n,i),h=t.slice(e,r),c=0;c<s;++c)if(l[c]!==h[c]){o=l[c],a=h[c];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0
 ,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return x(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function O(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(va
 r i="",o=e;o<r;++o)i+=D(t[o]);return i}function I(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function F(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function A(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function k(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,o){return o||k(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function j(t,e
 ,r,n,o){return o||k(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+1677721
 6*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||L(t,4,
 this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,655
 35,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):A(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):A(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&
 t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):A(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):A(this,
 t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeo
 f e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=u.isBuffer(t)?t:z(new u(t,n).toString()),s=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var G=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function z(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),
 i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(G,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function B(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(4))},function(t,e,r){"use strict";e.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=l(t),a=n[0],s=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),h=0,c=s>0?a-4:a;for(r=0;r<c;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t
 .charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[h++]=e>>16&255,u[h++]=e>>8&255,u[h++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[h++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[h++]=e>>8&255,u[h++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(h(t,a,a+16383>s?s:a+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,r){for(var i,o,a=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.pu
 sh(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";function n(){return function(){throw new Error("Unimplemented abstract method.")}()}r.r(e);var i=0;function o(t){return t.ol_uid||(t.ol_uid=String(++i))}var a,s=(a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=function(t){function e(e){var r=this,n="Assertion failed. See https://openlayers.org/en/"+("v"+"6.4.2".split("-")[0])+"/doc/errors/#"+e+" for details.";return(r=t.call(this,n)||this).code=e,r.name="AssertionError",r.message=n,r}return s(e,t),e}(Error);function l(t){t.stopProp
 agation()}var h=function(){function t(t){this.propagationStopped,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.propagationStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}(),c="propertychange",p=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function f(t,e){return t>e?1:t<e?-1:0}function d(t,e){return t.indexOf(e)>=0}function g(t,e,r){var n=t.length;if(t[0]<=e)return 0;if(e<=t[n-1])return n-1;var i=void 0;if(r>0){for(i=1;i<n;++i)if(t[i]<e)return i-1}else if(r<0){for(i=1;i<n;++i)if(t[i]<=e)return i}else for(i=1;i<n;++i){if(t[i]==e)return i;if(t[i]<e)return t[i-1]-e<e-t[i]?i-1:i}return n-1}function y(t,e,r){for(;e<r;){var n=t[e];t[e]=t[r],t[r]=n,++e,--r}}function m(t,e){for(var r=Array.isArray(e)?e:[e],n=r.length,i=0;i<n;i++)t[t.length]=r[i]}function v(t,e){for(var r,n=t.length>>>0,i=0;i
 <n;i++)if(e(r=t[i],i,t))return r;return null}function _(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function b(t,e){var r;return!t.every((function(n,i){return r=i,!e(n,i,t)}))?r:-1}function x(){return!0}function w(){return!1}function S(){}var T="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),n=1,i=arguments.length;n<i;++n){var o=arguments[n];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(r[a]=o[a])}return r};function E(t){for(var e in t)delete t[e]}var C="function"==typeof Object.values?Object.values:function(t){var e=[];for(var r in t)e.push(t[r]);return e};function P(t){var e;for(e in t)return!1;return!e}var R=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e
 ,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),O=function(t){function e(e){var r=t.call(this)||this;return r.eventTarget_=e,r.pendingRemovals_=null,r.dispatching_=null,r.listeners_=null,r}return R(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var r=this.listeners_||(this.listeners_={}),n=r[t]||(r[t]=[]);-1===n.indexOf(e)&&n.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new h(t):t,r=e.type;e.target||(e.target=this.eventTarget_||this);var n,i=this.listeners_&&this.listeners_[r];if(i){var o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});r in o||(o[r]=0,a[r]=0),++o[r];for(var s=0,u=i.length;s<u;++s)if(!1===(n="handleEvent"in i[s]?i[s].handleEvent(e):i[s].call(this,e))||e.propagationStopped){n=!1;break}if(--o[r],0===o[r]){var l=a[r];for(delete a[r];l--;)this.removeEventListener(r,S);delete o[r]}return n}},e.prototype.disposeInternal=fu
 nction(){this.listeners_&&E(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var r=this.listeners_&&this.listeners_[t];if(r){var n=r.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(r[n]=S,++this.pendingRemovals_[t]):(r.splice(n,1),0===r.length&&delete this.listeners_[t]))}},e}(p),I="change",L="error",M="clear",F="contextmenu",A="click",k="dblclick",N="dragenter",j="dragover",G="drop",D="keydown",z="keypress",U="load",B="resize",Y="touchmove",V="wheel";function W(t,e,r,n,i){if(n&&n!==t&&(r=r.bind(n)),i){var o=r;r=function(){t.removeEventListener(e,r),o.apply(this,arguments)}}var a={target:t,type:e,listener:r};return t.addEventListener(e,r),a}function q(t,e,r,n){return W(t,e,r,n,!0)}function X(t){t&&t.target&&(t.target.removeEventListene
 r(t.type,t.listener),E(t))}var Z=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function K(t){if(Array.isArray(t))for(var e=0,r=t.length;e<r;++e)X(t[e]);else X(t)}var H=function(t){function e(){var e=t.call(this)||this;return e.revision_=0,e}return Z(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(I)},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var r=t.length,n=new Array(r),i=0;i<r;++i)n[i]=W(this,t[i],e);return n}return W(this,t,e)},e.prototype.once=function(t,e){var r;if(Array.isArray(t)){var n=t.length;r=new Array(n);for(var i=0;i<n;++i)r[i]=q(this,t[i],e)}else r=q(this,t,e);return e.ol_key=r,r},e.prototype.un=fu
 nction(t,e){var r=e.ol_key;if(r)K(r);else if(Array.isArray(t))for(var n=0,i=t.length;n<i;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)},e}(O),J=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.key=r,i.oldValue=n,i}return J(e,t),e}(h),Q=function(t){function e(e){var r=t.call(this)||this;return o(r),r.values_=null,void 0!==e&&r.setProperties(e),r}return J(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&T({},this.v
 alues_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var r;r=et(t),this.dispatchEvent(new $(r,t,e)),r=c,this.dispatchEvent(new $(r,t,e))},e.prototype.set=function(t,e,r){var n=this.values_||(this.values_={});if(r)n[t]=e;else{var i=n[t];n[t]=e,i!==e&&this.notify(t,i)}},e.prototype.setProperties=function(t,e){for(var r in t)this.set(r,t[r],e)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var r=this.values_[t];delete this.values_[t],P(this.values_)&&(this.values_=null),e||this.notify(t,r)}},e}(H),tt={};function et(t){return tt.hasOwnProperty(t)?tt[t]:tt[t]="change:"+t}var rt=Q,nt="add",it="remove",ot=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype
 ,new n)}}(),at="length",st=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.element=r,i.index=n,i}return ot(e,t),e}(h),ut=function(t){function e(e,r){var n=t.call(this)||this,i=r||{};if(n.unique_=!!i.unique,n.array_=e||[],n.unique_)for(var o=0,a=n.array_.length;o<a;++o)n.assertUnique_(n.array_[o],o);return n.updateLength_(),n}return ot(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,r=t.length;e<r;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,r=0,n=e.length;r<n;++r)t(e[r],r,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(at)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new st(nt,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototy
 pe.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,r=0,n=e.length;r<n;++r)if(e[r]===t)return this.removeAt(r)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new st(it,e,t)),e},e.prototype.setAt=function(t,e){var r=this.getLength();if(t<r){this.unique_&&this.assertUnique_(e,t);var n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new st(it,n,t)),this.dispatchEvent(new st(nt,e,t))}else{for(var i=r;i<t;++i)this.insertAt(i,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(at,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var r=0,n=this.array_.length;r<n;++r)if(this.array_[r]===t&&r!==e)throw new u(58)},e}(rt);function lt(t,e){if(!t)throw new u(e)}var ht=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof A
 rray&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var ct=function(t){function e(e){var r=t.call(this)||this;if(r.id_=void 0,r.geometryName_="geometry",r.style_=null,r.styleFunction_=void 0,r.geometryChangeKey_=null,r.addEventListener(et(r.geometryName_),r.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var n=e;r.setGeometry(n)}else{var i=e;r.setProperties(i)}return r}return ht(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var r=this.getGeometry();r&&t.setGeometry(r.clone());var n=this.getStyle();return n&&t.setStyle(n),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return 
 this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(X(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=W(t,I,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;var e;Array.isArray(t)?e=t:(lt("function"==typeof t.getZIndex,41),e=[t]);return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeEventListener(et(this.geometryName_),this.handleGeometryChanged_),this.geometryName_=t,this.addEventListener(et(this.geometryName_),this.han
 dleGeometryChanged_),this.handleGeometryChanged_()},e}(rt),pt="XY",ft="XYZ",dt="XYM",gt="XYZM",yt={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},mt={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},vt={};vt[mt.DEGREES]=2*Math.PI*6370997/360,vt[mt.FEET]=.3048,vt[mt.METERS]=1,vt[mt.USFEET]=1200/3937;var _t=mt,bt=new Array(6);function xt(t){return St(t,1,0,0,1,0,0)}function wt(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=e[0],l=e[1],h=e[2],c=e[3],p=e[4],f=e[5];return t[0]=r*u+i*l,t[1]=n*u+o*l,t[2]=r*h+i*c,t[3]=n*h+o*c,t[4]=r*p+i*f+a,t[5]=n*p+o*f+s,t}function St(t,e,r,n,i,o,a){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=o,t[5]=a,t}function Tt(t,e){var r=e[0],n=e[1];return e[0]=t[0]*r+t[2]*n+t[4],e[1]=t[1]*r+t[3]*n+t[5],e}function Et(t,e,r){return wt(t,St(
 bt,e,0,0,r,0,0))}function Ct(t,e,r,n,i,o,a,s){var u=Math.sin(o),l=Math.cos(o);return t[0]=n*l,t[1]=i*u,t[2]=-n*u,t[3]=i*l,t[4]=a*n*l-s*n*u+e,t[5]=a*i*u+s*i*l+r,t}function Pt(t,e){var r,n=(r=e)[0]*r[3]-r[1]*r[2];lt(0!==n,32);var i=e[0],o=e[1],a=e[2],s=e[3],u=e[4],l=e[5];return t[0]=s/n,t[1]=-o/n,t[2]=-a/n,t[3]=i/n,t[4]=(a*l-s*u)/n,t[5]=-(i*l-o*u)/n,t}function Rt(t){return"matrix("+t.join(", ")+")"}var Ot="bottom-left",It="bottom-right",Lt="top-left",Mt="top-right",Ft=0,At=1,kt=2,Nt=4,jt=8,Gt=16;function Dt(t){for(var e=Xt(),r=0,n=t.length;r<n;++r)te(e,t[r]);return e}function zt(t,e,r){return r?(r[0]=t[0]-e,r[1]=t[1]-e,r[2]=t[2]+e,r[3]=t[3]+e,r):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function Ut(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Bt(t,e,r){var n,i;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(i=r<t[1]?t[1]-r:t[3]<r?r-t[3]:0)*i}function Yt(t,e){return Wt(t,e[0],e[1])}function Vt(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Wt(t,e,r){
 return t[0]<=e&&e<=t[2]&&t[1]<=r&&r<=t[3]}function qt(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],a=e[0],s=e[1],u=Ft;return a<r?u|=Gt:a>i&&(u|=Nt),s<n?u|=jt:s>o&&(u|=kt),u===Ft&&(u=At),u}function Xt(){return[1/0,1/0,-1/0,-1/0]}function Zt(t,e,r,n,i){return i?(i[0]=t,i[1]=e,i[2]=r,i[3]=n,i):[t,e,r,n]}function Kt(t){return Zt(1/0,1/0,-1/0,-1/0,t)}function Ht(t,e){var r=t[0],n=t[1];return Zt(r,n,r,n,e)}function Jt(t,e,r,n,i){return re(Kt(i),t,e,r,n)}function $t(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Qt(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function te(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function ee(t,e){for(var r=0,n=e.length;r<n;++r)te(t,e[r]);return t}function re(t,e,r,n,i){for(;r<n;r+=i)ne(t,e[r],e[r+1]);return t}function ne(t,e,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],r)}function ie(t,e)
 {var r;return(r=e(ae(t)))||(r=e(se(t)))||(r=e(de(t)))?r:(r=e(fe(t)))||!1}function oe(t){var e=0;return me(t)||(e=ge(t)*ce(t)),e}function ae(t){return[t[0],t[1]]}function se(t){return[t[2],t[1]]}function ue(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function le(t,e){var r;return e===Ot?r=ae(t):e===It?r=se(t):e===Lt?r=fe(t):e===Mt?r=de(t):lt(!1,13),r}function he(t,e,r,n,i){var o=e*n[0]/2,a=e*n[1]/2,s=Math.cos(r),u=Math.sin(r),l=o*s,h=o*u,c=a*s,p=a*u,f=t[0],d=t[1],g=f-l+p,y=f-l-p,m=f+l-p,v=f+l+p,_=d-h-c,b=d-h+c,x=d+h+c,w=d+h-c;return Zt(Math.min(g,y,m,v),Math.min(_,b,x,w),Math.max(g,y,m,v),Math.max(_,b,x,w),i)}function ce(t){return t[3]-t[1]}function pe(t,e,r){var n=r||[1/0,1/0,-1/0,-1/0];return ye(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):Kt(n),n}function fe(t){return[t[0],t[3]]}function de(t){return[t[2],t[3]]}function ge(t){return t[2]-t[0]}function ye(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3
 ]>=e[1]}function me(t){return t[2]<t[0]||t[3]<t[1]}function ve(t,e){var r=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=r,t[2]+=r,t[1]-=n,t[3]+=n}function _e(t,e,r,n){var i=[];if(n>1)for(var o=t[2]-t[0],a=t[3]-t[1],s=0;s<n;++s)i.push(t[0]+o*s/n,t[1],t[2],t[1]+a*s/n,t[2]-o*s/n,t[3],t[0],t[3]-a*s/n);else i=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(i,i,2);for(var u=[],l=[],h=(s=0,i.length);s<h;s+=2)u.push(i[s]),l.push(i[s+1]);return function(t,e,r){return Zt(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),r)}(u,l,r)}function be(t,e){var r=e.getExtent(),n=ue(t);if(e.canWrapX()&&(n[0]<r[0]||n[0]>=r[2])){var i=ge(r),o=Math.floor((n[0]-r[0])/i)*i;t[0]-=o,t[2]-=o}return t}var xe=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.glob
 al&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||vt[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorld
 Extent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();function we(t,e,r){return Math.min(Math.max(t,e),r)}var Se="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},Te="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function Ee(t,e,r,n,i,o){var a=i-r,s=o-n;if(0!==a||0!==s){var u=((t-r)*a+(e-n)*s)/(a*a+s*s);u>1?(r=i,n=o):u>0&&(r+=a*u,n+=s*u)}return Ce(t,e,r,n)}function Ce(t,e,r,n){var i=r-t,o=n-e;return i*i+o*o}function Pe(t){return 180*t/Math.PI}function Re(t){return t*Math.PI/180}function Oe(t,e){var r=t%e;return r*e<0?r+e:r}function Ie(t,e,r){return t+r*(e-t)}var Le=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){thi
 s.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Me=6378137*Math.PI,Fe=[-Me,-Me,Me,Me],Ae=[-180,-85,180,85],ke=function(t){function e(e){return t.call(this,{code:e,units:_t.METERS,extent:Fe,global:!0,worldExtent:Ae,getPointResolution:function(t,e){return t/Se(e[1]/6378137)}})||this}return Le(e,t),e}(xe),Ne=[new ke("EPSG:3857"),new ke("EPSG:102100"),new ke("EPSG:102113"),new ke("EPSG:900913"),new ke("urn:ogc:def:crs:EPSG:6.18:3:3857"),new ke("urn:ogc:def:crs:EPSG::3857"),new ke("http://www.opengis.net/gml/srs/epsg.xml#3857")];function je(t,e,r){var n=t.length,i=r>1?r:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(n));for(var a=Me,s=0;s<n;s+=i){o[s]=a*t[s]/180;var u=6378137*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));u>a?u=a:u<-a&&(u=-a),o[s+1]=u}return o}function Ge(t,e,r){var n=t.length,i=r>1?r:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(n));for(var a=0;a<n;a+=i)o[a]=180*t[a]/Me,o[a+1]=360*Math.atan(Math.exp(t[a+1]/6378137))/Math.PI-90
 ;return o}var De=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ze=[-180,-90,180,90],Ue=6378137*Math.PI/180,Be=function(t){function e(e,r){return t.call(this,{code:e,units:_t.DEGREES,extent:ze,axisOrientation:r,global:!0,metersPerUnit:Ue,worldExtent:ze})||this}return De(e,t),e}(xe),Ye=[new Be("CRS:84"),new Be("EPSG:4326","neu"),new Be("urn:ogc:def:crs:EPSG::4326","neu"),new Be("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Be("urn:ogc:def:crs:OGC:1.3:CRS84"),new Be("urn:ogc:def:crs:OGC:2:84"),new Be("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Be("urn:x-ogc:def:crs:EPSG:4326","neu")],Ve={};var We={};function qe(t,e,r){var n=t.getCode(),i=e.getCode();n in We||(We[n]={}),We[n][i]=r}function Xe(t,e){
 var r;return t in We&&e in We[t]&&(r=We[t][e]),r}function Ze(t,e,r){var n=r||6371008.8,i=Re(t[1]),o=Re(e[1]),a=(o-i)/2,s=Re(e[0]-t[0])/2,u=Math.sin(a)*Math.sin(a)+Math.sin(s)*Math.sin(s)*Math.cos(i)*Math.cos(o);return 2*n*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))}function Ke(t,e){for(var r=0,n=0,i=t.length;n<i-1;++n)r+=Ze(t[n],t[n+1],e);return r}function He(t,e){for(var r=0,n=t.length,i=t[n-1][0],o=t[n-1][1],a=0;a<n;a++){var s=t[a][0],u=t[a][1];r+=Re(s-i)*(2+Math.sin(Re(o))+Math.sin(Re(u))),i=s,o=u}return r*e*e/2}function Je(t,e,r,n){var i=n||6371008.8,o=Re(t[1]),a=Re(t[0]),s=e/i,u=Math.asin(Math.sin(o)*Math.cos(s)+Math.cos(o)*Math.sin(s)*Math.cos(r));return[Pe(a+Math.atan2(Math.sin(r)*Math.sin(s)*Math.cos(o),Math.cos(s)-Math.sin(o)*Math.sin(u))),Pe(u)]}function $e(t,e,r){var n=void 0!==r?t.toFixed(r):""+t,i=n.indexOf(".");return(i=-1===i?n.length:i)>e?n:new Array(1+e-i).join("0")+n}function Qe(t,e){for(var r=(""+t).split("."),n=(""+e).split("."),i=0;i<Math.max(r.length,n.length);i++)
 {var o=parseInt(r[i]||"0",10),a=parseInt(n[i]||"0",10);if(o>a)return 1;if(a>o)return-1}return 0}function tr(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function er(t,e){var r,n,i=t[0],o=t[1],a=e[0],s=e[1],u=a[0],l=a[1],h=s[0],c=s[1],p=h-u,f=c-l,d=0===p&&0===f?0:(p*(i-u)+f*(o-l))/(p*p+f*f||0);return d<=0?(r=u,n=l):d>=1?(r=h,n=c):(r=u+d*p,n=l+d*f),[r,n]}function rr(t,e,r){var n=Oe(e+180,360)-180,i=Math.abs(3600*n),o=r||0,a=Math.pow(10,o),s=Math.floor(i/3600),u=Math.floor((i-3600*s)/60),l=i-3600*s-60*u;return(l=Math.ceil(l*a)/a)>=60&&(l=0,u+=1),u>=60&&(u=0,s+=1),s+"° "+$e(u,2)+"′ "+$e(l,2,o)+"″"+(0==n?"":" "+t.charAt(n<0?1:0))}function nr(t,e,r){return t?e.replace("{x}",t[0].toFixed(r)).replace("{y}",t[1].toFixed(r)):""}function ir(t,e){for(var r=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){r=!1;break}return r}function or(t,e){var r=Math.cos(e),n=Math.sin(e),i=t[0]*r-t[1]*n,o=t[1]*r+t[0]*n;return t[0]=i,t[1]=o,t}function ar(t,e){return t[0]*=e,t[1]*=e,t}function sr(t,e){var r=t[0]-e[0],n=t[1
 ]-e[1];return r*r+n*n}function ur(t,e){return Math.sqrt(sr(t,e))}function lr(t,e){return sr(t,er(t,e))}function hr(t,e){return nr(t,"{x}, {y}",e)}function cr(t,e){if(e.canWrapX()){var r=ge(e.getExtent()),n=pr(t,e,r);n&&(t[0]-=n*r)}return t}function pr(t,e,r){var n=e.getExtent(),i=0;if(e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])){var o=r||ge(n);i=Math.floor((t[0]-n[0])/o)}return i}function fr(t,e,r){var n;if(void 0!==e){for(var i=0,o=t.length;i<o;++i)e[i]=t[i];n=e}else n=t.slice();return n}function dr(t,e,r){if(void 0!==e&&t!==e){for(var n=0,i=t.length;n<i;++n)e[n]=t[n];t=e}return t}function gr(t){!function(t,e){Ve[t]=e}(t.getCode(),t),qe(t,t,fr)}function yr(t){return"string"==typeof t?Ve[t]||null:t||null}function mr(t,e,r,n){var i,o=(t=yr(t)).getPointResolutionFunc();if(o)i=o(e,r),n&&n!==t.getUnits()&&(a=t.getMetersPerUnit())&&(i=i*a/vt[n]);else if(t.getUnits()==_t.DEGREES&&!n||n==_t.DEGREES)i=e;else{var a,s=Tr(t,yr("EPSG:4326")),u=[r[0]-e/2,r[1],r[0]+e/2,r[1],r[0],r[1]-e/2,r[0],r[1]+e/2];
 i=(Ze((u=s(u,u,2)).slice(0,2),u.slice(2,4))+Ze(u.slice(4,6),u.slice(6,8)))/2,void 0!==(a=n?vt[n]:t.getMetersPerUnit())&&(i/=a)}return i}function vr(t){!function(t){t.forEach(gr)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&qe(e,t,fr)}))}))}function _r(t,e){return t?"string"==typeof t?yr(t):t:yr(e)}function br(t){return function(e,r,n){for(var i=e.length,o=void 0!==n?n:2,a=void 0!==r?r:new Array(i),s=0;s<i;s+=o){var u=t([e[s],e[s+1]]);a[s]=u[0],a[s+1]=u[1];for(var l=o-1;l>=2;--l)a[s+l]=e[s+l]}return a}}function xr(t,e,r,n){var i=yr(t),o=yr(e);qe(i,o,br(r)),qe(o,i,br(n))}function wr(t,e){return Cr(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function Sr(t,e){if(t===e)return!0;var r=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||Tr(t,e)===fr)&&r}function Tr(t,e){var r=Xe(t.getCode(),e.getCode());return r||(r=dr),r}function Er(t,e){return Tr(yr(t),yr(e))}function Cr(t,e,r){return Er(e,r)(t,void 0,t.length)}function Pr(t,e,r,n){return _e(t,Er(e,r),void 0,n)}var Rr,O
 r,Ir,Lr=null;function Mr(){return Lr}function Fr(t,e){return Lr?Cr(t,e,Lr):t}function Ar(t,e){return Lr?Cr(t,Lr,e):t}function kr(t,e){return Lr?Pr(t,e,Lr):t}function Nr(t,e){return Lr?Pr(t,Lr,e):t}function jr(t,e,r){return function(n){var i,o,a=n[0],s=n[1];if(t.canWrapX()){var u=t.getExtent(),l=ge(u);(o=pr(n,t,l))&&(a-=o*l),a=we(a,u[0],u[2]),s=we(s,u[1],u[3]),i=r([a,s])}else i=r(n);return o&&e.canWrapX()&&(i[0]+=o*ge(e.getExtent())),i}}function Gr(t,e,r,n,i,o){for(var a=o||[],s=0,u=e;u<r;u+=n){var l=t[u],h=t[u+1];a[s++]=i[0]*l+i[2]*h+i[4],a[s++]=i[1]*l+i[3]*h+i[5]}return o&&a.length!=s&&(a.length=s),a}function Dr(t,e,r,n,i,o,a){for(var s=a||[],u=Math.cos(i),l=Math.sin(i),h=o[0],c=o[1],p=0,f=e;f<r;f+=n){var d=t[f]-h,g=t[f+1]-c;s[p++]=h+d*u-g*l,s[p++]=c+d*l+g*u;for(var y=f+2;y<f+n;++y)s[p++]=t[y]}return a&&s.length!=p&&(s.length=p),s}function zr(t,e,r,n,i,o,a){for(var s=a||[],u=0,l=e;l<r;l+=n){s[u++]=t[l]+i,s[u++]=t[l+1]+o;for(var h=l+2;h<l+n;++h)s[u++]=t[h]}return a&&s.length!=u&&(s.
 length=u),s}vr(Ne),vr(Ye),Rr=Ne,Or=je,Ir=Ge,Ye.forEach((function(t){Rr.forEach((function(e){qe(t,e,Or),qe(e,t,Ir)}))}));var Ur=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Br=[1,0,0,1,0,0],Yr=function(t){function e(){var e,r,n,i,o,a=t.call(this)||this;return a.extent_=[1/0,1/0,-1/0,-1/0],a.extentRevision_=-1,a.simplifiedGeometryMaxMinSquaredTolerance=0,a.simplifiedGeometryRevision=0,a.simplifyTransformedInternal=(e=function(t,e,r){if(!r)return this.getSimplifiedGeometry(e);var n=this.clone();return n.applyTransform(r),n.getSimplifiedGeometry(e)},o=!1,function(){var t=Array.prototype.slice.call(arguments);return o&&this===i&&_(t,n)||(o=!0,i=this,n=t,r=e.apply(this,arguments)),r}),a}return Ur(e,t),e.protot
 ype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return n()},e.prototype.closestPointXY=function(t,e,r,i){return n()},e.prototype.containsXY=function(t,e){var r=this.getClosestPoint([t,e]);return r[0]===t&&r[1]===e},e.prototype.getClosestPoint=function(t,e){var r=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],r,1/0),r},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return n()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Kt(e),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){n()},e.prototype.scale=function(t,e,r){n()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifie
 dGeometry=function(t){return n()},e.prototype.getType=function(){return n()},e.prototype.applyTransform=function(t){n()},e.prototype.intersectsExtent=function(t){return n()},e.prototype.translate=function(t,e){n()},e.prototype.transform=function(t,e){var r=yr(t),n=r.getUnits()==_t.TILE_PIXELS?function(t,n,i){var o=r.getExtent(),a=r.getWorldExtent(),s=ce(a)/ce(o);return Ct(Br,a[0],a[3],s,-s,0,0,0),Gr(t,0,t.length,i,Br,n),Er(r,e)(t,n,i)}:Er(r,e);return this.applyTransform(n),this},e}(rt),Vr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Wr(t){var e;return t==pt?e=2:t==ft||t==dt?e=3:t==gt&&(e=4),e}var qr=function(t){function e(){var e=t.call(this)||this;return e.layout=pt,e.stride=2,e.flatCoordinates
 =null,e}return Vr(e,t),e.prototype.computeExtent=function(t){return Jt(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return n()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredToleran
 ce=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=Wr(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){n()},e.prototype.setLayout=function(t,e,r){var n;if(t)n=Wr(t);else{for(var i=0;i<r;++i){if(0===e.length)return this.layout=pt,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=pt:3==t?e=ft:4==t&&(e=gt);return e}(n=e.length)}this.layout=t,this.stride=n},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var r=this.getFlatCoordinates();if(r){var n=this.getStride();Dr(r,0,r.length,n,t,e,r),this.changed()}},e.prototype.scale=function(t,e,r){var n=e;void 0===n&&(n=t);var i=r;i||(i=ue(this.getExtent()));var o=this.getFlatCoordinates();if(o){var a=this.getStride();!function(t,e,r,n,i,o,a,s){for(var u=
 s||[],l=a[0],h=a[1],c=0,p=e;p<r;p+=n){var f=t[p]-l,d=t[p+1]-h;u[c++]=l+i*f,u[c++]=h+o*d;for(var g=p+2;g<p+n;++g)u[c++]=t[g]}s&&u.length!=c&&(u.length=c)}(o,0,o.length,a,t,n,i,o),this.changed()}},e.prototype.translate=function(t,e){var r=this.getFlatCoordinates();if(r){var n=this.getStride();zr(r,0,r.length,n,t,e,r),this.changed()}},e}(Yr);function Xr(t,e,r,n,i,o,a){var s,u=t[e],l=t[e+1],h=t[r]-u,c=t[r+1]-l;if(0===h&&0===c)s=e;else{var p=((i-u)*h+(o-l)*c)/(h*h+c*c);if(p>1)s=r;else{if(p>0){for(var f=0;f<n;++f)a[f]=Ie(t[e+f],t[r+f],p);return void(a.length=n)}s=e}}for(f=0;f<n;++f)a[f]=t[s+f];a.length=n}function Zr(t,e,r,n,i){var o=t[e],a=t[e+1];for(e+=n;e<r;e+=n){var s=t[e],u=t[e+1],l=Ce(o,a,s,u);l>i&&(i=l),o=s,a=u}return i}function Kr(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){var s=r[o];i=Zr(t,e,s,n,i),e=s}return i}function Hr(t,e,r,n,i,o,a,s,u,l,h){if(e==r)return l;var c,p;if(0===i){if((p=Ce(a,s,t[e],t[e+1]))<l){for(c=0;c<n;++c)u[c]=t[e+c];return u.length=n,p}return l}for(var f=h||[N
 aN,NaN],d=e+n;d<r;)if(Xr(t,d-n,d,n,a,s,f),(p=Ce(a,s,f[0],f[1]))<l){for(l=p,c=0;c<n;++c)u[c]=f[c];u.length=n,d+=n}else d+=n*Math.max((Math.sqrt(p)-Math.sqrt(l))/i|0,1);if(o&&(Xr(t,r-n,e,n,a,s,f),(p=Ce(a,s,f[0],f[1]))<l)){for(l=p,c=0;c<n;++c)u[c]=f[c];u.length=n}return l}function Jr(t,e,r,n,i,o,a,s,u,l,h){for(var c=h||[NaN,NaN],p=0,f=r.length;p<f;++p){var d=r[p];l=Hr(t,e,d,n,i,o,a,s,u,l,c),e=d}return l}function $r(t,e,r,n){for(var i=0,o=r.length;i<o;++i)t[e++]=r[i];return e}function Qr(t,e,r,n){for(var i=0,o=r.length;i<o;++i)for(var a=r[i],s=0;s<n;++s)t[e++]=a[s];return e}function tn(t,e,r,n,i){for(var o=i||[],a=0,s=0,u=r.length;s<u;++s){var l=Qr(t,e,r[s],n);o[a++]=l,e=l}return o.length=a,o}function en(t,e,r,n,i,o,a){var s=(r-e)/n;if(s<3){for(;e<r;e+=n)o[a++]=t[e],o[a++]=t[e+1];return a}var u=new Array(s);u[0]=1,u[s-1]=1;for(var l=[e,r-n],h=0;l.length>0;){for(var c=l.pop(),p=l.pop(),f=0,d=t[p],g=t[p+1],y=t[c],m=t[c+1],v=p+n;v<c;v+=n){var _=Ee(t[v],t[v+1],d,g,y,m);_>f&&(h=v,f=_)}f>i&&(
 u[(h-e)/n]=1,p+n<h&&l.push(p,h),h+n<c&&l.push(h,c))}for(v=0;v<s;++v)u[v]&&(o[a++]=t[e+v*n],o[a++]=t[e+v*n+1]);return a}function rn(t,e,r,n,i,o,a,s){for(var u=0,l=r.length;u<l;++u){var h=r[u];a=en(t,e,h,n,i,o,a),s.push(a),e=h}return a}function nn(t,e){return e*Math.round(t/e)}function on(t,e,r,n,i,o,a){if(e==r)return a;var s,u,l=nn(t[e],i),h=nn(t[e+1],i);e+=n,o[a++]=l,o[a++]=h;do{if(s=nn(t[e],i),u=nn(t[e+1],i),(e+=n)==r)return o[a++]=s,o[a++]=u,a}while(s==l&&u==h);for(;e<r;){var c=nn(t[e],i),p=nn(t[e+1],i);if(e+=n,c!=s||p!=u){var f=s-l,d=u-h,g=c-l,y=p-h;f*y==d*g&&(f<0&&g<f||f==g||f>0&&g>f)&&(d<0&&y<d||d==y||d>0&&y>d)?(s=c,u=p):(o[a++]=s,o[a++]=u,l=s,h=u,s=c,u=p)}}return o[a++]=s,o[a++]=u,a}function an(t,e,r,n,i,o,a,s){for(var u=0,l=r.length;u<l;++u){var h=r[u];a=on(t,e,h,n,i,o,a),s.push(a),e=h}return a}function sn(t,e,r,n,i){for(var o=void 0!==i?i:[],a=0,s=e;s<r;s+=n)o[a++]=t.slice(s,s+n);return o.length=a,o}function un(t,e,r,n,i){for(var o=void 0!==i?i:[],a=0,s=0,u=r.length;s<u;++s)
 {var l=r[s];o[a++]=sn(t,e,l,n,o[a]),e=l}return o.length=a,o}function ln(t,e,r,n,i){for(var o=void 0!==i?i:[],a=0,s=0,u=r.length;s<u;++s){var l=r[s];o[a++]=un(t,e,l,n,o[a]),e=l[l.length-1]}return o.length=a,o}function hn(t,e,r,n){for(var i=0,o=t[r-n],a=t[r-n+1];e<r;e+=n){var s=t[e],u=t[e+1];i+=a*s-o*u,o=s,a=u}return i/2}function cn(t,e,r,n){for(var i=0,o=0,a=r.length;o<a;++o){var s=r[o];i+=hn(t,e,s,n),e=s}return i}var pn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fn=function(t){function e(e,r){var n=t.call(this)||this;return n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===r||Array.isArray(e[0])?n.setCoordinates(e,r):n.setFlatCoordinates(r,e),n}return pn(e,t),e.prototype.clone=function(){return new e(this
 .flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,n){return n<Bt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Zr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Hr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,r,n))},e.prototype.getArea=function(){return hn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return sn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[];return r.length=en(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r,0),new e(r,pt)},e.prototype.getType=function(){return yt.LINEAR_RING},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]
 ),this.flatCoordinates.length=Qr(this.flatCoordinates,0,t,this.stride),this.changed()},e}(qr),dn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gn=function(t){function e(e,r){var n=t.call(this)||this;return n.setCoordinates(e,r),n}return dn(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,n){var i=this.flatCoordinates,o=Ce(t,e,i[0],i[1]);if(o<n){for(var a=this.stride,s=0;s<a;++s)r[s]=i[s];return r.length=a,o}return n},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return Ht(this.flatCoordinates,t)},e.prototype.getType=function(){return 
 yt.POINT},e.prototype.intersectsExtent=function(t){return Wt(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=$r(this.flatCoordinates,0,t,this.stride),this.changed()},e}(qr);function yn(t,e,r,n,i){return!ie(i,(function(i){return!mn(t,e,r,n,i[0],i[1])}))}function mn(t,e,r,n,i,o){for(var a=0,s=t[r-n],u=t[r-n+1];e<r;e+=n){var l=t[e],h=t[e+1];u<=o?h>o&&(l-s)*(o-u)-(i-s)*(h-u)>0&&a++:h<=o&&(l-s)*(o-u)-(i-s)*(h-u)<0&&a--,s=l,u=h}return 0!==a}function vn(t,e,r,n,i,o){if(0===r.length)return!1;if(!mn(t,e,r[0],n,i,o))return!1;for(var a=1,s=r.length;a<s;++a)if(mn(t,r[a-1],r[a],n,i,o))return!1;return!0}function _n(t,e,r,n,i,o,a){for(var s,u,l,h,c,p,d,g=i[o+1],y=[],m=0,v=r.length;m<v;++m){var _=r[m];for(h=t[_-n],p=t[_-n+1],s=e;s<_;s+=n)c=t[s],d=t[s+1],(g<=p&&d<=g||p<=g&&g<=d)&&(l=(g-p)/(d-p)*(c-h)+h,y.push(l)),h=c,p=d}var b=NaN,x=-1/0;for(y.sort(f),h=y[0],
 s=1,u=y.length;s<u;++s){c=y[s];var w=Math.abs(c-h);w>x&&vn(t,e,r,n,l=(h+c)/2,g)&&(b=l,x=w),h=c}return isNaN(b)&&(b=i[o]),a?(a.push(b,g,x),a):[b,g,x]}function bn(t,e,r,n,i){for(var o=[],a=0,s=r.length;a<s;++a){var u=r[a];o=_n(t,e,u,n,i,2*a,o),e=u[u.length-1]}return o}function xn(t,e,r,n,i){for(var o,a=[t[e],t[e+1]],s=[];e+n<r;e+=n){if(s[0]=t[e+n],s[1]=t[e+n+1],o=i(a,s))return o;a[0]=s[0],a[1]=s[1]}return!1}function wn(t,e,r,n,i){var o=re([1/0,1/0,-1/0,-1/0],t,e,r,n);return!!ye(i,o)&&(!!Vt(i,o)||(o[0]>=i[0]&&o[2]<=i[2]||(o[1]>=i[1]&&o[3]<=i[3]||xn(t,e,r,n,(function(t,e){return function(t,e,r){var n=!1,i=qt(t,e),o=qt(t,r);if(i===At||o===At)n=!0;else{var a=t[0],s=t[1],u=t[2],l=t[3],h=e[0],c=e[1],p=r[0],f=r[1],d=(f-c)/(p-h),g=void 0,y=void 0;o&kt&&!(i&kt)&&(n=(g=p-(f-l)/d)>=a&&g<=u),n||!(o&Nt)||i&Nt||(n=(y=f-(p-u)*d)>=s&&y<=l),n||!(o&jt)||i&jt||(n=(g=p-(f-s)/d)>=a&&g<=u),n||!(o&Gt)||i&Gt||(n=(y=f-(p-a)*d)>=s&&y<=l)}return n}(i,t,e)})))))}function Sn(t,e,r,n,i){if(!function(t,e,r,n,i){ret
 urn!!wn(t,e,r,n,i)||(!!mn(t,e,r,n,i[0],i[1])||(!!mn(t,e,r,n,i[0],i[3])||(!!mn(t,e,r,n,i[2],i[1])||!!mn(t,e,r,n,i[2],i[3]))))}(t,e,r[0],n,i))return!1;if(1===r.length)return!0;for(var o=1,a=r.length;o<a;++o)if(yn(t,r[o-1],r[o],n,i)&&!wn(t,r[o-1],r[o],n,i))return!1;return!0}function Tn(t,e,r,n){for(;e<r-n;){for(var i=0;i<n;++i){var o=t[e+i];t[e+i]=t[r-n+i],t[r-n+i]=o}e+=n,r-=n}}function En(t,e,r,n){for(var i=!0,o=0;o<n;++o)if(t[e+o]!==t[r-n+o]){i=!1;break}i&&(r-=n);var a=function(t,e,r,n){for(var i=-1,o=1/0,a=1/0,s=e;s<r;s+=n){var u=t[s],l=t[s+1];l>o||(l==o&&u>=a||(i=s,o=l,a=u))}return i}(t,e,r,n),s=a-n;s<e&&(s=r-n);var u=a+n;u>=r&&(u=e);var l=t[s],h=t[s+1],c=t[a],p=t[a+1],f=t[u],d=t[u+1];return c*d+l*p+h*f-(h*c+p*f+l*d)<0}function Cn(t,e,r,n,i){for(var o=void 0!==i&&i,a=0,s=r.length;a<s;++a){var u=r[a],l=En(t,e,u,n);if(0===a){if(o&&l||!o&&!l)return!1}else if(o&&!l||!o&&l)return!1;e=u}return!0}function Pn(t,e,r,n,i){for(var o=void 0!==i&&i,a=0,s=r.length;a<s;++a){var u=r[a],l=En(t,e,u,
 n);(0===a?o&&l||!o&&!l:o&&!l||!o&&l)&&Tn(t,e,u,n),e=u}return e}function Rn(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o)e=Pn(t,e,r[o],n,i);return e}var On=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),In=function(t){function e(e,r,n){var i=t.call(this)||this;return i.ends_=[],i.flatInteriorPointRevision_=-1,i.flatInteriorPoint_=null,i.maxDelta_=-1,i.maxDeltaRevision_=-1,i.orientedRevision_=-1,i.orientedFlatCoordinates_=null,void 0!==r&&n?(i.setFlatCoordinates(r,e),i.ends_=n):i.setCoordinates(e,r),i}return On(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?m(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.
 length),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice())},e.prototype.closestPointXY=function(t,e,r,n){return n<Bt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Kr(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Jr(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,r,n))},e.prototype.containsXY=function(t,e){return vn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return cn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Pn(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,un(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.g
 etRevision()){var t=ue(this.getExtent());this.flatInteriorPoint_=_n(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new gn(this.getFlatInteriorPoint(),dt)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new fn(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,r=this.ends_,n=[],i=0,o=0,a=r.length;o<a;++o){var s=r[o],u=new fn(e.slice(i,s),t);n.push(u),i=s}return n},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Cn(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Pn(this.or
 ientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],n=[];return r.length=an(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),r,0,n),new e(r,pt,n)},e.prototype.getType=function(){return yt.POLYGON},e.prototype.intersectsExtent=function(t){return Sn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var r=tn(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===r.length?0:r[r.length-1],this.changed()},e}(qr),Ln=In;function Mn(t,e,r,n){for(var i=r||32,o=[],a=0;a<i;++a)m(o,Je(t,e,2*Math.PI*a/i,n));return o.push(o[0],o[1]),new In(o,pt,[o.length])}function Fn(t){var e=t[0],r=t[1],n=t[2],i=t[3],o=[e,r,e,i,n,i,n,r,e,r];return new In(o,pt,[o.length])}function An(t,e,r){for(var n=e||32,i=t.getStri
 de(),o=t.getLayout(),a=t.getCenter(),s=i*(n+1),u=new Array(s),l=0;l<s;l+=i){u[l]=0,u[l+1]=0;for(var h=2;h<i;h++)u[l+h]=a[h]}var c=[u.length],p=new In(u,o,c);return kn(p,a,t.getRadius(),r),p}function kn(t,e,r,n){for(var i=t.getFlatCoordinates(),o=t.getStride(),a=i.length/o-1,s=n||0,u=0;u<=a;++u){var l=u*o,h=s+2*Oe(u,a)*Math.PI/a;i[l]=e[0]+r*Math.cos(h),i[l+1]=e[1]+r*Math.sin(h)}t.changed()}var Nn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jn="accuracy",Gn="accuracyGeometry",Dn="altitude",zn="altitudeAccuracy",Un="heading",Bn="position",Yn="projection",Vn="speed",Wn="tracking",qn="trackingOptions",Xn=function(t){function e(e){var r=t.call(this,L)||this;return r.code=e.code,r.message=e.message,r}return Nn
 (e,t),e}(h),Zn=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.position_=null,r.transform_=dr,r.watchId_=void 0,r.addEventListener(et(Yn),r.handleProjectionChanged_),r.addEventListener(et(Wn),r.handleTrackingChanged_),void 0!==n.projection&&r.setProjection(n.projection),void 0!==n.trackingOptions&&r.setTrackingOptions(n.trackingOptions),r.setTracking(void 0!==n.tracking&&n.tracking),r}return Nn(e,t),e.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=Tr(yr("EPSG:4326"),t),this.position_&&this.set(Bn,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||
 (navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var e=t.coords;this.set(jn,e.accuracy),this.set(Dn,null===e.altitude?void 0:e.altitude),this.set(zn,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(Un,null===e.heading?void 0:Re(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];var r=this.transform_(this.position_);this.set(Bn,r),this.set(Vn,null===e.speed?void 0:e.speed);var n=Mn(this.position_,e.accuracy);n.applyTransform(this.transform_),this.set(Gn,n),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new Xn(t))},e.prototype.getAccuracy=function(){return this.get(jn)},e.prototype.getAccuracyGeometry=function(){return this.get(Gn)||null},e.prototype.getAltitude=function(){return this.get(Dn)},e.prototype.getAltitudeAccuracy=function(){return this.get(zn)},e.prototype.getHeading=function(){return this.get(U
 n)},e.prototype.getPosition=function(){return this.get(Bn)},e.prototype.getProjection=function(){return this.get(Yn)},e.prototype.getSpeed=function(){return this.get(Vn)},e.prototype.getTracking=function(){return this.get(Wn)},e.prototype.getTrackingOptions=function(){return this.get(qn)},e.prototype.setProjection=function(t){this.set(Yn,yr(t))},e.prototype.setTracking=function(t){this.set(Wn,t)},e.prototype.setTrackingOptions=function(t){this.set(qn,t)},e}(rt),Kn=function(){function t(t,e,r){this.decay_=t,this.minVelocity_=e,this.delay_=r,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var r=e-3;r>0&&this.points_[r+2]>t;)r-=3;var n=this.points_[e+2]-this.points_[r+2]
 ;if(n<1e3/60)return!1;var i=this.points_[e]-this.points_[r],o=this.points_[e+1]-this.points_[r+1];return this.angle_=Math.atan2(o,i),this.initialVelocity_=Math.sqrt(i*i+o*o)/n,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),Hn=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Jn=/^([a-z]*)$|^hsla?\(.*\)$/i;function $n(t){return"string"==typeof t?t:oi(t)}function Qn(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var r=getComputedStyle(e).color;return document.body.removeChild(e),r}return""}var ti,ei,ri=(ti={},ei=0,function(t){var e;if(ti.hasOwnProperty(t))e=ti[t];else{if(ei>=1024){var r=0;for(var n in ti)0==(3&r++)&&(delete ti[n],--ei)}e=function(t){var e,r,n,i,o;if(Jn.exec(t)&&(t=Qn(t)),Hn.exec(t)){var a=t.length-1,s=void 0;s=a<=4?1:2;var u=4===a||8===a;e=parseInt(t.substr(1+0*s
 ,s),16),r=parseInt(t.substr(1+1*s,s),16),n=parseInt(t.substr(1+2*s,s),16),i=u?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,r=(r<<4)+r,n=(n<<4)+n,u&&(i=(i<<4)+i)),o=[e,r,n,i/255]}else 0==t.indexOf("rgba(")?ii(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),ii(o)):lt(!1,14);return o}(t),ti[t]=e,++ei}return e});function ni(t){return Array.isArray(t)?t:ri(t)}function ii(t){return t[0]=we(t[0]+.5|0,0,255),t[1]=we(t[1]+.5|0,0,255),t[2]=we(t[2]+.5|0,0,255),t[3]=we(t[3],0,1),t}function oi(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var r=t[1];r!=(0|r)&&(r=r+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+r+","+n+","+(void 0===t[3]?1:t[3])+")"}var ai=function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExp
 ireCache()){var t=0;for(var e in this.cache_){var r=this.cache_[e];0!=(3&t++)||r.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,r){var n=si(t,e,r);return n in this.cache_?this.cache_[n]:null},t.prototype.set=function(t,e,r,n){var i=si(t,e,r);this.cache_[i]=n,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function si(t,e,r){return e+":"+t+":"+(r?$n(r):"null")}var ui=new ai,li="opacity",hi="visible",ci="extent",pi="zIndex",fi="maxResolution",di="minResolution",gi="maxZoom",yi="minZoom",mi="source",vi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_i=function(t){function e(e){var r=t.call(this)||this,n=T({},e);return n[li]=
 void 0!==e.opacity?e.opacity:1,lt("number"==typeof n[li],64),n[hi]=void 0===e.visible||e.visible,n[pi]=e.zIndex,n[fi]=void 0!==e.maxResolution?e.maxResolution:1/0,n[di]=void 0!==e.minResolution?e.minResolution:0,n[yi]=void 0!==e.minZoom?e.minZoom:-1/0,n[gi]=void 0!==e.maxZoom?e.maxZoom:1/0,r.className_=void 0!==n.className?e.className:"ol-layer",delete n.className,r.setProperties(n),r.state_=null,r}return vi(e,t),e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},r=this.getZIndex();return e.opacity=we(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==r?r:!1===e.managed?1/0:0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return n(
 )},e.prototype.getLayerStatesArray=function(t){return n()},e.prototype.getExtent=function(){return this.get(ci)},e.prototype.getMaxResolution=function(){return this.get(fi)},e.prototype.getMinResolution=function(){return this.get(di)},e.prototype.getMinZoom=function(){return this.get(yi)},e.prototype.getMaxZoom=function(){return this.get(gi)},e.prototype.getOpacity=function(){return this.get(li)},e.prototype.getSourceState=function(){return n()},e.prototype.getVisible=function(){return this.get(hi)},e.prototype.getZIndex=function(){return this.get(pi)},e.prototype.setExtent=function(t){this.set(ci,t)},e.prototype.setMaxResolution=function(t){this.set(fi,t)},e.prototype.setMinResolution=function(t){this.set(di,t)},e.prototype.setMaxZoom=function(t){this.set(gi,t)},e.prototype.setMinZoom=function(t){this.set(yi,t)},e.prototype.setOpacity=function(t){lt("number"==typeof t,64),this.set(li,t)},e.prototype.setVisible=function(t){this.set(hi,t)},e.prototype.setZIndex=function(t){this.set(p
 i,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(rt),bi="prerender",xi="postrender",wi="precompose",Si="postcompose",Ti="rendercomplete",Ei="undefined",Ci="loading",Pi="ready",Ri="error",Oi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Ii(t,e){if(!t.visible)return!1;var r=e.resolution;if(r<t.minResolution||r>=t.maxResolution)return!1;var n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var Li=function(t){function e(e){var r=this,n=T({},e);delete n.source,(r=t.call(this,n)||this).mapPrecomposeKey_=null,r.mapRenderKey_=null,r.sourceChangeKey_=null,r.renderer_=null,e.render&&(r.render=e.render),e.map&&r.setMap(e.m
 ap),r.addEventListener(et(mi),r.handleSourcePropertyChange_);var i=e.source?e.source:null;return r.setSource(i),r}return Oi(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(mi)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():Ei},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(X(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=W(t,I,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_.getFeatures(t)},e.prototype.render=function(t,e){var r=this.getRenderer();if(r.prepareFrame(t))return r.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(X(this.mapPrecomposeKey_),
 this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(X(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=W(t,wi,(function(t){var e=t.frameState.layerStatesArray,r=this.getLayerState(!1);lt(!e.some((function(t){return t.layer===r.layer})),67),e.push(r)}),this),this.mapRenderKey_=W(this,I,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(mi,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.setSource(null),t.prototype.disposeInternal.call(this)},e}(_i),Mi=function(){function t(){}return t.prototype.drawCustom=function(t,e,r){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection
 =function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}();function Fi(t){return Array.isArray(t)?oi(t):t}var Ai="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",ki=-1!==Ai.indexOf("firefox"),Ni=(-1!==Ai.indexOf("safari")&&Ai.indexOf("chrom"),-1!==Ai.indexOf("webkit")&&-1==Ai.indexOf("edge")),ji=-1!==Ai.indexOf("macintosh"),Gi="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,Di="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,zi="undefined"!=typeof Image&&Image.prototype.decode,Ui=function
 (){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}();function Bi(t,e,r){var n=r&&r.length?r.shift():Di?new OffscreenCanvas(t||300,e||300):document.createElement("canvas");return t&&(n.width=t),e&&(n.height=e),n.getContext("2d")}function Yi(t){var e=t.offsetWidth,r=getComputedStyle(t);return e+=parseInt(r.marginLeft,10)+parseInt(r.marginRight,10)}function Vi(t){var e=t.offsetHeight,r=getComputedStyle(t);return e+=parseInt(r.marginTop,10)+parseInt(r.marginBottom,10)}function Wi(t,e){var r=e.parentNode;r&&r.replaceChild(t,e)}function qi(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function Xi(t){for(;t.lastChild;)t.removeChild(t.lastChild)}var Zi=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3
 }((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),Ki=["style","variant","weight","size","lineHeight","family"],Hi=function(t){var e=t.match(Zi);if(!e)return null;for(var r={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,i=Ki.length;n<i;++n){var o=e[n+1];void 0!==o&&(r[Ki[n]]=o)}return r.families=r.family.split(/,\s?/),r},Ji=[],$i=[0,0,0,0],Qi=new rt,to=new O;to.setSize=function(){console.warn("labelCache is deprecated.")};var eo,ro,no,io=null,oo={},ao=function(){var t,e,r=["monospace","serif"],n=r.length,i="wmytzilWMYTZIL@#/&?$%10";function o(t,o,a){for(var s=!0,u=0;u<n;++u){var l=r[u];if(e=lo(t+" "+o+" 32px "+l,i),a!=l){var h=lo(t+" "+o+" 32px "+a+","+l,i);s=s&&h!=e}}return!!s}function a(){for(var e=!0,r=Qi.getKeys(),n=0,i=r.length;n<i;++n){var a=r[n];Qi.get(a)<100&&(o.apply(this,a.split("
 \n"))?(E(oo),io=null,eo=void 0,Qi.set(a,100)):(Qi.set(a,Qi.get(a)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var r=Hi(e);if(r)for(var n=r.families,i=0,s=n.length;i<s;++i){var u=n[i],l=r.style+"\n"+r.weight+"\n"+u;void 0===Qi.get(l)&&(Qi.set(l,100,!0),o(r.style,r.weight,u)||(Qi.set(l,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),so=(no=oo,function(t){var e=no[t];if(null==e)if(Di){var r=Hi(t),n=uo(t,"Žg"),i=isNaN(Number(r.lineHeight))?1.2:Number(r.lineHeight);oo[t]=i*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else ro||((ro=document.createElement("div")).innerHTML="M",ro.style.margin="0 !important",ro.style.padding="0 !important",ro.style.position="absolute !important",ro.style.left="-99999px !important"),ro.style.font=t,document.body.appendChild(ro),e=ro.offsetHeight,no[t]=e,document.body.removeChild(ro);return e});function uo(t,e){return io||(io=Bi(1,1)),t!=eo&&(io.font=t,eo=io.font),io.measureText(e)}function lo(t,e){return uo(t,e).width}function ho
 (t,e,r){if(e in r)return r[e];var n=lo(t,e);return r[e]=n,n}function co(t,e,r,n){0!==e&&(t.translate(r,n),t.rotate(e),t.translate(-r,-n))}function po(t,e,r,n,i,o,a,s,u,l,h){t.save(),1!==r&&(t.globalAlpha*=r),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(u,l),t.scale(h[0],h[1]),function(t,e){for(var r=t.contextInstructions,n=0,i=r.length;n<i;n+=2)Array.isArray(r[n+1])?e[r[n]].apply(e,r[n+1]):e[r[n]]=r[n+1]}(n,t)):h[0]<0||h[1]<0?(t.translate(u,l),t.scale(h[0],h[1]),t.drawImage(n,i,o,a,s,0,0,a,s)):t.drawImage(n,i,o,a,s,u,l,a*h[0],s*h[1]),t.restore()}var fo=null;function go(t){return Di?Rt(t):(fo||(fo=Bi(1,1).canvas),fo.style.transform=Rt(t),fo.style.transform)}var yo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=
 r.prototype,new n)}}(),mo=function(t){function e(e,r,n,i,o,a,s){var u=t.call(this)||this;return u.context_=e,u.pixelRatio_=r,u.extent_=n,u.transform_=i,u.viewRotation_=o,u.squaredTolerance_=a,u.userTransform_=s,u.contextFillState_=null,u.contextStrokeState_=null,u.contextTextState_=null,u.fillState_=null,u.strokeState_=null,u.image_=null,u.imageAnchorX_=0,u.imageAnchorY_=0,u.imageHeight_=0,u.imageOpacity_=0,u.imageOriginX_=0,u.imageOriginY_=0,u.imageRotateWithView_=!1,u.imageRotation_=0,u.imageScale_=[0,0],u.imageWidth_=0,u.text_="",u.textOffsetX_=0,u.textOffsetY_=0,u.textRotateWithView_=!1,u.textRotation_=0,u.textScale_=[0,0],u.textFillState_=null,u.textStrokeState_=null,u.textState_=null,u.pixelCoordinates_=[],u.tmpLocalTransform_=[1,0,0,1,0,0],u}return yo(e,t),e.prototype.drawImages_=function(t,e,r,n){if(this.image_){var i=Gr(t,e,r,2,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,s=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=s*this.image
 Opacity_);var u=this.imageRotation_;this.imageRotateWithView_&&(u+=this.viewRotation_);for(var l=0,h=i.length;l<h;l+=2){var c=i[l]-this.imageAnchorX_,p=i[l+1]-this.imageAnchorY_;if(0!==u||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var f=c+this.imageAnchorX_,d=p+this.imageAnchorY_;Ct(a,f,d,1,1,u,-f,-d),o.setTransform.apply(o,a),o.translate(f,d),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,p,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=s)}},e.prototype.drawText_=function(t,e,r,n){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStroke
 State_),this.setContextTextState_(this.textState_);var i=Gr(t,e,r,n,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<r;e+=n){var s=i[e]+this.textOffsetX_,u=i[e+1]+this.textOffsetY_;if(0!==a||1!=this.textScale_[0]||1!=this.textScale_[1]){var l=Ct(this.tmpLocalTransform_,s,u,1,1,a,-s,-u);o.setTransform.apply(o,l),o.translate(s,u),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,s,u),this.textFillState_&&o.fillText(this.text_,s,u)}}},e.prototype.moveToLineTo_=function(t,e,r,n,i){var o=this.context_,a=Gr(t,e,r,n,this.transform_,this.pixelCoordinates_);o.moveTo(a[0],a[1]);var s=a.length;i&&(s-=2);for(var u=2;u<s;u+=2)o.lineTo(a[u],a[u+1]);return i&&o.closePath(),r},e.prototype.drawRings_=function(t,e,r,n){for(var i=0,o=r.length;i<
 o;++i)e=this.moveToLineTo_(t,e,r[i],n,!0);return e},e.prototype.drawCircle=function(t){if(ye(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,r){var n=t.getFlatCoordinates();if(n){var i=t.getStride();return Gr(n,0,n.length,i,e,r)}return null}(t,this.transform_,this.pixelCoordinates_),r=e[2]-e[0],n=e[3]-e[1],i=Math.sqrt(r*r+n*n),o=this.context_;o.beginPath(),o.arc(e[0],e[1],i,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case yt.POINT:this.drawPoint(t);break;case yt.LINE_STRING:this.drawLi
 neString(t);break;case yt.POLYGON:this.drawPolygon(t);break;case yt.MULTI_POINT:this.drawMultiPoint(t);break;case yt.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case yt.MULTI_POLYGON:this.drawMultiPolygon(t);break;case yt.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case yt.CIRCLE:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var r=e.getGeometryFunction()(t);r&&ye(this.extent_,r.getExtent())&&(this.setStyle(e),this.drawGeometry(r))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),r=0,n=e.length;r<n;++r)this.drawGeometry(e[r])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),r=t.getStride();this.image_&&this.drawImages_(e,0,e.length,r),""!==this.text_&&this.drawText_(e,0,e.length,r)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)
 );var e=t.getFlatCoordinates(),r=t.getStride();this.image_&&this.drawImages_(e,0,e.length,r),""!==this.text_&&this.drawText_(e,0,e.length,r)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ye(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,r=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(r,0,r.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var n=t.getFlatMidpoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(ye(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var r=this.context_,n=t.getFlatCoordinates(),i=0,o=t.getEnds(),a=t.getStride();r.beginPath();for(var s=0,u=o.length;s<u;++s)i=this.moveToLineTo_(n,i,o[s],a,!1);r.stroke()}if("
 "!==this.text_){var l=t.getFlatMidpoints();this.drawText_(l,0,l.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ye(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var r=t.getFlatInteriorPoint();this.drawText_(r,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ye(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.
 context_,r=t.getOrientedFlatCoordinates(),n=0,i=t.getEndss(),o=t.getStride();e.beginPath();for(var a=0,s=i.length;a<s;++a){var u=i[a];n=this.drawRings_(r,n,u,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var l=t.getFlatInteriorPoints();this.drawText_(l,0,l.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,r=this.contextFillState_;r?r.fillStyle!=t.fillStyle&&(r.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,r=this.contextStrokeState_;r?(r.lineCap!=t.lineCap&&(r.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&(_(r.lineDash,t.lineDash)||e.setLineDash(r.lineDash=t.lineDash),r.lineDashOffset!=t.lineDashOffset&&(r.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),r.lineJoin!=t.lineJoin&&(r.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),r.lineWidth!=t.lineWidth&&(r.lineWi
 dth=t.lineWidth,e.lineWidth=t.lineWidth),r.miterLimit!=t.miterLimit&&(r.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),r.strokeStyle!=t.strokeStyle&&(r.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,r=this.contextTextState_,n=t.textAlign?t.textAlign:"center";r?(r.font!=t.font&&(r.font=t.font,e.font=t.font),r.textAlign!=n&&(r.textAlign=n,e.textAlign=n),r.textBaseline!=t.textBaseline&&(r.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_
 ={font:t.font,textAlign:n,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){if(t){var r=t.getColor();this.fillState_={fillStyle:Fi(r||"#000")}}else this.fillState_=null;if(e){var n=e.getColor(),i=e.getLineCap(),o=e.getLineDash(),a=e.getLineDashOffset(),s=e.getLineJoin(),u=e.getWidth(),l=e.getMiterLimit();this.strokeState_={lineCap:void 0!==i?i:"round",lineDash:o||Ji,lineDashOffset:a||0,lineJoin:void 0!==s?s:"round",lineWidth:this.pixelRatio_*(void 0!==u?u:1),miterLimit:void 0!==l?l:10,strokeStyle:Fi(n||"#000")}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){if(t){var e=t.getSize();if(e){var r=t.getAnchor(),n=t.getImage(1),i=t.getOrigin(),o=t.getScaleArray();this.imageAnchorX_=r[0],this.imageAnchorY_=r[1],this.imageHeight_=e[1],this.image_=n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=i[0],this.imageOriginY_=i[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=[this.pixelRatio_
 *o[0],this.pixelRatio_*o[1]],this.imageWidth_=e[0]}else this.image_=null}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var r=e.getColor();this.textFillState_={fillStyle:Fi(r||"#000")}}else this.textFillState_=null;var n=t.getStroke();if(n){var i=n.getColor(),o=n.getLineCap(),a=n.getLineDash(),s=n.getLineDashOffset(),u=n.getLineJoin(),l=n.getWidth(),h=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:"round",lineDash:a||Ji,lineDashOffset:s||0,lineJoin:void 0!==u?u:"round",lineWidth:void 0!==l?l:1,miterLimit:void 0!==h?h:10,strokeStyle:Fi(i||"#000")}}else this.textStrokeState_=null;var c=t.getFont(),p=t.getOffsetX(),f=t.getOffsetY(),d=t.getRotateWithView(),g=t.getRotation(),y=t.getScaleArray(),m=t.getText(),v=t.getTextAlign(),_=t.getTextBaseline();this.textState_={font:void 0!==c?c:"10px sans-serif",textAlign:void 0!==v?v:"center",textBaseline:void 0!==_?_:"middle"},this.text_=void 0!==m?m:"",this.textOffsetX_=void 0!==p?this.pix
 elRatio_*p:0,this.textOffsetY_=void 0!==f?this.pixelRatio_*f:0,this.textRotateWithView_=void 0!==d&&d,this.textRotation_=void 0!==g?g:0,this.textScale_=[this.pixelRatio_*y[0],this.pixelRatio_*y[1]]}else this.text_=""},e}(Mi),vo="Circle",_o="Default",bo="Image",xo="LineString",wo="Polygon",So="Text",To=0,Eo=1,Co=2,Po=3,Ro=4,Oo={Point:function(t,e,r,n){var i=r.getImage();if(i){if(i.getImageState()!=Co)return;var o=t.getBuilder(r.getZIndex(),bo);o.setImageStyle(i,t.addDeclutter(!1)),o.drawPoint(e,n)}var a=r.getText();if(a){var s=t.getBuilder(r.getZIndex(),So);s.setTextStyle(a,t.addDeclutter(!!i)),s.drawText(e,n)}},LineString:function(t,e,r,n){var i=r.getStroke();if(i){var o=t.getBuilder(r.getZIndex(),xo);o.setFillStrokeStyle(null,i),o.drawLineString(e,n)}var a=r.getText();if(a){var s=t.getBuilder(r.getZIndex(),So);s.setTextStyle(a,t.addDeclutter(!1)),s.drawText(e,n)}},Polygon:function(t,e,r,n){var i=r.getFill(),o=r.getStroke();if(i||o){var a=t.getBuilder(r.getZIndex(),wo);a.setFillStro
 keStyle(i,o),a.drawPolygon(e,n)}var s=r.getText();if(s){var u=t.getBuilder(r.getZIndex(),So);u.setTextStyle(s,t.addDeclutter(!1)),u.drawText(e,n)}},MultiPoint:function(t,e,r,n){var i=r.getImage();if(i){if(i.getImageState()!=Co)return;var o=t.getBuilder(r.getZIndex(),bo);o.setImageStyle(i,t.addDeclutter(!1)),o.drawMultiPoint(e,n)}var a=r.getText();if(a){var s=t.getBuilder(r.getZIndex(),So);s.setTextStyle(a,t.addDeclutter(!!i)),s.drawText(e,n)}},MultiLineString:function(t,e,r,n){var i=r.getStroke();if(i){var o=t.getBuilder(r.getZIndex(),xo);o.setFillStrokeStyle(null,i),o.drawMultiLineString(e,n)}var a=r.getText();if(a){var s=t.getBuilder(r.getZIndex(),So);s.setTextStyle(a,t.addDeclutter(!1)),s.drawText(e,n)}},MultiPolygon:function(t,e,r,n){var i=r.getFill(),o=r.getStroke();if(o||i){var a=t.getBuilder(r.getZIndex(),wo);a.setFillStrokeStyle(i,o),a.drawMultiPolygon(e,n)}var s=r.getText();if(s){var u=t.getBuilder(r.getZIndex(),So);u.setTextStyle(s,t.addDeclutter(!1)),u.drawText(e,n)}},Geo
 metryCollection:function(t,e,r,n){var i,o,a=e.getGeometriesArray();for(i=0,o=a.length;i<o;++i){(0,Oo[a[i].getType()])(t,a[i],r,n)}},Circle:function(t,e,r,n){var i=r.getFill(),o=r.getStroke();if(i||o){var a=t.getBuilder(r.getZIndex(),vo);a.setFillStrokeStyle(i,o),a.drawCircle(e,n)}var s=r.getText();if(s){var u=t.getBuilder(r.getZIndex(),So);u.setTextStyle(s,t.addDeclutter(!1)),u.drawText(e,n)}}};function Io(t,e){return parseInt(o(t),10)-parseInt(o(e),10)}function Lo(t,e){var r=Mo(t,e);return r*r}function Mo(t,e){return.5*t/e}function Fo(t,e,r,n,i,o){var a=!1,s=r.getImage();if(s){var u=s.getImageState();u==Co||u==Po?s.unlistenImageChange(i):(u==To&&s.load(),u=s.getImageState(),s.listenImageChange(i),a=!0)}return function(t,e,r,n,i){var o=r.getGeometryFunction()(e);if(!o)return;var a=o.simplifyTransformed(n,i);if(r.getRenderer())!function t(e,r,n,i){if(r.getType()==yt.GEOMETRY_COLLECTION){for(var o=r.getGeometries(),a=0,s=o.length;a<s;++a)t(e,o[a],n,i);return}e.getBuilder(n.getZIndex()
 ,_o).drawCustom(r,i,n.getRenderer())}(t,a,r,e);else{(0,Oo[a.getType()])(t,a,r,e)}}(t,e,r,n,o),a}function Ao(t){var e,r=t.frameState,n=wt(t.inversePixelTransform.slice(),r.coordinateToPixelTransform),i=Lo(r.viewState.resolution,r.pixelRatio),o=Mr();return o&&(e=Tr(o,r.viewState.projection)),new mo(t.context,r.pixelRatio,r.extent,n,r.viewState.rotation,i,e)}function ko(t,e){e&&e.clear();for(var r=t.declutterItems,n=r.length-1;n>=0;--n)for(var i=r[n],o=i.items,a=0,s=o.length;a<s;a+=3)e=o[a].renderDeclutter(o[a+1],o[a+2],i.opacity,e);return r.length=0,e}var No=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function jo(t,e){ui.expire()}var Go=function(t){function e(e){var r=t.call(this)||this;return r.map_=e,r.
 declutterTree_=null,r}return No(e,t),e.prototype.dispatchRenderEvent=function(t,e){n()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,r=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;Ct(r,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Pt(n,r)},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i,o,a,s){var u,l=e.viewState;function h(t,e,r){return i.call(o,e,t?r:null)}var c=l.projection,p=cr(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&n){var d=ge(c.getExtent());f.push([-d,0],[d,0])}var g,y=e.layerStatesArray,m=y.length;this.declutterTree_&&(g=this.declutterTree_.all().map((function(t){return t.value})));for(var v=[],_=0;_<f.length;_++)for(var b=m-1;b>=0;--b){var x=y[b],w=x.layer;if(w.hasRenderer()&&Ii(x,l)&&a.call(s,w)){var S=w.getRenderer(),T=w.getSource();if(S&&T){var E=T.getWrapX()?p:t,C=h.bind(null,x.managed);v[0]=E[0]+f[_][0],v[1]=E[1]+f[_][1],u=S.forEachFeatureAtCoordinate(v,e,r,C,g)}if(u)return u}}},e
 .prototype.forEachLayerAtPixel=function(t,e,r,i,o){return n()},e.prototype.hasFeatureAtCoordinate=function(t,e,r,n,i,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,r,n,x,this,i,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){this.declutterTree_=ko(t,this.declutterTree_)},e.prototype.scheduleExpireIconCache=function(t){ui.canExpireCache()&&t.postRenderFunctions.push(jo)},e}(p),Do=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),zo=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.inversePixelTransform=r,o.frameState=n,o.context=i,o}return Do(e,t),e}(h),Uo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Ar
 ray&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bo=function(t){function e(e){var r=t.call(this,e)||this;r.fontChangeListenerKey_=W(Qi,c,e.redrawText.bind(e)),r.element_=document.createElement("div");var n=r.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",r.element_.className="ol-unselectable ol-layers";var i=e.getViewport();return i.insertBefore(r.element_,i.firstChild||null),r.children_=[],r.renderedVisible_=!0,r}return Uo(e,t),e.prototype.dispatchRenderEvent=function(t,e){var r=this.getMap();if(r.hasListener(t)){var n=new zo(t,void 0,e);r.dispatchEvent(n)}},e.prototype.disposeInternal=function(){X(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(e){if(e){thi
 s.calculateMatrices2D(e),this.dispatchRenderEvent(wi,e);var r=e.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=e.viewState;this.children_.length=0;for(var i=null,o=0,a=r.length;o<a;++o){var s=r[o];if(e.layerIndex=o,Ii(s,n)&&(s.sourceState==Pi||s.sourceState==Ei)){var u=s.layer.render(e,i);u&&u!==i&&(this.children_.push(u),i=u)}}t.prototype.renderFrame.call(this,e),function(t,e){for(var r=t.childNodes,n=0;;++n){var i=r[n],o=e[n];if(!i&&!o)break;i!==o&&(i?o?t.insertBefore(o,i):(t.removeChild(i),--n):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent(Si,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,r,n,i){for(var o=e.viewState,a=e.layerStatesArray,s=a.length-1;s>=0;--s){var u=a[s],l=u.layer;if(l.hasRenderer()&&Ii(u,o)&&i(l)){var h=l.getRend
 erer().getDataAtPixel(t,e,r);if(h){var c=n(l,h);if(c)return c}}}},e}(Go),Yo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vo="layers",Wo=function(t){function e(e){var r=this,n=e||{},i=T({},n);delete i.layers;var o=n.layers;return(r=t.call(this,i)||this).layersListenerKeys_=[],r.listenerKeys_={},r.addEventListener(et(Vo),r.handleLayersChanged_),o?Array.isArray(o)?o=new ut(o.slice(),{unique:!0}):lt("function"==typeof o.getArray,43):o=new ut(void 0,{unique:!0}),r.setLayers(o),r}return Yo(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(X),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layers
 ListenerKeys_.push(W(t,nt,this.handleLayersAdd_,this),W(t,it,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(X);E(this.listenerKeys_);for(var r=t.getArray(),n=0,i=r.length;n<i;n++){var a=r[n];this.listenerKeys_[o(a)]=[W(a,c,this.handleLayerChange_,this),W(a,I,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[o(e)]=[W(e,c,this.handleLayerChange_,this),W(e,I,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=o(t.element);this.listenerKeys_[e].forEach(X),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get(Vo)},e.prototype.setLayers=function(t){this.set(Vo,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],r=e.length;this.getLayers().forEach((funct
 ion(t){t.getLayerStatesArray(e)}));for(var n=this.getLayerState(),i=r,o=e.length;i<o;i++){var a=e[i];a.opacity*=n.opacity,a.visible=a.visible&&n.visible,a.maxResolution=Math.min(a.maxResolution,n.maxResolution),a.minResolution=Math.max(a.minResolution,n.minResolution),a.minZoom=Math.max(a.minZoom,n.minZoom),a.maxZoom=Math.min(a.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==a.extent?a.extent=pe(a.extent,n.extent):a.extent=n.extent)}return e},e.prototype.getSourceState=function(){return Pi},e}(_i),qo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xo=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.map=r,i.frameState=void 0!==n?n:null,i}return qo(e,t),e}(h),Zo=function(){var t=function(e,r)
 {return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ko=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,o)||this;return a.originalEvent=n,a.pixel_=null,a.coordinate_=null,a.dragging=void 0!==i&&i,a}return Zo(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),this.o
 riginalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()},e}(Xo),Ho={SINGLECLICK:"singleclick",CLICK:A,DBLCLICK:k,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Jo="pointermove",$o="pointerdown",Qo="pointerup",ta="pointerout",ea=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ra=function(t){function e(e,r){var n=t.call(this,e)||this;n.map_=e,n.clickTimeoutId_,n.dragging_=!1,n.dragListenerKeys_=[],n.moveTolerance_=r?r*Gi:Gi,n.down_=nu
 ll;var i=n.map_.getViewport();return n.activePointers_=0,n.trackedTouches_={},n.element_=i,n.pointerdownListenerKey_=W(i,$o,n.handlePointerDown_,n),n.originalPointerMoveEvent_,n.relayedListenerKey_=W(i,Jo,n.relayEvent_,n),n.boundHandleTouchMove_=n.handleTouchMove_.bind(n),n.element_.addEventListener(Y,n.boundHandleTouchMove_,!!Ui&&{passive:!1}),n}return ea(e,t),e.prototype.emulateClick_=function(t){var e=new Ko(Ho.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Ko(Ho.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new Ko(Ho.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==Ho.POINTERUP||e.type==Ho.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==Ho.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.ke
 ys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new Ko(Ho.POINTERUP,this.map_,t);this.dispatchEvent(e),e.propagationStopped||this.dragging_||!this.isMouseActionButton_(t)||this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(X),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.updateActivePointers_(t);var e=new Ko(Ho.POINTERDOWN,this.map_,t);this.dispatchEvent(e),this.down_=t,0===this.dragListenerKeys_.length&&(this.dragListenerKeys_.push(W(document,Ho.POINTERMOVE,this.handlePointerMove_,this),W(document,Ho.POINTERUP,this.handlePointerUp_,this),W(this.element_,Ho.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==document&&this.dragListenerKeys_.push(W(this.element_.getRootNode(),Ho.POINTERUP,this.handlePoint
 erUp_,this)))},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new Ko(Ho.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new Ko(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){this.originalPointerMoveEvent_&&!this.originalPointerMoveEvent_.defaultPrevented||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(X(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Y,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(X(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(X),this.dragListenerK
 eys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(O),na="postrender",ia="movestart",oa="moveend",aa="layergroup",sa="size",ua="target",la="view",ha=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,E(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,r=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(r);return delete this.queuedElements_[n],r},t.prototype.enqueue=function(t){lt(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=1/0&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.get
 LeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,r=this.priorities_,n=e.length,i=e[t],o=r[t],a=t;t<n>>1;){var s=this.getLeftChildIndex_(t),u=this.getRightChildIndex_(t),l=u<n&&r[u]<r[s]?u:s;e[t]=e[l],r[t]=r[l],t=l}e[t]=i,r[t]=o,this.siftDown_(a,t)},t.prototype.siftDown_=function(t,e){for(var r=this.elements_,n=this.priorities_,i=r[e],o=n[e];e>t;){var a=this.getParentIndex_(e);if(!(n[a]>o))break;r[e]=r[a],n[e]=n[a],e=a}r[e]=i,n[e]=o},t.prototype.reprioritize=function(){var t,e,r,n=this.priorityFunction_,i=this.eleme
 nts_,o=this.priorities_,a=0,s=i.length;for(e=0;e<s;++e)(r=n(t=i[e]))==1/0?delete this.queuedElements_[this.keyFunction_(t)]:(o[a]=r,i[a++]=t);i.length=a,o.length=a,this.heapify_()},t}(),ca=0,pa=1,fa=2,da=3,ga=4,ya=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ma=function(t){function e(e,r){var n=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return n.boundHandleTileChange_=n.handleTileChange.bind(n),n.tileChangeCallback_=r,n.tilesLoading_=0,n.tilesLoadingKeys_={},n}return ya(e,t),e.prototype.enqueue=function(e){var r=t.prototype.enqueue.call(this,e);r&&e[0].addEventListener(I,this.boundHandleTileChange_);return r},e.prototype.getTilesLoading=function(){return 
 this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,r=e.getState();if(e.hifi&&r===fa||r===da||r===ga){e.removeEventListener(I,this.boundHandleTileChange_);var n=e.getKey();n in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[n],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var r,n,i=0;this.tilesLoading_<t&&i<e&&this.getCount()>0;)n=(r=this.dequeue()[0]).getKey(),r.getState()!==ca||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++i,r.load())},e}(ha);var va=0,_a=1,ba="center",xa="resolution",wa="rotation";function Sa(t,e,r){return function(n,i,o,a){if(n){var s=e?0:o[0]*i,u=e?0:o[1]*i,l=t[0]+s/2,h=t[2]-s/2,c=t[1]+u/2,p=t[3]-u/2;l>h&&(h=l=(h+l)/2),c>p&&(p=c=(p+c)/2);var f=we(n[0],l,h),d=we(n[1],c,p),g=30*i;return a&&r&&(f+=-g*Math.log(1+Math.max(0,l-n[0])/g)+g*Math.log(1+Math.max(0,n[0]-h)/g),d+=-g*Math.log(1+Math.max(0,c-n[1])/g)+g*Math.log(1+Math.max(0,n[1]-p)/g)),[f,d]}}}f
 unction Ta(t){return t}function Ea(t,e,r,n){var i=ge(e)/r[0],o=ce(e)/r[1];return n?Math.min(t,Math.max(i,o)):Math.min(t,Math.min(i,o))}function Ca(t,e,r){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,r&&(n=Math.max(n,r),n/=Math.log(1+50*Math.max(0,r/t-1))/50+1),we(n,r/2,2*e)}function Pa(t,e,r,n,i){return function(o,a,s,u){if(void 0!==o){var l=n?Ea(t,n,s,i):t;return(void 0===r||r)&&u?Ca(o,l,e):we(o,e,l)}}}function Ra(t){return void 0!==t?0:void 0}function Oa(t){return void 0!==t?t:void 0}function Ia(t){return Math.pow(t,3)}function La(t){return 1-Ia(1-t)}function Ma(t){return 3*t*t-2*t*t*t}function Fa(t){return t}var Aa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function ka(t,e){se
 tTimeout((function(){t(e)}),0)}function Na(t){return!(t.sourceCenter&&t.targetCenter&&!ir(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}var ja=function(t){function e(e){var r=t.call(this)||this,n=T({},e);return r.hints_=[0,0],r.animations_=[],r.updateAnimationKey_,r.projection_=_r(n.projection,"EPSG:3857"),r.viewportSize_=[100,100],r.targetCenter_=null,r.targetResolution_,r.targetRotation_,r.cancelAnchor_=void 0,n.center&&(n.center=Ar(n.center,r.projection_)),n.extent&&(n.extent=Nr(n.extent,r.projection_)),r.applyOptions_(n),r}return Aa(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,r,n,i=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28,a=void 0!==t.zoomFactor?t.zoomFactor:2,s=void 0!==t.multiWorld&&t.multiWorld,u=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,l=void 0!==t.showFullExtent&&t.showFullExtent,h=_r(t.projection,"EPSG:3857"),c=h.getExtent(),p=t.constr
 ainOnlyCenter,f=t.extent;s||f||!h.isGlobal()||(p=!1,f=c);if(void 0!==t.resolutions){var d=t.resolutions;r=d[i],n=void 0!==d[o]?d[o]:d[d.length-1],e=t.constrainResolution?function(t,e,r,n){return function(i,o,a,s){if(void 0!==i){var u=t[0],l=t[t.length-1],h=r?Ea(u,r,a,n):u;if(s)return void 0===e||e?Ca(i,h,l):we(i,l,h);var c=Math.min(h,i),p=Math.floor(g(t,c,o));return t[p]>h&&p<t.length-1?t[p+1]:t[p]}}}(d,u,!p&&f,l):Pa(r,n,u,!p&&f,l)}else{var y=(c?Math.max(ge(c),ce(c)):360*vt[_t.DEGREES]/h.getMetersPerUnit())/256/Math.pow(2,0),m=y/Math.pow(2,28);void 0!==(r=t.maxResolution)?i=0:r=y/Math.pow(a,i),void 0===(n=t.minResolution)&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?r/Math.pow(a,o):y/Math.pow(a,o):m),o=i+Math.floor(Math.log(r/n)/Math.log(a)),n=r/Math.pow(a,o-i),e=t.constrainResolution?function(t,e,r,n,i,o){return function(a,s,u,l){if(void 0!==a){var h=i?Ea(e,i,u,o):e,c=void 0!==r?r:0;if(l)return void 0===n||n?Ca(a,h,c):we(a,c,h);var p=Math.ceil(Math.log(e/h)/Math.log(t)-1e-9),f=-
 s*(.5-1e-9)+.5,d=Math.min(h,a),g=Math.floor(Math.log(e/d)/Math.log(t)+f),y=Math.max(p,g);return we(e/Math.pow(t,y),c,h)}}}(a,r,n,u,!p&&f,l):Pa(r,n,u,!p&&f,l)}return{constraint:e,maxResolution:r,minResolution:n,minZoom:i,zoomFactor:a}}(t);this.maxResolution_=e.maxResolution,this.minResolution_=e.minResolution,this.zoomFactor_=e.zoomFactor,this.resolutions_=t.resolutions,this.minZoom_=e.minZoom;var r=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Sa(t.extent,t.constrainOnlyCenter,e)}var r=_r(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&r.isGlobal()){var n=r.getExtent().slice();return n[0]=-1/0,n[2]=1/0,Sa(n,!1,!1)}return Ta}(t),n=e.constraint,i=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(o=i||Re(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=o?0:t:void 0}):!1===e?Oa:"number"==typeof e?(r=e,n=2*Math.PI/r,function(t,e){return e?t:void 0!==t?t=Math.floo
 r(t/n+.5)*n:void 0}):Oa}return Ra;var r,n;var i,o}(t);this.constraints_={center:r,resolution:n,rotation:i},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom),this.setProperties({}),this.options_=t},e.prototype.getUpdatedOptions_=function(t){var e=T({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),T({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),r=0;r<e.length;++r){var n=arguments[r];n.center&&((n=T({},n)).center=Ar(n.center,this.getProjection())),n.anchor&&((n=T({},n)).anchor=Ar(n.anchor,this.getProjection())),e[r]=n}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,r=arguments.length;if(r>1&&"fu
 nction"==typeof arguments[r-1]&&(e=arguments[r-1],--r),!this.isDef()){var n=arguments[r-1];return n.center&&this.setCenterInternal(n.center),void 0!==n.zoom&&this.setZoom(n.zoom),void 0!==n.rotation&&this.setRotation(n.rotation),void(e&&ka(e,!0))}for(var i=Date.now(),o=this.targetCenter_.slice(),a=this.targetResolution_,s=this.targetRotation_,u=[],l=0;l<r;++l){var h=arguments[l],c={start:i,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||Ma,callback:e};if(h.center&&(c.sourceCenter=o,c.targetCenter=h.center.slice(),o=c.targetCenter),void 0!==h.zoom?(c.sourceResolution=a,c.targetResolution=this.getResolutionForZoom(h.zoom),a=c.targetResolution):h.resolution&&(c.sourceResolution=a,c.targetResolution=h.resolution,a=c.targetResolution),void 0!==h.rotation){c.sourceRotation=s;var p=Oe(h.rotation-s+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=s+p,s=c.targetRotation}Na(c)?c.complete=!0:i+=c.duration,u.push(c)}this.animations_.push(u),this.setHint(va,1)
 ,this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[va]>0},e.prototype.getInteracting=function(){return this.hints_[_a]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(va,-this.hints_[va]);for(var e=0,r=this.animations_.length;e<r;++e){var n=this.animations_[e];if(n[0].callback&&ka(n[0].callback,!1),!t)for(var i=0,o=n.length;i<o;++i){var a=n[i];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,r=this.animations_.length-1;r>=0;--r){for(var n=this.animations_[r],i=!0,o=0,a=n.length;o<a;++o){var s=n[o];if(!s.complete){var u=t-s.start,l=s.duration>0?u/s.duration:1;l>=1?(s.complete=!0,l=1):i=!1;var h=s.easing(l);if(s.sourceCenter){var c=s.sourceCenter[0],p=s.sourceCenter[1],f=c+h*(s.targetCenter[0]-c),d=p+h*(
 s.targetCenter[1]-p);this.targetCenter_=[f,d]}if(s.sourceResolution&&s.targetResolution){var g=1===h?s.targetResolution:s.sourceResolution+h*(s.targetResolution-s.sourceResolution);if(s.anchor){var y=this.getViewportSize_(this.getRotation()),m=this.constraints_.resolution(g,0,y,!0);this.targetCenter_=this.calculateCenterZoom(m,s.anchor)}this.targetResolution_=g,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){var v=1===h?Oe(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+h*(s.targetRotation-s.sourceRotation);if(s.anchor){var _=this.constraints_.rotation(v,!0);this.targetCenter_=this.calculateCenterRotate(_,s.anchor)}this.targetRotation_=v}if(this.applyTargetState_(!0),e=!0,!s.complete)break}}if(i){this.animations_[r]=null,this.setHint(va,-1);var b=n[0].callback;b&&ka(b,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(
 this)))}},e.prototype.calculateCenterRotate=function(t,e){var r,n=this.getCenterInternal();return void 0!==n&&(or(r=[n[0]-e[0],n[1]-e[1]],t-this.getRotation()),tr(r,e)),r},e.prototype.calculateCenterZoom=function(t,e){var r,n=this.getCenterInternal(),i=this.getResolution();void 0!==n&&void 0!==i&&(r=[e[0]-t*(e[0]-n[0])/i,e[1]-t*(e[1]-n[1])/i]);return r},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var r=e[0],n=e[1];return[Math.abs(r*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(r*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Fr(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(ba)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.optio
 ns_.constrainResolution},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return kr(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSize_(),r=this.getCenterInternal();lt(r,1);var n=this.getResolution();lt(void 0!==n,2);var i=this.getRotation();return lt(void 0!==i,3),he(r,n,i,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResol
 ution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(xa)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(Nr(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var r=e||this.getViewportSize_(),n=ge(t)/r[0],i=ce(t)/r[1];return Math.max(n,i)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,r=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(r/n)/Math.log(e);return function(t){return r/Math.pow(e,t*i)}},e.prototype.getRotation=function(){return this.get(wa)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),r=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(r/n)/e;return function(t){return 
 Math.log(r/t)/e/i}},e.prototype.getState=function(){var t=this.getCenterInternal(),e=this.getProjection(),r=this.getResolution(),n=this.getRotation();return{center:t.slice(0),projection:void 0!==e?e:null,resolution:r,rotation:n,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,r,n=this.minZoom_||0;if(this.resolutions_){var i=g(this.resolutions_,t,1);n=i,e=this.resolutions_[i],r=i==this.resolutions_.length-1?2:e/this.resolutions_[i+1]}else e=this.maxResolution_,r=this.zoomFactor_;return n+Math.log(e/t)/Math.log(r)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=we(Math.floor(t),0,this.resolutions_.length-2),r=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(r,we(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototyp
 e.fit=function(t,e){var r,n=T({size:this.getViewportSize_()},e||{});if(lt(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))lt(!me(t),25),r=Fn(i=Nr(t,this.getProjection()));else if(t.getType()===yt.CIRCLE){var i;(r=Fn(i=Nr(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),ue(i))}else{var o=Mr();r=o?t.clone().transform(o,this.getProjection()):t}this.fitInternal(r,n)},e.prototype.fitInternal=function(t,e){var r=e||{},n=r.size;n||(n=this.getViewportSize_());var i,o=void 0!==r.padding?r.padding:[0,0,0,0],a=void 0!==r.nearest&&r.nearest;i=void 0!==r.minResolution?r.minResolution:void 0!==r.maxZoom?this.getResolutionForZoom(r.maxZoom):0;for(var s=t.getFlatCoordinates(),u=this.getRotation(),l=Math.cos(-u),h=Math.sin(-u),c=1/0,p=1/0,f=-1/0,d=-1/0,g=t.getStride(),y=0,m=s.length;y<m;y+=g){var v=s[y]*l-s[y+1]*h,_=s[y]*h+s[y+1]*l;c=Math.min(c,v),p=Math.min(p,_),f=Math.max(f,v),d=Math.max(d,_)}var b=this.getResolutionForExtentInternal([c,p,f,d],[n[0]
 -o[1]-o[3],n[1]-o[0]-o[2]]);b=isNaN(b)?i:Math.max(b,i),b=this.getConstrainedResolution(b,a?0:1),h=-h;var x=(c+f)/2,w=(p+d)/2,T=[(x+=(o[1]-o[3])/2*b)*l-(w+=(o[0]-o[2])/2*b)*h,w*l+x*h],E=r.callback?r.callback:S;void 0!==r.duration?this.animateInternal({resolution:b,center:this.getConstrainedCenter(T,b),duration:r.duration,easing:r.easing},E):(this.targetResolution_=b,this.targetCenter_=T,this.applyTargetState_(!1,!0),ka(E,!0))},e.prototype.centerOn=function(t,e,r){this.centerOnInternal(Ar(t,this.getProjection()),e,r)},e.prototype.centerOnInternal=function(t,e,r){var n=this.getRotation(),i=Math.cos(-n),o=Math.sin(-n),a=t[0]*i-t[1]*o,s=t[1]*i+t[0]*o,u=this.getResolution(),l=(a+=(e[0]/2-r[0])*u)*i-(s+=(r[1]-e[1]/2)*u)*(o=-o),h=s*i+a*o;this.setCenterInternal([l,h])},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=Fr(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prot
 otype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var r=e&&Ar(e,this.getProjection());this.adjustResolutionInternal(t,r)},e.prototype.adjustResolutionInternal=function(t,e){var r=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(this.targetResolution_*t,0,n,r);e&&(this.targetCenter_=this.calculateCenterZoom(i,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=Ar(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var r=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,r);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_(
 )},e.prototype.setCenter=function(t){this.setCenterInternal(Ar(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var r=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,r),i=this.getViewportSize_(n),o=this.constraints_.resolution(this.targetResolution_,0,i,r),a=this.constraints_.center(this.targetCenter_,o,i,r);this.get(wa)!==n&&this.set(wa,n),this.get(xa)!==o&&this.set(xa,o),this.get(ba)&&ir(this.get(ba),a)||this.set(ba,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=
 void 0},e.prototype.resolveConstraints=function(t,e,r){var n=void 0!==t?t:200,i=e||0,o=this.constraints_.rotation(this.targetRotation_),a=this.getViewportSize_(o),s=this.constraints_.resolution(this.targetResolution_,i,a),u=this.constraints_.center(this.targetCenter_,s,a);if(0===n&&!this.cancelAnchor_)return this.targetResolution_=s,this.targetRotation_=o,this.targetCenter_=u,void this.applyTargetState_();var l=r||(0===n?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===s&&this.getRotation()===o&&this.getCenterInternal()&&ir(this.getCenterInternal(),u)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:u,resolution:s,duration:n,easing:La,anchor:l}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(_a,1)},e.prototype.endInteraction=function(t,e,r){var n=r&&Ar(r,this.getProjection());this.endInteractionInternal(t,e,n)},e.prototype.endInteractionInternal=function(t,e,r){this.setHint(_a,-1),thi
 s.resolveConstraints(t,e,r)},e.prototype.getConstrainedCenter=function(t,e){var r=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),r)},e.prototype.getConstrainedZoom=function(t,e){var r=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(r,e))},e.prototype.getConstrainedResolution=function(t,e){var r=e||0,n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,r,n)},e}(rt);function Ga(t,e,r){return void 0===r&&(r=[0,0]),r[0]=t[0]+2*e,r[1]=t[1]+2*e,r}function Da(t,e,r){return void 0===r&&(r=[0,0]),r[0]=t[0]*e+.5|0,r[1]=t[1]*e+.5|0,r}function za(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var Ua=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r
 ),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var Ba=function(t){function e(e){var r=t.call(this)||this,n=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var r,n,i,o={},a=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Wo({layers:t.layers});o[aa]=a,o[ua]=t.target,o[la]=void 0!==t.view?t.view:new ja,void 0!==t.controls&&(Array.isArray(t.controls)?r=new ut(t.controls.slice()):(lt("function"==typeof t.controls.getArray,47),r=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?n=new ut(t.interactions.slice()):(lt("function"==typeof t.interactions.getArray,48),n=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?i=new ut(t.overlays.slice()):(lt("function"==typeof t.overlays.getArray,49),i=t.overlays):i=new ut;return{controls:r,interactions:n,keyboardEventTarget:e,overlays:i,values:o}}(e);return r.bou
 ndHandleBrowserEvent_=r.handleBrowserEvent.bind(r),r.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,r.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:Gi,r.postRenderTimeoutHandle_,r.animationDelayKey_,r.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(r),r.coordinateToPixelTransform_=[1,0,0,1,0,0],r.pixelToCoordinateTransform_=[1,0,0,1,0,0],r.frameIndex_=0,r.frameState_=null,r.previousExtent_=null,r.viewPropertyListenerKey_=null,r.viewChangeListenerKey_=null,r.layerGroupPropertyListenerKeys_=null,r.viewport_=document.createElement("div"),r.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),r.viewport_.style.position="relative",r.viewport_.style.overflow="hidden",r.viewport_.style.width="100%",r.viewport_.style.height="100%",r.overlayContainer_=document.createElement("div"),r.overlayContainer_.style.position="absolute",r.overlayContainer_.style.zIndex="0",r.overlayContainer_.style.width="100%",r.ove
 rlayContainer_.style.height="100%",r.overlayContainer_.style.pointerEvents="none",r.overlayContainer_.className="ol-overlaycontainer",r.viewport_.appendChild(r.overlayContainer_),r.overlayContainerStopEvent_=document.createElement("div"),r.overlayContainerStopEvent_.style.position="absolute",r.overlayContainerStopEvent_.style.zIndex="0",r.overlayContainerStopEvent_.style.width="100%",r.overlayContainerStopEvent_.style.height="100%",r.overlayContainerStopEvent_.style.pointerEvents="none",r.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",r.viewport_.appendChild(r.overlayContainerStopEvent_),r.mapBrowserEventHandler_=null,r.moveTolerance_=e.moveTolerance,r.keyboardEventTarget_=n.keyboardEventTarget,r.keyHandlerKeys_=null,r.controls=n.controls||new ut,r.interactions=n.interactions||new ut,r.overlays_=n.overlays,r.overlayIdIndex_={},r.renderer_=null,r.handleResize_,r.postRenderFunctions_=[],r.tileQueue_=new ma(r.getTilePriority.bind(r),r.handleTileChange_.bind(r)),r.
 addEventListener(et(aa),r.handleLayerGroupChanged_),r.addEventListener(et(la),r.handleViewChanged_),r.addEventListener(et(sa),r.handleSizeChanged_),r.addEventListener(et(ua),r.handleTargetChanged_),r.setProperties(n.values),r.controls.forEach(function(t){t.setMap(this)}.bind(r)),r.controls.addEventListener(nt,function(t){t.element.setMap(this)}.bind(r)),r.controls.addEventListener(it,function(t){t.element.setMap(null)}.bind(r)),r.interactions.forEach(function(t){t.setMap(this)}.bind(r)),r.interactions.addEventListener(nt,function(t){t.element.setMap(this)}.bind(r)),r.interactions.addEventListener(it,function(t){t.element.setMap(null)}.bind(r)),r.overlays_.forEach(r.addOverlayInternal_.bind(r)),r.overlays_.addEventListener(nt,function(t){this.addOverlayInternal_(t.element)}.bind(r)),r.overlays_.addEventListener(it,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(r)),r}return Ua(e,t),e.prototype.createRenderer=funct
 ion(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,r){if(this.frameState_){var n=this.getCoordinateFromPixelInternal(t),i=void 0!==(r=void 0!==r?r:{}).hitTolerance?r.hitTolerance*this.frameState_.pixelRatio:0,o=void 0!==r.layerFilter?r.layerFilter:x,a=!1!==r.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,i,a,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var r=[];return this.f
 orEachFeatureAtPixel(t,(function(t){r.push(t)}),e),r},e.prototype.forEachLayerAtPixel=function(t,e,r){if(this.frameState_){var n=r||{},i=void 0!==n.hitTolerance?n.hitTolerance*this.frameState_.pixelRatio:0,o=n.layerFilter||x;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,i,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var r=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:x,i=void 0!==e.hitTolerance?e.hitTolerance*this.frameState_.pixelRatio:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(r,this.frameState_,i,o,n,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),r="changedTouches"in t?t.changedTouches[0]:t;return
 [r.clientX-e.left,r.clientY-e.top]},e.prototype.getTarget=function(){return this.get(ua)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return Fr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?Tt(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(aa)},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=
 0,r=t.length;e<r;++e){var n=t[e].layer.getSource();if(n&&n.loading)return!0}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=Ar(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?Tt(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(sa)},e.prototype.getView=function(){return this.get(la)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getTilePriority=function(t,e,r,n){return function(t,e,r,n,i){if(!t||!(r in t.wantedTiles))return 1/0;if(!t.wantedTiles[r][e.getKey()])return 1/0;var o=t.viewState.center,a=n[0]-o[0],s=n[1]-o[1];return 65536*Math.log(i)+Math.sqrt(a*a+s*s)
 /i}(this.frameState_,t,e,r,n)},e.prototype.handleBrowserEvent=function(t,e){var r=e||t.type,n=new Ko(r,this,t);this.handleMapBrowserEvent(n)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,r=e.type;if(r===$o||r===V||r===D){var n=this.viewport_.getRootNode?this.viewport_.getRootNode():document,i=n===document?e.target:n.elementFromPoint(e.clientX,e.clientY);if(this.overlayContainerStopEvent_.contains(i)||!(n===document?document.documentElement:n).contains(i))return}t.frameState=this.frameState_;var o=this.getInteractions().getArray();if(!1!==this.dispatchEvent(t))for(var a=o.length-1;a>=0;a--){var s=o[a];if(s.getActive())if(!s.handleEvent(t))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var r=this.maxTilesLoading_,n=r;if(t){var i=t.viewHints;if(i[va]||i[_a]){var o=!zi&&Date.now()-t.time>8;r=o?0:8,n=o?0:2}}e.getTilesLoading()<r&&(e.reprioritize(),e.loadMoreTiles(r,n))}!t||!this.hasLis
 tener(Ti)||t.animate||this.tileQueue_.getTilesLoading()||this.getLoading()||this.renderer_.dispatchRenderEvent(Ti,t);for(var a=this.postRenderFunctions_,s=0,u=a.length;s<u;++s)a[s](this,t);a.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.mapBrowserEventHandler_){for(var e=0,r=this.keyHandlerKeys_.length;e<r;++e)X(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null,this.viewport_.removeEventListener(F,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(V,this.boundHandleBrowserEvent_),void 0!==this.handleResize_&&(removeEventListener(B,this.handleResize_,!1),this.handleResize_=void 0),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,qi(this.viewport_)}if(t){for(var n in t.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.create
 Renderer()),this.mapBrowserEventHandler_=new ra(this,this.moveTolerance_),Ho)this.mapBrowserEventHandler_.addEventListener(Ho[n],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(F,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(V,this.boundHandleBrowserEvent_,!!Ui&&{passive:!1});var i=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[W(i,D,this.handleBrowserEvent,this),W(i,z,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(B,this.handleResize_,!1))}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.ha
 ndleViewChanged_=function(){this.viewPropertyListenerKey_&&(X(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(X(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=W(t,c,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=W(t,I,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(X),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[W(t,c,this.render,this),W(t,I,this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){
 for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,r=t.length;e<r;++e){var n=t[e].layer;n.hasRenderer()&&n.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this.getSize(),r=this.getView(),n=this.frameState_,i=null;if(void 0!==e&&function(t){return t[0]>0&&t[1]>0}(e)&&r&&r.isDef()){var o=r.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=r.getState();i={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterItems:n?n.declutterItems:[],extent:he(a.
 center,a.resolution,a.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:o,wantedTiles:{}}}if(this.frameState_=i,this.renderer_.renderFrame(i),i){if(i.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,i.postRenderFunctions),n)(!this.previousExtent_||!me(this.previousExtent_)&&!$t(i.extent,this.previousExtent_))&&(this.dispatchEvent(new Xo(ia,this,n)),this.previousExtent_=Kt(this.previousExtent_));this.previousExtent_&&!i.viewHints[va]&&!i.viewHints[_a]&&!$t(i.extent,this.previousExtent_)&&(this.dispatchEvent(new Xo(oa,this,i)),Ut(i.extent,this.previousExtent_))}this.dispatchEvent(new Xo(na,this,i)),this.postRenderTimeoutHandle_=setTimeout(this.handlePostRender.bind(this),0)},e.prototype.setLayerGroup=function(t){this
 .set(aa,t)},e.prototype.setSize=function(t){this.set(sa,t)},e.prototype.setTarget=function(t){this.set(ua,t)},e.prototype.setView=function(t){this.set(la,t)},e.prototype.updateSize=function(){var t=this.getTargetElement();if(t){var e=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth)])}else this.setSize(void 0);this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,r=getComputedStyle(this.viewport_);r.width&&r.height&&(e=[parseInt(r.width,10),parseInt(r.height,10)]),t.setViewportSize(e)}},e}(rt),Ya=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};re
 turn function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Va=function(t){function e(e){var r=t.call(this)||this,n=e.element;return!n||e.target||n.style.pointerEvents||(n.style.pointerEvents="auto"),r.element=n||null,r.target_=null,r.map_=null,r.listenerKeys=[],e.render&&(r.render=e.render),e.target&&r.setTarget(e.target),r}return Ya(e,t),e.prototype.disposeInternal=function(){qi(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&qi(this.element);for(var e=0,r=this.listenerKeys.length;e<r;++e)X(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==S&&this.listenerKeys.push(W(t,na,this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==
 typeof t?document.getElementById(t):t},e}(rt),Wa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qa=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).ulElement_=document.createElement("ul"),r.collapsed_=void 0===n.collapsed||n.collapsed,r.overrideCollapsible_=void 0!==n.collapsible,r.collapsible_=void 0===n.collapsible||n.collapsible,r.collapsible_||(r.collapsed_=!1);var i=void 0!==n.className?n.className:"ol-attribution",o=void 0!==n.tipLabel?n.tipLabel:"Attributions",a=void 0!==n.collapseLabel?n.collapseLabel:"»";"string"==typeof a?(r.collapseLabel_=document.createElement("span"),r.collapseLabel_.textContent=a):r.co
 llapseLabel_=a;var s=void 0!==n.label?n.label:"i";"string"==typeof s?(r.label_=document.createElement("span"),r.label_.textContent=s):r.label_=s;var u=r.collapsible_&&!r.collapsed_?r.collapseLabel_:r.label_,l=document.createElement("button");l.setAttribute("type","button"),l.title=o,l.appendChild(u),l.addEventListener(A,r.handleClick_.bind(r),!1);var h=i+" ol-unselectable ol-control"+(r.collapsed_&&r.collapsible_?" ol-collapsed":"")+(r.collapsible_?"":" ol-uncollapsible"),c=r.element;return c.className=h,c.appendChild(r.ulElement_),c.appendChild(l),r.renderedAttributions_=[],r.renderedVisible_=!0,r}return Wa(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},r=[],n=t.layerStatesArray,i=0,o=n.length;i<o;++i){var a=n[i];if(Ii(a,t.viewState)){var s=a.layer.getSource();if(s){var u=s.getAttributions();if(u){var l=u(t);if(l)if(this.overrideCollapsible_||!1!==s.getAttributionsCollapsible()||this.setCollapsible(!1),Array.isArray(l))for(var h=0,c=l.length;h<c;++h)l[h]in e||
 (r.push(l[h]),e[l[h]]=!0);else l in e||(r.push(l),e[l]=!0)}}}}return r},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),r=e.length>0;if(this.renderedVisible_!=r&&(this.element.style.display=r?"":"none",this.renderedVisible_=r),!_(e,this.renderedAttributions_)){Xi(this.ulElement_);for(var n=0,i=e.length;n<i;++n){var o=document.createElement("li");o.innerHTML=e[n],this.ulElement_.appendChild(o)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?Wi(this.collapseLabel_,this.label_):Wi(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.
 classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(Va),Xa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Za=function(t){function e(e){var r=this,n=e||{};r=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this;var i=void 0!==n.className?n.className:"ol-rotate",o=void 0!==n.label?n.label:"⇧";r.label_=null,"string"==typeof o?(r.label_=document.createElement("span"),r.label_.className="ol-compass",r.label_.textContent=
 o):(r.label_=o,r.label_.classList.add("ol-compass"));var a=n.tipLabel?n.tipLabel:"Reset rotation",s=document.createElement("button");s.className=i+"-reset",s.setAttribute("type","button"),s.title=a,s.appendChild(r.label_),s.addEventListener(A,r.handleClick_.bind(r),!1);var u=i+" ol-unselectable ol-control",l=r.element;return l.className=u,l.appendChild(s),r.callResetNorth_=n.resetNorth?n.resetNorth:void 0,r.duration_=void 0!==n.duration?n.duration:250,r.autoHide_=void 0===n.autoHide||n.autoHide,r.rotation_=void 0,r.autoHide_&&r.element.classList.add("ol-hidden"),r}return Xa(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:La}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var r=e
 .viewState.rotation;if(r!=this.rotation_){var n="rotate("+r+"rad)";if(this.autoHide_){var i=this.element.classList.contains("ol-hidden");i||0!==r?i&&0!==r&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.label_.style.transform=n}this.rotation_=r}},e}(Va),Ka=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ha=function(t){function e(e){var r=this,n=e||{};r=t.call(this,{element:document.createElement("div"),target:n.target})||this;var i=void 0!==n.className?n.className:"ol-zoom",o=void 0!==n.delta?n.delta:1,a=void 0!==n.zoomInLabel?n.zoomInLabel:"+",s=void 0!==n.zoomOutLabel?n.zoomOutLabel:"−",u=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",l=void 0!==n.zoomOutTi
 pLabel?n.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=i+"-in",h.setAttribute("type","button"),h.title=u,h.appendChild("string"==typeof a?document.createTextNode(a):a),h.addEventListener(A,r.handleClick_.bind(r,o),!1);var c=document.createElement("button");c.className=i+"-out",c.setAttribute("type","button"),c.title=l,c.appendChild("string"==typeof s?document.createTextNode(s):s),c.addEventListener(A,r.handleClick_.bind(r,-o),!1);var p=i+" ol-unselectable ol-control",f=r.element;return f.className=p,f.appendChild(h),f.appendChild(c),r.duration_=void 0!==n.duration?n.duration:250,r}return Ka(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var r=e.getZoom();if(void 0!==r){var n=e.getConstrainedZoom(r+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:La})):e.setZoom(n)}}},e}(Va);function Ja(t
 ){var e=t||{},r=new ut;return(void 0===e.zoom||e.zoom)&&r.push(new Ha(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&r.push(new Za(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&r.push(new qa(e.attributionOptions)),r}var $a="active",Qa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function ts(t,e,r,n){var i=t.getZoom();if(void 0!==i){var o=t.getConstrainedZoom(i+e),a=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:r,duration:void 0!==n?n:250,easing:La})}}var es=function(t){function e(e){var r=t.call(this)||this;return e&&e.handleEvent&&(r.handleEvent=e.handleEvent),r.map_=null,r.setActive(!0),r}return Qa(e,t),e.prototype.getActive=function(){retu
 rn this.get($a)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set($a,t)},e.prototype.setMap=function(t){this.map_=t},e}(rt),rs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ns=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.delta_=n.delta?n.delta:1,r.duration_=void 0!==n.duration?n.duration:250,r}return rs(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Ho.DBLCLICK){var r=t.originalEvent,n=t.map,i=t.coordinate,o=r.shiftKey?-this.delta_:this.delta_;ts(n.getView(),o,i,this.duration_),t.preventDefault(),e=!0}return!e},e}(es),is=function(){var t=function(e,r){return(t=Object.setPrototypeOf|
 |{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function os(t){for(var e=t.length,r=0,n=0,i=0;i<e;i++)r+=t[i].clientX,n+=t[i].clientY;return[r/e,n/e]}var as=function(t){function e(e){var r=this,n=e||{};return r=t.call(this,n)||this,n.handleDownEvent&&(r.handleDownEvent=n.handleDownEvent),n.handleDragEvent&&(r.handleDragEvent=n.handleDragEvent),n.handleMoveEvent&&(r.handleMoveEvent=n.handleMoveEvent),n.handleUpEvent&&(r.handleUpEvent=n.handleUpEvent),n.stopDown&&(r.stopDown=n.stopDown),r.handlingDownUpSequence=!1,r.trackedPointers_={},r.targetPointers=[],r}return is(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t)
 {if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Ho.POINTERDRAG)this.handleDragEvent(t),t.preventDefault();else if(t.type==Ho.POINTERUP){var r=this.handleUpEvent(t);this.handlingDownUpSequence=r&&this.targetPointers.length>0}}else if(t.type==Ho.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==Ho.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===Ho.POINTERDOWN||e===Ho.POINTERDRAG||e===Ho.POINTERUP}(t)){var e=t.originalEvent,r=e.pointerId.toString();t.type==Ho.POINTERUP?delete this.trackedPointers_[r]:(t.type==Ho.POINTERDOWN||r in this.trackedPointers_)&&(this.trackedPointers_[r]=e),this.targetPointers=C(this.trackedPointers_)}},e}(es);function ss(t){var 
 e=arguments;return function(t){for(var r=!0,n=0,i=e.length;n<i&&(r=r&&e[n](t));++n);return r}}var us=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},ls=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},hs=function(t){return t.target.getTargetElement().contains(document.activeElement)},cs=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||hs(t)},ps=x,fs=function(t){var e=t.originalEvent;return 0==e.button&&!(Ni&&ji&&e.ctrlKey)},ds=w,gs=function(t){return t.type==Ho.SINGLECLICK},ys=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},ms=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},vs=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},_s=function(t){var e=t.originalEvent;return lt(void 0!==e,56),"mouse"==e.pointerType},bs=function(t){var e=t.originalEvent;return lt(
 void 0!==e,56),e.isPrimary&&0===e.button},xs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ws=function(t){function e(e){var r=t.call(this,{stopDown:w})||this,n=e||{};r.kinetic_=n.kinetic,r.lastCentroid=null,r.lastPointersCount_,r.panning_=!1;var i=n.condition?n.condition:ss(ys,bs);return r.condition_=n.onFocusOnly?ss(cs,i):i,r.noKinetic_=!1,r}return xs(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,r=os(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var n=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],i=t.map.getView();ar(n,i.getResoluti
 on()),or(n,i.getRotation()),i.adjustCenterInternal(n)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,r=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var n=this.kinetic_.getDistance(),i=this.kinetic_.getAngle(),o=r.getCenterInternal(),a=e.getPixelFromCoordinateInternal(o),s=e.getCoordinateFromPixelInternal([a[0]-n*Math.cos(i),a[1]-n*Math.sin(i)]);r.animateInternal({center:r.getConstrainedCenter(s),duration:500,easing:La})}return this.panning_&&(this.panning_=!1,r.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targe
 tPointers.length>1,!0}return!1},e}(as),Ss=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ts=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{stopDown:w})||this).condition_=n.condition?n.condition:ls,r.lastAngle_=void 0,r.duration_=void 0!==n.duration?n.duration:250,r}return Ss(e,t),e.prototype.handleDragEvent=function(t){if(_s(t)){var e=t.map,r=e.getView();if(r.getConstraints().rotation!==Ra){var n=e.getSize(),i=t.pixel,o=Math.atan2(n[1]/2-i[1],i[0]-n[0]/2);if(void 0!==this.lastAngle_){var a=o-this.lastAngle_;r.adjustRotationInternal(-a)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!_s(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent
 =function(t){return!!_s(t)&&(!(!fs(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(as),Es=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cs=function(t){function e(e){var r=t.call(this)||this;return r.geometry_=null,r.element_=document.createElement("div"),r.element_.style.position="absolute",r.element_.style.pointerEvents="auto",r.element_.className="ol-box "+e,r.map_=null,r.startPixel_=null,r.endPixel_=null,r}return Es(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,r=this.element_.style;r.left=Math.min(t[0],e[0])+"px",r.top=Math.min(t[1],e[1])+"px",r.width=Math.abs(e[0]-t[0]
 )+"px",r.height=Math.abs(e[1]-t[1])+"px"},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,r=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new Ln([r])},e.prototype.getGeometry=function(){return this.geometry_},e}(p),Ps=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){f
 unction n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rs="boxstart",Os="boxdrag",Is="boxend",Ls=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.coordinate=r,i.mapBrowserEvent=n,i}return Ps(e,t),e}(h),Ms=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.box_=new Cs(n.className||"ol-dragbox"),r.minArea_=void 0!==n.minArea?n.minArea:64,n.onBoxEnd&&(r.onBoxEnd=n.onBoxEnd),r.startPixel_=null,r.condition_=n.condition?n.condition:fs,r.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:r.defaultBoxEndCondition,r}return Ps(e,t),e.prototype.defaultBoxEndCondition=function(t,e,r){var n=r[0]-e[0],i=r[1]-e[1];return n*n+i*i>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Ls(Os,t.coordinate,t))},e.prototype.handleUpEvent=function(t){return this.box_.setMap(null
 ),this.boxEndCondition_(t,this.startPixel_,t.pixel)&&(this.onBoxEnd(t),this.dispatchEvent(new Ls(Is,t.coordinate,t))),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Ls(Rs,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(as),Fs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),As=function(t){function e(e){var r=this,n=e||{},i=n.condition?n.condition:ms;return(r=t.call(this,{condition:i,className:n.className||"ol-dragzoom",minArea:n.minArea})||this).duration_=void 0!==n.duration?n.duration:200,r.out_=void 0!==n.out&&n.out,r}return Fs(e,t),e.prototype
 .onBoxEnd=function(t){var e,r,n=this.getMap(),i=n.getView(),o=n.getSize(),a=this.getGeometry().getExtent();if(this.out_){var s=i.calculateExtentInternal(o),u=(e=[n.getPixelFromCoordinateInternal(ae(a)),n.getPixelFromCoordinateInternal(de(a))],ee(Kt(r),e));ve(s,1/i.getResolutionForExtentInternal(u,o)),a=s}var l=i.getConstrainedResolution(i.getResolutionForExtentInternal(a,o)),h=i.getConstrainedCenter(ue(a),l);i.animateInternal({resolution:l,center:h,duration:this.duration_,easing:La})},e}(Ms),ks=37,Ns=38,js=39,Gs=40,Ds=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),zs=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.defaultCondition_=function(t){return ys(t)&&vs(t)},r.condition_=void 0!==
 n.condition?n.condition:r.defaultCondition_,r.duration_=void 0!==n.duration?n.duration:100,r.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,r}return Ds(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==D){var r=t.originalEvent.keyCode;if(this.condition_(t)&&(r==Gs||r==ks||r==js||r==Ns)){var n=t.map.getView(),i=n.getResolution()*this.pixelDelta_,o=0,a=0;r==Gs?a=-i:r==ks?o=-i:r==js?o=i:a=i;var s=[o,a];or(s,n.getRotation()),function(t,e,r){var n=t.getCenterInternal();if(n){var i=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==r?r:250,easing:Fa,center:t.getConstrainedCenter(i)})}}(n,s,this.duration_),t.preventDefault(),e=!0}}return!e},e}(es),Us=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new 
 n)}}(),Bs=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.condition_=n.condition?n.condition:vs,r.delta_=n.delta?n.delta:1,r.duration_=void 0!==n.duration?n.duration:100,r}return Us(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==D||t.type==z){var r=t.originalEvent.charCode;if(this.condition_(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var n=t.map,i=r=="+".charCodeAt(0)?this.delta_:-this.delta_;ts(n.getView(),i,void 0,this.duration_),t.preventDefault(),e=!0}}return!e},e}(es),Ys=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vs="trackpad",Ws="wheel",qs=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,n)||this).totalDelta_=0,r.lastDelta_=0,r.maxDelta_=void 0!
 ==n.maxDelta?n.maxDelta:1,r.duration_=void 0!==n.duration?n.duration:250,r.timeout_=void 0!==n.timeout?n.timeout:80,r.useAnchor_=void 0===n.useAnchor||n.useAnchor,r.constrainResolution_=void 0!==n.constrainResolution&&n.constrainResolution;var i=n.condition?n.condition:ps;return r.condition_=n.onFocusOnly?ss(cs,i):i,r.lastAnchor_=null,r.startTime_=void 0,r.timeoutId_,r.mode_=void 0,r.trackpadEventGap_=400,r.trackpadTimeoutId_,r.deltaPerZoom_=300,r}return Ys(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==V)return!0;t.preventDefault();var e,r=t.map,n=t.originalEvent;if(this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==V&&(e=n.deltaY,ki&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=Gi),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;
 var i=Date.now();void 0===this.startTime_&&(this.startTime_=i),(!this.mode_||i-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?Vs:Ws);var o=r.getView();if(this.mode_===Vs&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=i,!1;this.totalDelta_+=e;var a=Math.max(this.timeout_-(i-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,r),a),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var r=-we(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(r=r?r>0?1:-1:
 0),ts(e,r,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(es),Xs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zs=function(t){function e(e){var r=this,n=e||{},i=n;return i.stopDown||(i.stopDown=w),(r=t.call(this,i)||this).anchor_=null,r.lastAngle_=void 0,r.rotating_=!1,r.rotationDelta_=0,r.threshold_=void 0!==n.threshold?n.threshold:.3,r.duration_=void 0!==n.duration?n.duration:250,r}return Xs(e,t),e.prototype.handleDragEvent=function(t){var e=0,r=this.targetPointers[0],n=this.targetPointers[1],i=Math.atan2(n.clientY-r.clientY,n.
 clientX-r.clientX);if(void 0!==this.lastAngle_){var o=i-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=i;var a=t.map,s=a.getView();if(s.getConstraints().rotation!==Ra){var u=a.getViewport().getBoundingClientRect(),l=os(this.targetPointers);l[0]-=u.left,l[1]-=u.top,this.anchor_=a.getCoordinateFromPixelInternal(l),this.rotating_&&(a.render(),s.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(as),Ks=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||fun
 ction(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Hs=function(t){function e(e){var r=this,n=e||{},i=n;return i.stopDown||(i.stopDown=w),(r=t.call(this,i)||this).anchor_=null,r.duration_=void 0!==n.duration?n.duration:400,r.lastDistance_=void 0,r.lastScaleDelta_=1,r}return Ks(e,t),e.prototype.handleDragEvent=function(t){var e=1,r=this.targetPointers[0],n=this.targetPointers[1],i=r.clientX-n.clientX,o=r.clientY-n.clientY,a=Math.sqrt(i*i+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;var s=t.map,u=s.getView();1!=e&&(this.lastScaleDelta_=e);var l=s.getViewport().getBoundingClientRect(),h=os(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(h),s.render(),u.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2
 ){var e=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,r),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(as);function Js(t){var e=t||{},r=new ut,n=new Kn(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&r.push(new Ts),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&r.push(new ns({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&r.push(new ws({onFocusOnly:e.onFocusOnly,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&r.push(new Zs),(void 0===e.pinchZoom||e.pinchZoom)&&r.push(new Hs({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(r.push(new zs),r.push(new Bs({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&r.push(new qs({onFocus
 Only:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&r.push(new As({duration:e.zoomDuration})),r}var $s=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qs=function(t){function e(e){return(e=T({},e)).controls||(e.controls=Ja()),e.interactions||(e.interactions=Js({onFocusOnly:!0})),t.call(this,e)||this}return $s(e,t),e.prototype.createRenderer=function(){return new Bo(this)},e}(Ba),tu="bottom-left",eu="bottom-center",ru="bottom-right",nu="center-left",iu="center-center",ou="center-right",au="top-left",su="top-center",uu="top-right",lu=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
 for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hu="element",cu="map",pu="offset",fu="position",du="positioning",gu=function(t){function e(e){var r=t.call(this)||this;r.options=e,r.id=e.id,r.insertFirst=void 0===e.insertFirst||e.insertFirst,r.stopEvent=void 0===e.stopEvent||e.stopEvent,r.element=document.createElement("div"),r.element.className=void 0!==e.className?e.className:"ol-overlay-container ol-selectable",r.element.style.position="absolute",r.element.style.pointerEvents="auto";var n=e.autoPan;return n&&"object"!=typeof n&&(n={animation:e.autoPanAnimation,margin:e.autoPanMargin}),r.autoPan=n||!1,r.rendered={transform_:"",visible:!0},r.mapPostrenderListenerKey=null,r.addEventListener(et(hu),r.handleElementChanged),r.addEventListener(et(cu),r.handleMapChanged),r.addEventListener(et(pu),r.handleOffsetChanged),r.addEventListener(et(fu),r.ha
 ndlePositionChanged),r.addEventListener(et(du),r.handlePositioningChanged),void 0!==e.element&&r.setElement(e.element),r.setOffset(void 0!==e.offset?e.offset:[0,0]),r.setPositioning(void 0!==e.positioning?e.positioning:au),void 0!==e.position&&r.setPosition(e.position),r}return lu(e,t),e.prototype.getElement=function(){return this.get(hu)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(cu)},e.prototype.getOffset=function(){return this.get(pu)},e.prototype.getPosition=function(){return this.get(fu)},e.prototype.getPositioning=function(){return this.get(du)},e.prototype.handleElementChanged=function(){Xi(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(qi(this.element),X(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=W(t,na,this.render,this),this.updatePixelPosition();var e=t
 his.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(hu,t)},e.prototype.setMap=function(t){this.set(cu,t)},e.prototype.setOffset=function(t){this.set(pu,t)},e.prototype.setPosition=function(t){this.set(fu,t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var e=this.getMap();if(e&&e.getTargetElement()&&this.get(fu)){var r=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),i=this.getRect(n,[Yi(n),Vi(n)]),o=t||{},a=void 0===
 o.margin?20:o.margin;if(!Vt(r,i)){var s=i[0]-r[0],u=r[2]-i[2],l=i[1]-r[1],h=r[3]-i[3],c=[0,0];if(s<0?c[0]=s-a:u<0&&(c[0]=Math.abs(u)+a),l<0?c[1]=l-a:h<0&&(c[1]=Math.abs(h)+a),0!==c[0]||0!==c[1]){var p=e.getView().getCenterInternal(),f=e.getPixelFromCoordinateInternal(p),d=[f[0]+c[0],f[1]+c[1]],g=o.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(d),duration:g.duration,easing:g.easing})}}}},e.prototype.getRect=function(t,e){var r=t.getBoundingClientRect(),n=r.left+window.pageXOffset,i=r.top+window.pageYOffset;return[n,i,n+e[0],i+e[1]]},e.prototype.setPositioning=function(t){this.set(du,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var r=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(r,n)}else this.setVisible(!1)},e.prototype.updateRende
 redPosition=function(t,e){var r=this.element.style,n=this.getOffset(),i=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+n[0])+"px",a=Math.round(t[1]+n[1])+"px",s="0%",u="0%";i==ru||i==ou||i==uu?s="-100%":i!=eu&&i!=iu&&i!=su||(s="-50%"),i==tu||i==eu||i==ru?u="-100%":i!=nu&&i!=iu&&i!=ou||(u="-50%");var l="translate("+s+", "+u+") translate("+o+", "+a+")";this.rendered.transform_!=l&&(this.rendered.transform_=l,r.transform=l,r.msTransform=l)},e.prototype.getOptions=function(){return this.options},e}(rt),yu="arraybuffer",mu="json",vu="text",_u="xml",bu=!1;function xu(t,e,r,n){return function(i,o,a){var s=new XMLHttpRequest;s.open("GET","function"==typeof t?t(i,o,a):t,!0),e.getType()==yu&&(s.responseType="arraybuffer"),s.withCredentials=bu,s.onload=function(t){if(!s.status||s.status>=200&&s.status<300){var o=e.getType(),u=void 0;o==mu||o==vu?u=s.responseText:o==_u?(u=s.responseXML)||(u=(new DOMParser).parseFromString(s.responseText,"application/xml")):o==yu&&(u=s.response)
 ,u?r.call(this,e.readFeatures(u,{extent:i,featureProjection:a}),e.readProjection(u)):n.call(this)}else n.call(this)}.bind(this),s.onerror=function(){n.call(this)}.bind(this),s.send()}}function wu(t,e){return xu(t,e,(function(t,e){"function"==typeof this.addFeatures&&this.addFeatures(t)}),S)}function Su(t,e){return[[-1/0,-1/0,1/0,1/0]]}var Tu=function(){function t(t,e,r,n){this.minX=t,this.maxX=e,this.minY=r,this.maxY=n}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&
 (this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function Eu(t,e,r,n,i){return void 0!==i?(i.minX=t,i.maxX=e,i.minY=r,i.maxY=n,i):new Tu(t,e,r,n)}var Cu=Tu;function Pu(t,e,r,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=r,n):[t,e,r]}function Ru(t,e,r){return t+"/"+e+"/"+r}function Ou(t){return Ru(t[0],t[1],t[2])}function Iu(t){return t.split("/").map(Number)}function Lu(t){return(t[1]<<t[0])+t[2]}var Mu=[0,0,0],Fu=function(){function t(t){var e,r,n,i;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,lt((e=this.resolutions_,r=!0,n=function(t,e){return e-t}||f,e.every((function(t,i){if(0===i)return!0;var o=n(e[i-1],t);return!(o>0||r&&0===o)}))),17),!t.origins)for(var o=0,a=t
 his.resolutions_.length-1;o<a;++o)if(i){if(this.resolutions_[o]/this.resolutions_[o+1]!==i){i=void 0;break}}else i=this.resolutions_[o]/this.resolutions_[o+1];this.zoomFactor_=i,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,lt(this.origins_.length==this.resolutions_.length,20));var s=t.extent;void 0===s||this.origin_||this.origins_||(this.origin_=fe(s)),lt(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,lt(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,lt(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==s?s:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){return new Cu(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.
 min(0,t[1]),Math.max(t[1]-1,-1))}),this):s&&this.calculateTileRanges_(s)}return t.prototype.forEachTileCoord=function(t,e,r){for(var n=this.getTileRangeForExtentAndZ(t,e),i=n.minX,o=n.maxX;i<=o;++i)for(var a=n.minY,s=n.maxY;a<=s;++a)r([e,i,a])},t.prototype.forEachTileCoordParentTileRange=function(t,e,r,n){var i,o,a=null,s=t[0]-1;for(2===this.zoomFactor_?(i=t[1],o=t[2]):a=this.getTileCoordExtent(t,n);s>=this.minZoom;){if(e(s,2===this.zoomFactor_?Eu(i=Math.floor(i/2),i,o=Math.floor(o/2),o,r):this.getTileRangeForExtentAndZ(a,s,r)))return!0;--s}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,r){if(t[
 0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],i=2*t[2];return Eu(n,n+1,i,i+1,e)}var o=this.getTileCoordExtent(t,r);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},t.prototype.getTileRangeExtent=function(t,e,r){var n=this.getOrigin(t),i=this.getResolution(t),o=za(this.getTileSize(t),this.tmpSize_),a=n[0]+e.minX*o[0]*i,s=n[0]+(e.maxX+1)*o[0]*i;return Zt(a,n[1]+e.minY*o[1]*i,s,n[1]+(e.maxY+1)*o[1]*i,r)},t.prototype.getTileRangeForExtentAndZ=function(t,e,r){var n=Mu;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,n);var i=n[1],o=n[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,n),Eu(i,n[1],o,n[2],r)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),r=this.getResolution(t[0]),n=za(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*r,e[1]-(t[2]+.5)*n[1]*r]},t.prototype.getTileCoordExtent=function(t,e){var r=this.getOrigin(t[0]),n=this.getResolution(t[0]),i=za(this.getTileSize(t[0]),this.tmpSize_),o=r[0]+t[1]*i[0]*n,a=r[1]-(t[2]+1
 )*i[1]*n;return Zt(o,a,o+i[0]*n,a+i[1]*n,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,r){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,r)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,r,n,i){var o=this.getZForResolution(r),a=r/this.getResolution(o),s=this.getOrigin(o),u=za(this.getTileSize(o),this.tmpSize_),l=n?.5:0,h=n?.5:0,c=Math.floor((t-s[0])/r+l),p=Math.floor((s[1]-e)/r+h),f=a*c/u[0],d=a*p/u[1];return n?(f=Math.ceil(f)-1,d=Math.ceil(d)-1):(f=Math.floor(f),d=Math.floor(d)),Pu(o,f,d,i)},t.prototype.getTileCoordForXYAndZ_=function(t,e,r,n,i){var o=this.getOrigin(r),a=this.getResolution(r),s=za(this.getTileSize(r),this.tmpSize_),u=n?.5:0,l=n?.5:0,h=Math.floor((t-o[0])/a+u),c=Math.floor((o[1]-e)/a+l),p=h/s[0],f=c/s[1];return n?(p=Math.ceil(p)-1,f=Math.ceil(f)-1):(p=Math.floor(p),f=Math.floor(f)),Pu(r,p,f,i)},t.prototype.getTileCoordForCoordAndZ=function(t,e,r){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,r)},t.prototype.getTileCoordRes
 olution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:null},t.prototype.getZForResolution=function(t,e){return we(g(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,r=new Array(e),n=this.minZoom;n<e;++n)r[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=r},t}();function Au(t){var e=t.getDefaultTileGrid();return e||(e=ju(t),t.setDefaultTileGrid(e)),e}function ku(t){var e=t||{},r=e.extent||yr("EPSG:3857").getExtent(),n={extent:r,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Nu(r,e.maxZoom,e.tileSize,e.maxResolution)};return new Fu(n)}function Nu(t,e,r,n){for(var i=void 0!==e?e:42,o=ce(t),a=ge(t),s=za(void 0!==r?r:256),u=n>0?n:Math.max(a/s[0],o/s[1]),l=i+1,h=new Array(l),c=0;c<l;++c)h[c]=u/Math.pow(2,c);ret
 urn h}function ju(t,e,r,n){return function(t,e,r,n){var i=void 0!==n?n:Lt,o=Nu(t,e,r);return new Fu({extent:t,origin:le(t,i),resolutions:o,tileSize:r})}(Gu(t),e,r,n)}function Gu(t){var e=(t=yr(t)).getExtent();if(!e){var r=180*vt[_t.DEGREES]/t.getMetersPerUnit();e=Zt(-r,-r,r,r)}return e}var Du,zu=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Uu(t,e){for(var r=zu.length,n=0;n<r;++n)try{var i=t.getContext(zu[n],e);if(i)return i}catch(t){}return null}var Bu="http://www.w3.org/2001/XMLSchema-instance";function Yu(t,e){return hl().createElementNS(t,e)}function Vu(t,e){return function t(e,r,n){if(e.nodeType==Node.CDATA_SECTION_NODE||e.nodeType==Node.TEXT_NODE)r?n.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):n.push(e.nodeValue);else{var i=void 0;for(i=e.firstChild;i;i=i.nextSibling)t(i,r,n)}return n}(t,e,[]).join("")}function Wu(t){return"documentElement"in t}function qu(t){return(new DOMParser).parseFromString(t,"application/xml")}function Xu(t,e){return function
 (r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&m(n[n.length-1],i)}}function Zu(t,e){return function(r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&n[n.length-1].push(i)}}function Ku(t,e){return function(r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&(n[n.length-1]=i)}}function Hu(t,e,r){return function(n,i){var o=t.call(void 0!==r?r:this,n,i);if(void 0!==o){var a=i[i.length-1],s=void 0!==e?e:n.localName,u=void 0;s in a?u=a[s]:(u=[],a[s]=u),u.push(o)}}}function Ju(t,e,r){return function(n,i){var o=t.call(void 0!==r?r:this,n,i);void 0!==o&&(i[i.length-1][void 0!==e?e:n.localName]=o)}}function $u(t,e){return function(r,n,i){t.call(void 0!==e?e:this,r,n,i),i[i.length-1].node.appendChild(r)}}function Qu(t,e){var r,n;return function(e,i,o){if(void 0===r){r={};var a={};a[e.localName]=t,r[e.namespaceURI]=a,n=tl(e.localName)}al(r,n,i,o)}}function tl(t,e){var r=t;return function(t,n,i){var o=n[n.length-1].node,a=r;return void 0===a&&(a=i),Yu(void 0!==e?e:o.namespaceURI,a)}}
 var el=tl();function rl(t,e){for(var r=e.length,n=new Array(r),i=0;i<r;++i)n[i]=t[e[i]];return n}function nl(t,e,r){var n,i,o=void 0!==r?r:{};for(n=0,i=t.length;n<i;++n)o[t[n]]=e;return o}function il(t,e,r,n){var i;for(i=e.firstElementChild;i;i=i.nextElementSibling){var o=t[i.namespaceURI];if(void 0!==o){var a=o[i.localName];void 0!==a&&a.call(n,i,r)}}}function ol(t,e,r,n,i){return n.push(t),il(e,r,n,i),n.pop()}function al(t,e,r,n,i,o){for(var a,s,u=(void 0!==i?i:r).length,l=0;l<u;++l)void 0!==(a=r[l])&&void 0!==(s=e.call(void 0!==o?o:this,a,n,void 0!==i?i[l]:void 0))&&t[s.namespaceURI][s.localName].call(o,s,a,n)}function sl(t,e,r,n,i,o,a){return i.push(t),al(e,r,n,i,o,a),i.pop()}var ul=void 0;var ll=void 0;function hl(){return void 0===ll&&"undefined"!=typeof document&&(ll=document.implementation.createDocument("","",null)),ll}var cl=35044;function pl(t){switch(t){case 34962:return Float32Array;case 34963:return Uint32Array;default:return Float32Array}}var fl=function(){function t(
 t,e){this.array=null,this.type=t,lt(34962===t||34963===t,62),this.usage=void 0!==e?e:cl}return t.prototype.ofSize=function(t){this.array=new(pl(this.type))(t)},t.prototype.fromArray=function(t){this.array=pl(this.type).from(t)},t.prototype.fromArrayBuffer=function(t){this.array=new(pl(this.type))(t)},t.prototype.getType=function(){return this.type},t.prototype.getArray=function(){return this.array},t.prototype.getUsage=function(){return this.usage},t.prototype.getSize=function(){return this.array?this.array.length:0},t}(),dl="webglcontextlost",gl="webglcontextrestored",yl=function(){function t(t){this.gl_=t.webGlContext;var e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer();var r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,t.vertexShader||"\n  precision mediump float;\n  \n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n  \n  u
 niform vec2 u_screenSize;\n   \n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n  }\n"),e.compileShader(r);var n=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(n,t.fragmentShader||"\n  precision mediump float;\n   \n  uniform sampler2D u_image;\n   \n  varying vec2 v_texCoord;\n   \n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord);\n  }\n"),e.compileShader(n),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,r),e.attachShader(this.renderTargetProgram_,n),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.ge
 tUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach(function(r){this.uniforms_.push({value:t.uniforms[r],location:e.getUniformLocation(this.renderTargetProgram_,r)})}.bind(this))}return t.prototype.getGL=function(){return this.gl_},t.prototype.init=function(t){var e=this.getGL(),r=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.viewport(0,0,r[0],r[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==r[0]||this.renderTargetTextureSize_[1]!==r[1]){this.renderTargetTextureSize_=r;var n=e.RGBA,i=e.RGBA,o=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,0,n,r[0],r[1],0,i,o,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_
 WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0)}},t.prototype.apply=function(t,e){var r=this.getGL(),n=t.size;r.bindFramebuffer(r.FRAMEBUFFER,e?e.getFrameBuffer():null),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,this.renderTargetTexture_),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),r.bindBuffer(r.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),r.useProgram(this.renderTargetProgram_),r.enableVertexAttribArray(this.renderTargetAttribLocation_),r.vertexAttribPointer(this.renderTargetAttribLocation_,2,r.FLOAT,!1,0,0),r.uniform2f(this.renderTargetUniformLocation_,n[0],n[1]),r.uniform1i(this.renderTargetTextureLocation_,0),this.applyUniforms(t),r.drawArrays(r.TRIANGLES,0,6)},t.prototype.getFrameBuffer=function(){return t
 his.frameBuffer_},t.prototype.applyUniforms=function(t){var e,r=this.getGL(),n=1;this.uniforms_.forEach((function(i){if((e="function"==typeof i.value?i.value(t):i.value)instanceof HTMLCanvasElement||e instanceof ImageData)i.texture||(i.texture=r.createTexture()),r.activeTexture(r["TEXTURE"+n]),r.bindTexture(r.TEXTURE_2D,i.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),e instanceof ImageData?r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,e.width,e.height,0,r.UNSIGNED_BYTE,new Uint8Array(e.data)):r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),r.uniform1i(i.location,n++);else if(Array.isArray(e))switch(e.length){case 2:return void r.uniform2f(i.location,e[0],e[1]);case 3:return void r.uniform3f(i.location,e[0],e[1],e[2]);case 4:return void r.uniform4f(i.location,e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&r.uniform1
 f(i.location,e)}))},t}();function ml(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}var vl=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_l="u_projectionMatrix",bl="u_offsetScaleMatrix",xl="u_offsetRotateMatrix",wl="u_time",Sl="u_zoom",Tl="u_resolution",El={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126};function Cl(t){for(var e=0,r=0;r<t.length;r++){var n=t[r];e+=n.size*Pl(n.type)}return e}function Pl(t){switch(t){case El.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case El.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case El.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case El.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var Rl=f
 unction(t){function e(e){var r=t.call(this)||this,n=e||{};r.boundHandleWebGLContextLost_=r.handleWebGLContextLost.bind(r),r.boundHandleWebGLContextRestored_=r.handleWebGLContextRestored.bind(r),r.canvas_=document.createElement("canvas"),r.canvas_.style.position="absolute",r.canvas_.style.left="0",r.gl_=Uu(r.canvas_);var i=r.getGL();if(r.bufferCache_={},r.currentProgram_=null,lt(d(function(){if(!Du){var t=Uu(document.createElement("canvas"));t&&(Du=t.getSupportedExtensions())}return Du}(),"OES_element_index_uint"),63),i.getExtension("OES_element_index_uint"),r.canvas_.addEventListener(dl,r.boundHandleWebGLContextLost_),r.canvas_.addEventListener(gl,r.boundHandleWebGLContextRestored_),r.offsetRotateMatrix_=[1,0,0,1,0,0],r.offsetScaleMatrix_=[1,0,0,1,0,0],r.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.uniformLocations_={},r.attribLocations_={},r.uniforms_=[],n.uniforms)for(var o in n.uniforms)r.uniforms_.push({name:o,value:n.uniforms[o]});return r.postProcessPasses_=n.postProcesses?n.p
 ostProcesses.map((function(t){return new yl({webGlContext:i,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})})):[new yl({webGlContext:i})],r.shaderCompileErrors_=null,r.startTime_=Date.now(),r}return vl(e,t),e.prototype.bindBuffer=function(t){var e=this.getGL(),r=o(t),n=this.bufferCache_[r];n||(n={buffer:t,webGlBuffer:e.createBuffer()},this.bufferCache_[r]=n);e.bindBuffer(t.getType(),n.webGlBuffer)},e.prototype.flushBufferData=function(t){var e=this.getGL();this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var e=this.getGL(),r=o(t),n=this.bufferCache_[r];e.isContextLost()||e.deleteBuffer(n.buffer),delete this.bufferCache_[r]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(dl,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(gl,this.boundHandleWebGLContextRestored_)},e.prototype.prepareDraw=function(t){var e=this.getGL(),r=this
 .getCanvas(),n=t.size,i=t.pixelRatio;r.width=n[0]*i,r.height=n[1]*i,r.style.width=n[0]+"px",r.style.height=n[1]+"px",e.useProgram(this.currentProgram_);for(var o=this.postProcessPasses_.length-1;o>=0;o--)this.postProcessPasses_[o].init(t);e.bindTexture(e.TEXTURE_2D,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,e,r){var n=this.getGL(),i=e.getSize();n.bindFramebuffer(n.FRAMEBUFFER,e.getFramebuffer()),n.viewport(0,0,i[0],i[1]),n.bindTexture(n.TEXTURE_2D,e.getTexture()),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,r?n.ZERO:n.ONE_MINUS_SRC_ALPHA),n.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,e){var r=this.getGL(),n=r.UNSIGNED_INT,i=e-t,o=4*t;r.drawElements(r.TRIANGLES,i,n,o)},e.pr
 ototype.finalizeDraw=function(t){for(var e=0;e<this.postProcessPasses_.length;e++)this.postProcessPasses_[e].apply(t,this.postProcessPasses_[e+1]||null)},e.prototype.getCanvas=function(){return this.canvas_},e.prototype.getGL=function(){return this.gl_},e.prototype.applyFrameState=function(t){var e=t.size,r=t.viewState.rotation,n=xt(this.offsetScaleMatrix_);Et(n,2/e[0],2/e[1]);var i,o,a,s,u=xt(this.offsetRotateMatrix_);0!==r&&(i=u,o=-r,a=Math.cos(o),s=Math.sin(o),wt(i,St(bt,a,s,-s,a,0,0))),this.setUniformMatrixValue(bl,ml(this.tmpMat4_,n)),this.setUniformMatrixValue(xl,ml(this.tmpMat4_,u)),this.setUniformFloatValue(wl,.001*(Date.now()-this.startTime_)),this.setUniformFloatValue(Sl,t.viewState.zoom),this.setUniformFloatValue(Tl,t.viewState.resolution)},e.prototype.applyUniforms=function(t){var e,r=this.getGL(),n=0;this.uniforms_.forEach(function(i){if((e="function"==typeof i.value?i.value(t):i.value)instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageData)i
 .texture||(i.prevValue=void 0,i.texture=r.createTexture()),r.activeTexture(r["TEXTURE"+n]),r.bindTexture(r.TEXTURE_2D,i.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),(!(e instanceof HTMLImageElement)||e.complete)&&i.prevValue!==e&&(i.prevValue=e,r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e)),r.uniform1i(this.getUniformLocation(i.name),n++);else if(Array.isArray(e)&&6===e.length)this.setUniformMatrixValue(i.name,ml(this.tmpMat4_,e));else if(Array.isArray(e)&&e.length<=4)switch(e.length){case 2:return void r.uniform2f(this.getUniformLocation(i.name),e[0],e[1]);case 3:return void r.uniform3f(this.getUniformLocation(i.name),e[0],e[1],e[2]);case 4:return void r.uniform4f(this.getUniformLocation(i.name),e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&r.uniform1f(this.getUniformLocation(i.name),e)}.bind(this))},e.pro
 totype.useProgram=function(t){return t!=this.currentProgram_&&(this.getGL().useProgram(t),this.currentProgram_=t,this.uniformLocations_={},this.attribLocations_={},!0)},e.prototype.compileShader=function(t,e){var r=this.getGL(),n=r.createShader(e);return r.shaderSource(n,t),r.compileShader(n),n},e.prototype.getProgram=function(t,e){var r=this.getGL(),n=this.compileShader(t,r.FRAGMENT_SHADER),i=this.compileShader(e,r.VERTEX_SHADER);this.shaderCompileErrors_=null,r.getShaderInfoLog(n)&&(this.shaderCompileErrors_="Fragment shader compilation failed:\n"+r.getShaderInfoLog(n)),r.getShaderInfoLog(i)&&(this.shaderCompileErrors_=(this.shaderCompileErrors_||"")+"Vertex shader compilation failed:\n"+r.getShaderInfoLog(i));var o=r.createProgram();return r.attachShader(o,n),r.attachShader(o,i),r.linkProgram(o),o},e.prototype.getShaderCompileErrors=function(){return this.shaderCompileErrors_},e.prototype.getUniformLocation=function(t){return void 0===this.uniformLocations_[t]&&(this.uniformLocat
 ions_[t]=this.getGL().getUniformLocation(this.currentProgram_,t)),this.uniformLocations_[t]},e.prototype.getAttributeLocation=function(t){return void 0===this.attribLocations_[t]&&(this.attribLocations_[t]=this.getGL().getAttribLocation(this.currentProgram_,t)),this.attribLocations_[t]},e.prototype.makeProjectionTransform=function(t,e){var r=t.size,n=t.viewState.rotation,i=t.viewState.resolution,o=t.viewState.center;return xt(e),Ct(e,0,0,2/(i*r[0]),2/(i*r[1]),-n,-o[0],-o[1]),e},e.prototype.setUniformFloatValue=function(t,e){this.getGL().uniform1f(this.getUniformLocation(t),e)},e.prototype.setUniformMatrixValue=function(t,e){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,e)},e.prototype.enableAttributeArray_=function(t,e,r,n,i){var o=this.getAttributeLocation(t);o<0||(this.getGL().enableVertexAttribArray(o),this.getGL().vertexAttribPointer(o,e,r,!1,n,i))},e.prototype.enableAttributes=function(t){for(var e=Cl(t),r=0,n=0;n<t.length;n++){var i=t[n];this.enableAttributeArray
 _(i.name,i.size,i.type||5126,e,r),r+=i.size*Pl(i.type)}},e.prototype.handleWebGLContextLost=function(){E(this.bufferCache_),this.currentProgram_=null},e.prototype.handleWebGLContextRestored=function(){},e.prototype.createTexture=function(t,e,r){var n=this.getGL(),i=r||n.createTexture(),o=n.RGBA,a=n.RGBA,s=n.UNSIGNED_BYTE;return n.bindTexture(n.TEXTURE_2D,i),e?n.texImage2D(n.TEXTURE_2D,0,o,a,s,e):n.texImage2D(n.TEXTURE_2D,0,o,t[0],t[1],0,a,s,null),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),i},e}(p),Ol=new Uint8Array(4),Il=function(){function t(t,e){this.helper_=t;var r=t.getGL();this.texture_=r.createTexture(),this.framebuffer_=r.createFramebuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return t.prototype.setSize=function(t){_(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updat
 eSize_())},t.prototype.getSize=function(){return this.size_},t.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},t.prototype.readAll=function(){if(this.dataCacheDirty_){var t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},t.prototype.readPixel=function(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return Ol[0]=0,Ol[1]=0,Ol[2]=0,Ol[3]=0,Ol;this.readAll();var r=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return Ol[0]=this.data_[4*r],Ol[1]=this.data_[4*r+1],Ol[2]=this.data_[4*r+2],Ol[3]=this.data_[4*r+3],Ol},t.prototype.getTexture=function(){return this.texture_},t.prototype.getFramebuffer=function(){return this.framebuffer_},t.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),
 e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},t}(),Ll=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ml=function(t){function e(e){var r=t.call(this,{extent:e.extent,origin:e.origin,origins:e.origins,resolutions:e.resolutions,tileSize:e.tileSize,tileSizes:e.tileSizes,sizes:e.sizes})||this;return r.matrixIds_=e.matrixIds,r}return Ll(e,t),e.prototype.getMatrixId=function(t){return this.matrixIds_[t]},e.prototype.getMatrixIds=function(){return this.matrixIds_},e}(Fu),Fl=Ml;function Al(t,e,r){var n=[],i=[],o=[],a=[],s=[],u=void 0!==r?r:[],l=t.SupportedCRS,h=yr(l.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/
 ,"$1:$3"))||yr(l),c=h.getMetersPerUnit(),p="ne"==h.getAxisOrientation().substr(0,2);return t.TileMatrix.sort((function(t,e){return e.ScaleDenominator-t.ScaleDenominator})),t.TileMatrix.forEach((function(e){if(!(u.length>0)||v(u,(function(r){return e.Identifier==r.TileMatrix||-1===e.Identifier.indexOf(":")&&t.Identifier+":"+e.Identifier===r.TileMatrix}))){i.push(e.Identifier);var r=28e-5*e.ScaleDenominator/c,l=e.TileWidth,h=e.TileHeight;p?o.push([e.TopLeftCorner[1],e.TopLeftCorner[0]]):o.push(e.TopLeftCorner),n.push(r),a.push(l==h?l:[l,h]),s.push([e.MatrixWidth,e.MatrixHeight])}})),new Ml({extent:e,origins:o,resolutions:n,matrixIds:i,tileSizes:a,sizes:s})}var kl=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=za(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():
 e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return n()},t.prototype.getImage=function(t){return n()},t.prototype.getHitDetectionImage=function(){return n()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return n()},t.prototype.getImageSize=function(){return n()},t.prototype.getHitDetectionImageSize=function(){return n()},t.prototype.getOrigin=function(){return n()},t.prototype.getSize=function(){return n()},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWith
 View=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=za(t)},t.prototype.listenImageChange=function(t){n()},t.prototype.load=function(){n()},t.prototype.unlistenImageChange=function(t){n()},t}(),Nl=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jl=function(t){function e(e){var r=this,n=void 0!==e.rotateWithView&&e.rotateWithView;return(r=t.call(this,{opacity:1,rotateWithView:n,rotation:void 0!==e.rotation?e.rotation:0,scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_={},r.hitDetectionCanvas_=null,r.fill_=void 0!==e.fill?e.fill:null,r.origin_=[0,0],r.points_=e.points,r.ra
 dius_=void 0!==e.radius?e.radius:e.radius1,r.radius2_=e.radius2,r.angle_=void 0!==e.angle?e.angle:0,r.stroke_=void 0!==e.stroke?e.stroke:null,r.anchor_=null,r.size_=null,r.imageSize_=null,r.hitDetectionImageSize_=null,r.render(),r}return Nl(e,t),e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionCanvas_){var t=this.createRenderOptions();this.createHitDetectionCanvas_(t)}return this.hitDetectionCa
 nvas_},e.prototype.getImage=function(t){if(!this.canvas_[t||1]){var e=this.createRenderOptions(),r=Bi(e.size*t||1,e.size*t||1);this.draw_(e,r,0,0,t||1),this.canvas_[t||1]=r.canvas}return this.canvas_[t||1]},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.imageSize_},e.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},e.prototype.getImageState=function(){return Co},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.createRenderOptions=function(){var t,e="round",r="round",n=0,i=null,o=0,a=0;return this.stroke_&
 &(null===(t=this.stroke_.getColor())&&(t="#000"),t=Fi(t),void 0===(a=this.stroke_.getWidth())&&(a=1),i=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),void 0===(r=this.stroke_.getLineJoin())&&(r="round"),void 0===(e=this.stroke_.getLineCap())&&(e="round"),void 0===(n=this.stroke_.getMiterLimit())&&(n=10)),{strokeStyle:t,strokeWidth:a,size:2*(this.radius_+a)+1,lineCap:e,lineDash:i,lineDashOffset:o,lineJoin:r,miterLimit:n}},e.prototype.render=function(){var t=this.createRenderOptions(),e=Bi(t.size,t.size);this.draw_(t,e,0,0,1),this.canvas_[1]=e.canvas;var r=e.canvas.width,n=r,i=this.getDisplacement();this.hitDetectionImageSize_=[t.size,t.size],this.createHitDetectionCanvas_(t),this.anchor_=[r/2-i[0],r/2+i[1]],this.size_=[r,r],this.imageSize_=[n,n]},e.prototype.draw_=function(t,e,r,n,i){var o,a,s;e.setTransform(i,0,0,i,0,0),e.translate(r,n),e.beginPath();var u=this.points_;if(u===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var l=void 0!==this.radius2_?th
 is.radius2_:this.radius_;for(l!==this.radius_&&(u*=2),o=0;o<=u;o++)a=2*o*Math.PI/u-Math.PI/2+this.angle_,s=o%2==0?this.radius_:l,e.lineTo(t.size/2+s*Math.cos(a),t.size/2+s*Math.sin(a))}if(this.fill_){var h=this.fill_.getColor();null===h&&(h="#000"),e.fillStyle=Fi(h),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},e.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionCanvas_=this.getImage(1),this.fill_){var e=this.fill_.getColor(),r=0;if("string"==typeof e&&(e=ni(e)),null===e?r=1:Array.isArray(e)&&(r=4===e.length?e[3]:1),0===r){var n=Bi(t.size,t.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(t,n,0,0)}}},e.prototype.drawHitDetectionCanvas_=function(t,e,r,n){e.translate(r,n),e.beginPath();var i=this.points_;if(i===1/0)e.arc(t.size/2,t.siz
 e/2,this.radius_,0,2*Math.PI,!0);else{var o=void 0!==this.radius2_?this.radius2_:this.radius_;o!==this.radius_&&(i*=2);var a=void 0,s=void 0,u=void 0;for(a=0;a<=i;a++)u=2*a*Math.PI/i-Math.PI/2+this.angle_,s=a%2==0?this.radius_:o,e.lineTo(t.size/2+s*Math.cos(u),t.size/2+s*Math.sin(u))}e.fillStyle="#000",e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},e}(kl),Gl=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Dl=function(t){function e(e){var r=e||{};return t.call(this,{points:1/0,fill:r.fill,radius:r.radius,stroke:r.stroke,displacement:void 0!==r.displacement?r.displacement:[0,0]})
 ||this}return Gl(e,t),e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(jl),zl=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}(),Ul="fraction",Bl="pixels",Yl="bottom-left",Vl="bottom-right",Wl="top-left",ql="top-right",Xl=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){fu
 nction n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zl=function(t){function e(e,r,n,i){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=n,o.resolution=r,o.state=i,o}return Xl(e,t),e.prototype.changed=function(){this.dispatchEvent(I)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return n()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){n()},e}(O),Kl=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Hl(t,e,r){var n=t;if(n.src&&zi){var i=n.decod
 e(),o=!0;return i.then((function(){o&&e()})).catch((function(t){o&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():r())})),function(){o=!1}}var a=[q(n,U,e),q(n,L,r)];return function(){a.forEach(X)}}var Jl=function(t){function e(e,r,n,i,o,a){var s=t.call(this,e,r,n,To)||this;return s.src_=i,s.image_=new Image,null!==o&&(s.image_.crossOrigin=o),s.unlisten_=null,s.state=To,s.imageLoadFunction_=a,s}return Kl(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=Po,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=ce(this.extent)/this.image_.height),this.state=Co,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=To&&this.state!=Po||(this.state=Eo,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=Hl(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=
 function(t){this.image_=t},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Zl),$l=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ql=null,th=function(t){function e(e,r,n,i,o,a){var s=t.call(this)||this;return s.hitDetectionImage_=null,s.image_=e||new Image,null!==i&&(s.image_.crossOrigin=i),s.canvas_={},s.color_=a,s.unlisten_=null,s.imageState_=o,s.size_=n,s.src_=r,s.tainted_,s}return $l(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===Co){Ql||(Ql=Bi(1,1)),Ql.drawImage(this.image_,0,0);try{Ql.getImageData(0,0,1,1),this.tainted_=!1}catch(t){Ql=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=
 function(){this.dispatchEvent(I)},e.prototype.handleImageError_=function(){this.imageState_=Po,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=Co,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],r=Bi(t,e);r.fillRect(0,0,t,e),this.hitDetectionImage_=r.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return th
 is.src_},e.prototype.load=function(){if(this.imageState_==To){this.imageState_=Eo;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=Hl(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var r=e.getContext("2d");if(r.scale(t,t),r.drawImage(this.image_,0,0),this.isTainted_()){var n=this.color_;return r.globalCompositeOperation="multiply",r.fillStyle="rgb("+n[0]+","+n[1]+","+n[2]+")",r.fillRect(0,0,e.width,e.height),r.globalCompositeOperation="destination-in",void r.drawImage(this.image_,0,0)}for(var i=r.getImageData(0,0,e.width,e.height),o=i.data,a=this.color_[0]/255,s=this.color_[1]/255,u=this.color_[2]/255,l=0,h=o.length;l<h;l+=4)o[l]*=a,o[l+1]*=s,o[l+2]*=u;r.putImageData(i,0,0)}},e.prototype.unlistenImage_=function(){
 this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(O);var eh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rh=function(t){function e(e){var r=this,n=e||{},i=void 0!==n.opacity?n.opacity:1,a=void 0!==n.rotation?n.rotation:0,s=void 0!==n.scale?n.scale:1,u=void 0!==n.rotateWithView&&n.rotateWithView;(r=t.call(this,{opacity:i,rotation:a,scale:s,displacement:void 0!==n.displacement?n.displacement:[0,0],rotateWithView:u})||this).anchor_=void 0!==n.anchor?n.anchor:[.5,.5],r.normalizedAnchor_=null,r.anchorOrigin_=void 0!==n.anchorOrigin?n.anchorOrigin:Wl,r.anchorXUnits_=void 0!==n.anchorXUnits?n.anchorXUnits:Ul,r.anchorYUnits_=void 0!==n.anchorYUnits?n.anchorYUnits:Ul,r.crossOrigin_=void 0!==n.crossOrigin
 ?n.crossOrigin:null;var l=void 0!==n.img?n.img:null,h=void 0!==n.imgSize?n.imgSize:null,c=n.src;lt(!(void 0!==c&&l),4),lt(!l||l&&h,5),void 0!==c&&0!==c.length||!l||(c=l.src||o(l)),lt(void 0!==c&&c.length>0,6);var p=void 0!==n.src?To:Co;return r.color_=void 0!==n.color?ni(n.color):null,r.iconImage_=function(t,e,r,n,i,o){var a=ui.get(e,n,o);return a||(a=new th(t,e,r,n,i,o),ui.set(e,n,o,a)),a}(l,c,h,r.crossOrigin_,p,r.color_),r.offset_=void 0!==n.offset?n.offset:[0,0],r.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:Wl,r.origin_=null,r.size_=void 0!==n.size?n.size:null,r}return eh(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this
 .size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==Ul||this.anchorYUnits_==Ul){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Ul&&(t[0]*=e[0]),this.anchorYUnits_==Ul&&(t[1]*=e[1])}if(this.anchorOrigin_!=Wl){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=ql&&this.anchorOrigin_!=Vl||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Yl&&this.anchorOrigin_!=Vl||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)
 },e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_,e=this.getDisplacement();if(this.offsetOrigin_!=Wl){var r=this.getSize(),n=this.iconImage_.getSize();if(!r||!n)return null;t=t.slice(),this.offsetOrigin_!=ql&&this.offsetOrigin_!=Vl||(t[0]=n[0]-r[0]-t[0]),this.offsetOrigin_!=Yl&&this.offsetOrigin_!=Vl||(t[1]=n[1]-r[1]-t[1])}return t[0]+=e[0],t[1]+=e[1],this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(I,t)},e.prototype.load=function(){t
 his.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(I,t)},e}(kl),nh=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this
 .lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}(),ih=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=uh,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({
 geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t
 ?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=uh,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var oh=null;function ah(t,e){if(!oh){var r=new zl({color:"rgba(255,255,255,0.4)"}),n=new nh({color:"#3399CC",width:1.25});oh=[new ih({image:new Dl({fill:r,stroke:n,radius:5}),fill:r,stroke:n})]}return oh}function sh(){var t={},e=[255,255,255,1],r=[0,153,255,1];return t[yt.POLYGON]=[new ih({fill:new zl({color:[255,255,255,.5]})})],t[yt.MULTI_POLYGON]=t[yt.POLYGON],t[yt.LINE_STRING]=[new ih({stroke:new nh({color:e,width:5})}),new ih({stroke:new nh({color:r,width:3})})],t[yt.MULTI_LINE_STRING]=t[yt.LINE_STRING],t[yt.CIRCLE]=t[yt.POLYGON].concat(t[yt.LINE_STRING]),t[yt.POINT]=[new ih({image:new Dl({radius:6,fill:new zl({color:r}),stroke:new nh({color:e,width:1.5})}),zIndex:1/0})],t[yt.MULTI_POINT]=t[yt.POINT],t[yt.GEOMETRY_COLLECTION]=
 t[yt.POLYGON].concat(t[yt.LINE_STRING],t[yt.POINT]),t}function uh(t){return t.getGeometry()}var lh=ih,hh="point",ch="line",ph=function(){function t(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=za(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new zl({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:hh,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}return t.prototype.clone=function(){var e=this.getScale();return new t({font:this.getFont(),placement:
 this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()})},t.prototype.getOverflow=function(){return this.overflow_},t.prototype.getFont=function(){return this.font_},t.prototype.getMaxAngle=function(){return this.maxAngle_},t.prototype.getPlacement=function(){return this.placement_},t.prototype.getOffsetX=function(){return this.offsetX_},t.prototype.getOffsetY=function(){return this.offsetY_},t.prototype.getFill=function(){return thi
 s.fill_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getStroke=function(){return this.stroke_},t.prototype.getText=function(){return this.text_},t.prototype.getTextAlign=function(){return this.textAlign_},t.prototype.getTextBaseline=function(){return this.textBaseline_},t.prototype.getBackgroundFill=function(){return this.backgroundFill_},t.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t.prototype.getPadding=function(){return this.padding_},t.prototype.setOverflow=function(t){this.overflow_=t},t.prototype.setFont=function(t){this.font_=t},t.prototype.setMaxAngle=function(t){this.maxAngle_=t},t.prototype.setOffsetX=function(t){this.offsetX_=t},t.prototype.setOffsetY=function(t){this.offsetY_=t},t.prototype.setPlacement=function(t){this.placement_=t},t.
 prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setFill=function(t){this.fill_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=za(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.setText=function(t){this.text_=t},t.prototype.setTextAlign=function(t){this.textAlign_=t},t.prototype.setTextBaseline=function(t){this.textBaseline_=t},t.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},t.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},t.prototype.setPadding=function(t){this.padding_=t},t}(),fh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),dh=functio
 n(t){function e(e,r,n){var i=t.call(this)||this,o=n||{};return i.tileCoord=e,i.state=r,i.interimTile=null,i.hifi=!0,i.key="",i.transition_=void 0===o.transition?250:o.transition,i.transitionStarts_={},i}return fh(e,t),e.prototype.changed=function(){this.dispatchEvent(I)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==fa)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==fa){t.interimTile=null;break}t.getState()==pa?e=t:t.getState()==ca?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==da&&this.state>t)throw new Error("Tile load 
 sequence violation");this.state=t,this.changed()},e.prototype.load=function(){n()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var r=this.transitionStarts_[t];if(r){if(-1===r)return 1}else r=e,this.transitionStarts_[t]=r;var n=e-r+1e3/60;return n>=this.transition_?1:Ia(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(O),gh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var yh,mh=function(t){function e(e,r,n,i,o,a){var s=t.call(this,e,r,a)||this;return s.crossOrigin_=i,s.src_=n,s.image_=new Image,null!==i&&(s.image_.crossOrigin=i),
 s.unlisten_=null,s.tileLoadFunction_=o,s}return gh(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.getKey=function(){return this.src_},e.prototype.handleImageError_=function(){var t;this.state=da,this.unlistenImage_(),this.image_=((t=Bi(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=fa:this.state=ga,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==da&&(this.state=ca,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==ca&&(this.state=pa,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Hl(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(dh),vh=function(){function t(t,e,r,n,i,o){this.sourceProj_=t,this.targe
 tProj_=e;var a={},s=Er(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return a[e]||(a[e]=s(t)),a[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=i*i,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&ge(n)==ge(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?ge(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?ge(this.targetProj_.getExtent()):null;var u=fe(r),l=de(r),h=se(r),c=ae(r),p=this.transformInv_(u),f=this.transformInv_(l),d=this.transformInv_(h),g=this.transformInv_(c),y=10+(o?Math.max(0,Math.ceil(Te(oe(r)/(o*o*256*256)))):0);if(this.addQuad_(u,l,h,c,p,f,d,g,y),this.wrapsXInSource_){var m=1/0;this.triangles_.forEach((function(t,e,r){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2
 ][0])-m>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-m>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-m>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-m>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var r=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-r<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}a={}}return t.prototype.addTriangle_=function(t,e,r,n,i,o){this.triangles_.push({source:[n,i,o],target:[t,e,r]})},t.prototype.addQuad_=function(t,e,r,n,i,o,a,s,u){var l=Dt([i,o,a,s]),h=this.sourceWorldWidth_?ge(l)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&h>.5&&h<1,f=!1;if(u>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)f=ge(Dt([t,e,r,n]))/this.targetWorldWidth_>.25||f;!p&&this.sourceProj_.isGlobal()&&h&&(f=h>.25||f)}if(!(!f&&this.maxSourceExtent_&&isFinite(l[0]
 )&&isFinite(l[1])&&isFinite(l[2])&&isFinite(l[3]))||ye(l,this.maxSourceExtent_)){var d=0;if(!(f||isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(s[0])&&isFinite(s[1])))if(u>0)f=!0;else if(1!=(d=(isFinite(i[0])&&isFinite(i[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(a[0])&&isFinite(a[1])?0:2)+(isFinite(s[0])&&isFinite(s[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(u>0){if(!f){var g=[(t[0]+r[0])/2,(t[1]+r[1])/2],y=this.transformInv_(g),m=void 0;if(p)m=(Oe(i[0],c)+Oe(a[0],c))/2-Oe(y[0],c);else m=(i[0]+a[0])/2-y[0];var v=(i[1]+a[1])/2-y[1];f=m*m+v*v>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-r[0])<=Math.abs(t[1]-r[1])){var _=[(e[0]+r[0])/2,(e[1]+r[1])/2],b=this.transformInv_(_),x=[(n[0]+t[0])/2,(n[1]+t[1])/2],w=this.transformInv_(x);this.addQuad_(t,e,_,x,i,o,b,w,u-1),this.addQuad_(x,_,r,n,w,b,a,s,u-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],T=this.transformInv_(S),E=[(r[0]+n[0])/2,(r[1]+n[1])/2],C=this.transformInv_(
 E);this.addQuad_(t,S,E,n,i,T,C,s,u-1),this.addQuad_(S,e,r,E,T,o,a,C,u-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&d)&&this.addTriangle_(t,r,n,i,a,s),0==(14&d)&&this.addTriangle_(t,r,e,i,a,o),d&&(0==(13&d)&&this.addTriangle_(e,n,t,o,s,i),0==(7&d)&&this.addTriangle_(e,n,r,o,s,a))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,r,n){var i=e.source;te(t,i[0]),te(t,i[1]),te(t,i[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),_h={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1};function bh(t,e,r,n,i){t.beginPath(),t.moveTo(0,0),t.lineTo(e,r),t.lineTo(n,i),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(r,i)),t.restore()}function xh(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function wh(t,e,r,n){var i=Cr(r,e,t),o=mr(e,n,r),a=e.getMetersPerUnit();void 0!==a&&(o*=a);var s=t.getMetersPerUnit();void 0!==s&&(o/=s);v
 ar u=t.getExtent();if(!u||Yt(u,i)){var l=mr(t,o,i)/o;isFinite(l)&&l>0&&(o/=l)}return o}function Sh(t,e,r,n,i,o,a,s,u,l,h,c){var p=Bi(Math.round(r*t),Math.round(r*e));if(T(p,c),0===u.length)return p.canvas;function f(t){return Math.round(t*r)/r}p.scale(r,r),p.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];u.forEach((function(t,e,r){Qt(d,t.extent)}));var g=ge(d),y=ce(d),m=Bi(Math.round(r*g/n),Math.round(r*y/n));T(m,c);var v=r/n;u.forEach((function(t,e,r){var n=t.extent[0]-d[0],i=-(t.extent[3]-d[3]),o=ge(t.extent),a=ce(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,l,l,t.image.width-2*l,t.image.height-2*l,n*v,i*v,o*v,a*v)}));var _=fe(a);return s.getTriangles().forEach((function(t,e,i){var a=t.source,s=t.target,u=a[0][0],l=a[0][1],h=a[1][0],g=a[1][1],y=a[2][0],v=a[2][1],b=f((s[0][0]-_[0])/o),x=f(-(s[0][1]-_[1])/o),w=f((s[1][0]-_[0])/o),S=f(-(s[1][1]-_[1])/o),T=f((s[2][0]-_[0])/o),E=f(-(s[2][1]-_[1])/o),C=u,P=l;u=0,l=0;var R=function(t){for(var e=t.length,
 r=0;r<e;r++){for(var n=r,i=Math.abs(t[r][r]),o=r+1;o<e;o++){var a=Math.abs(t[o][r]);a>i&&(i=a,n=o)}if(0===i)return null;var s=t[n];t[n]=t[r],t[r]=s;for(var u=r+1;u<e;u++)for(var l=-t[u][r]/t[r][r],h=r;h<e+1;h++)r==h?t[u][h]=0:t[u][h]+=l*t[r][h]}for(var c=new Array(e),p=e-1;p>=0;p--){c[p]=t[p][e]/t[p][p];for(var f=p-1;f>=0;f--)t[f][e]-=t[f][p]*c[p]}return c}([[h-=C,g-=P,0,0,w-b],[y-=C,v-=P,0,0,T-b],[0,0,h,g,S-x],[0,0,y,v,E-x]]);if(R){if(p.save(),p.beginPath(),function(){if(void 0===yh){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",bh(t,4,5,4,0),bh(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;yh=xh(e,0)||xh(e,4)||xh(e,8)}return yh}()||c===_h){p.moveTo(w,S);for(var O=b-w,I=x-S,L=0;L<4;L++)p.lineTo(w+f((L+1)*O/4),S+f(L*I/3)),3!=L&&p.lineTo(w+f((L+1)*O/4),S+f((L+1)*I/3));p.lineTo(T,E)}else p.moveTo(w,S),p.lineTo(b,x),p.lineTo(T,E);p.clip(),p.transform(R[0],R[2],R[1],R[3],b,x),p.translate(d[0]-C,d[3]-P),p.
 scale(n/r,-n/r),p.drawImage(m.canvas,0,0),p.restore()}})),h&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,s.getTriangles().forEach((function(t,e,r){var n=t.target,i=(n[0][0]-_[0])/o,a=-(n[0][1]-_[1])/o,s=(n[1][0]-_[0])/o,u=-(n[1][1]-_[1])/o,l=(n[2][0]-_[0])/o,h=-(n[2][1]-_[1])/o;p.beginPath(),p.moveTo(s,u),p.lineTo(i,a),p.lineTo(l,h),p.closePath(),p.stroke()})),p.restore()),p.canvas}var Th=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Eh=function(t){function e(e,r,n,i,o,a,s,u,l,h,c,p){var f=t.call(this,o,ca)||this;f.renderEdges_=void 0!==c&&c,f.contextOptions_=p,f.pixelRatio_=s,f.gutter_=u,f.canvas_=null,f.sourceTileGrid_=r,f.targetTileGrid_=i,f.wrappedTileCoord_=
 a||o,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=i.getTileCoordExtent(f.wrappedTileCoord_),g=f.targetTileGrid_.getExtent(),y=f.sourceTileGrid_.getExtent(),m=g?pe(d,g):d;if(0===oe(m))return f.state=ga,f;var v=e.getExtent();v&&(y=y?pe(y,v):v);var _=i.getResolution(f.wrappedTileCoord_[0]),b=function(t,e,r,n){var i=ue(r),o=wh(t,e,i,n);return(!isFinite(o)||o<=0)&&ie(r,(function(r){return o=wh(t,e,r,n),isFinite(o)&&o>0})),o}(e,n,m,_);if(!isFinite(b)||b<=0)return f.state=ga,f;var x=void 0!==h?h:.5;if(f.triangulation_=new vh(e,n,m,y,b*x,_),0===f.triangulation_.getTriangles().length)return f.state=ga,f;f.sourceZ_=r.getZForResolution(b);var w=f.triangulation_.calculateSourceExtent();if(y&&(e.canWrapX()?(w[1]=we(w[1],y[1],y[3]),w[3]=we(w[3],y[1],y[3])):w=pe(w,y)),oe(w)){for(var S=r.getTileRangeForExtentAndZ(w,f.sourceZ_),T=S.minX;T<=S.maxX;T++)for(var E=S.minY;E<=S.maxY;E++){var C=l(f.sourceZ_,T,E,s);C&&f.sourceTiles_.push(C)}0===f.sourceTiles_.length&&(f.state=ga)}else f.
 state=ga;return f}return Th(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,r,n){e&&e.getState()==fa&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=da;else{var e=this.wrappedTileCoord_[0],r=this.targetTileGrid_.getTileSize(e),n="number"==typeof r?r:r[0],i="number"==typeof r?r:r[1],o=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),s=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Sh(n,i,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,s,this.triangulation_,t,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=fa}this.changed()},e.prototype.load=function(){if(this.state==ca){this.state=pa,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,r,n){var i=e.getState();if
 (i==ca||i==pa){t++;var o=W(e,I,(function(r){var n=e.getState();n!=fa&&n!=da&&n!=ga||(X(o),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),this.sourceTiles_.forEach((function(t,e,r){t.getState()==ca&&t.load()})),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(X),this.sourcesListenerKeys_=null},e}(dh),Ch=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var r=this.entries_[
 t];return lt(void 0!==r,15),r===this.newest_||(r===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(r.newer.older=r.older,r.older.newer=r.newer),r.newer=null,r.older=this.newest_,this.newest_.newer=r,this.newest_=r),r.value_},t.prototype.remove=function(t){var e=this.entries_[t];return lt(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),r=0;for(t=this.newest_;t;t=t.older)e[r++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),r=0;for(t=this.newest_;t;t=t.older)e[r++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.ke
 y_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){lt(!(t in this.entries_),16);var r={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=r:this.oldest_=r,this.newest_=r,this.entries_[t]=r,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}(),Ph=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rh=function(t){function e(){return null!==t&&t.apply(this,argumen
 ts)||this}return Ph(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=Iu(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(Ou(e.tileCoord)),e.release())}.bind(this))}},e}(Ch),Oh="tileloadstart",Ih="tileloadend",Lh="tileloaderror",Mh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Fh(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var Ah=function(t){function e(e){var r=t.call(this)||this;return r.projection_=yr(e.projection),r.attributions_=Fh(e.attributions),r.att
 ributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,r.loading=!1,r.state_=void 0!==e.state?e.state:Pi,r.wrapX_=void 0!==e.wrapX&&e.wrapX,r}return Mh(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolutions=function(){return n()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getContextOptions=function(){},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=Fh(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(rt),kh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};re
 turn function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Nh=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX})||this;r.opaque_=void 0!==e.opaque&&e.opaque,r.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,r.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var n=e.tileGrid;return n&&za(n.getTileSize(n.getMinZoom()),[256,256]),r.tileCache=new Rh(e.cacheSize||0),r.tmpSize=[0,0],r.key_=e.key||"",r.tileOptions={transition:e.transition},r.zDirection=e.zDirection?e.zDirection:0,r}return kh(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var r=this.getTileCacheForProjection(t);r&&r.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,r,n){var i=this.getTileCacheForProjection(t);if(!i)return!1;for(var o,a,s,
 u=!0,l=r.minX;l<=r.maxX;++l)for(var h=r.minY;h<=r.maxY;++h)a=Ru(e,l,h),s=!1,i.containsKey(a)&&(s=(o=i.get(a)).getState()===fa)&&(s=!1!==n(o)),s||(u=!1);return u},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,r,i,o){return n()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Au(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return e&&!Sr(e,t)?null:this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,r){var n=this.getTileGridForProjection(r),i=this.getTilePixelRatio(e),o=za(n.getTileSize(t),
 this.tmpSize);return 1==i?o:Da(o,i,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var r=void 0!==e?e:this.getProjection(),n=this.getTileGridForProjection(r);return this.getWrapX()&&r.isGlobal()&&(t=function(t,e,r){var n=e[0],i=t.getTileCoordCenter(e),o=Gu(r);if(Yt(o,i))return e;var a=ge(o),s=Math.ceil((o[0]-i[0])/a);return i[0]+=a*s,t.getTileCoordForCoordAndZ(i,n)}(n,t,r)),function(t,e){var r=t[0],n=t[1],i=t[2];if(e.getMinZoom()>r||r>e.getMaxZoom())return!1;var o,a=e.getExtent();return!(o=a?e.getTileRangeForExtentAndZ(a,r):e.getFullTileRange(r))||o.containsXY(n,i)}(t,n)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var r=this.getTileCacheForProjection(e);t>r.highWaterMark&&(r.highWaterMark=t)},e.prototype.useTile=function(t,e,r,n){},e}(Ah),jh=function(t){function e(e,r){var n=t.call(this,e)||this;return n.tile=r,n}return kh(e,t
 ),e}(h),Gh=Nh;function Dh(t,e){var r=/\{z\}/g,n=/\{x\}/g,i=/\{y\}/g,o=/\{-y\}/g;return function(a,s,u){return a?t.replace(r,a[0].toString()).replace(n,a[1].toString()).replace(i,a[2].toString()).replace(o,(function(){var t=a[0],r=e.getFullTileRange(t);return lt(r,55),(r.getHeight()-a[2]-1).toString()})):void 0}}function zh(t,e){for(var r=t.length,n=new Array(r),i=0;i<r;++i)n[i]=Dh(t[i],e);return Uh(n)}function Uh(t){return 1===t.length?t[0]:function(e,r,n){if(e){var i=Oe(Lu(e),t.length);return t[i](e,r,n)}}}function Bh(t,e,r){}function Yh(t){var e=[],r=/\{([a-z])-([a-z])\}/.exec(t);if(r){var n=r[1].charCodeAt(0),i=r[2].charCodeAt(0),o=void 0;for(o=n;o<=i;++o)e.push(t.replace(r[0],String.fromCharCode(o)));return e}if(r=/\{(\d+)-(\d+)\}/.exec(t)){for(var a=parseInt(r[2],10),s=parseInt(r[1],10);s<=a;s++)e.push(t.replace(r[0],s.toString()));return e}return e.push(t),e}var Vh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__
 proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wh=function(t){function e(r){var n=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,opaque:r.opaque,projection:r.projection,state:r.state,tileGrid:r.tileGrid,tilePixelRatio:r.tilePixelRatio,wrapX:r.wrapX,transition:r.transition,key:r.key,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this;return n.generateTileUrlFunction_=n.tileUrlFunction===e.prototype.tileUrlFunction,n.tileLoadFunction=r.tileLoadFunction,r.tileUrlFunction&&(n.tileUrlFunction=r.tileUrlFunction.bind(n)),n.urls=null,r.urls?n.setUrls(r.urls):r.url&&n.setUrl(r.url),n.tileLoadingKeys_={},n}return Vh(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},e.prototype.getUrls
 =function(){return this.urls},e.prototype.handleTileChange=function(t){var e,r=t.target,n=o(r),i=r.getState();i==pa?(this.tileLoadingKeys_[n]=!0,e=Oh):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=i==da?Lh:i==fa?Ih:void 0),null!=e&&this.dispatchEvent(new jh(e,r))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=Yh(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(zh(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,r){},e.prototype.useTile=function(t,e,r){var n=Ru(t,e,r);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(Gh),qh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto_
 _:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Xh(t,e){t.getImage().src=e}var Zh=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Xh,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return r.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,r.tileClass=void 0!==e.tileClass?e.tileClass:mh,r.tileCacheForProjection={},r.tileGridForProjection={},r.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,r.contextOptions_=!1===e.im
 ageSmoothing?_h:void 0,r.renderReprojectionEdges_=!1,r}return qh(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var r=this.getTileCacheForProjection(t);for(var n in this.tileCache.expireCache(this.tileCache==r?e:{}),this.tileCacheForProjection){var i=this.tileCacheForProjection[n];i.expireCache(i==r?e:{})}},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Sr(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.contextOptions_?"\n"+JSON.stringify(this.contextOptions_):"")},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!Sr(this.getProjection(),e))&&t.prototype.getOpaque.call
 (this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Sr(e,t)){var r=o(t);return r in this.tileGridForProjection||(this.tileGridForProjection[r]=Au(t)),this.tileGridForProjection[r]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Sr(e,t))return this.tileCache;var r=o(t);return r in this.tileCacheForProjection||(this.tileCacheForProjection[r]=new Rh(this.tileCache.highWaterMark)),this.tileCacheForProjection[r]},e.prototype.createTile_=function(t,e,r,n,i,o){var a=[t,e,r],s=this.getTileCoordForTileUrlFunction(a,i),u=s?this.tileUrlFunction(s,n,i):void 0,l=new this.tileClass(a,void 0!==u?ca:ga,void 0!==u?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return l.key=o,l.addEventListener(I,this.handleTileChange.bind(this)),l},e.prototype.getTile=function(t,e,r,n,i){var o=this.getProjection();if(o&&i&&!Sr(o,i)){var a=this.getTileCacheForProjection(i),s=[t,e,r],u=void
  0,l=Ou(s);a.containsKey(l)&&(u=a.get(l));var h=this.getKey();if(u&&u.key==h)return u;var c=this.getTileGridForProjection(o),p=this.getTileGridForProjection(i),f=this.getTileCoordForTileUrlFunction(s,i),d=new Eh(o,c,i,p,s,f,this.getTilePixelRatio(n),this.getGutter(),function(t,e,r,n){return this.getTileInternal(t,e,r,n,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.contextOptions_);return d.key=h,u?(d.interimTile=u,d.refreshInterimChain(),a.replace(l,d)):a.set(l,d),d}return this.getTileInternal(t,e,r,n,o||i)},e.prototype.getTileInternal=function(t,e,r,n,i){var o=null,a=Ru(t,e,r),s=this.getKey();if(this.tileCache.containsKey(a)){if((o=this.tileCache.get(a)).key!=s){var u=o;o=this.createTile_(t,e,r,n,i,s),u.getState()==ca?o.interimTile=u.interimTile:o.interimTile=u,o.refreshInterimChain(),this.tileCache.replace(a,o)}}else o=this.createTile_(t,e,r,n,i,s),this.tileCache.set(a,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.rend
 erReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var r=yr(t);if(r){var n=o(r);n in this.tileGridForProjection||(this.tileGridForProjection[n]=e)}},e}(Wh);function Kh(t,e,r,n){var i=document.createElement("script"),a="olc_"+o(e);function s(){delete window[a],i.parentNode.removeChild(i)}i.async=!0,i.src=t+(-1==t.indexOf("?")?"?":"&")+(n||"callback")+"="+a;var u=setTimeout((function(){s(),r&&r()}),1e4);window[a]=function(t){clearTimeout(u),s(),e(t)},document.getElementsByTagName("head")[0].appendChild(i)}var Hh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(
 );var Jh=function(t){function e(e){var r=this,n=void 0!==e.hidpi&&e.hidpi;return(r=t.call(this,{cacheSize:e.cacheSize,crossOrigin:"anonymous",imageSmoothing:e.imageSmoothing,opaque:!0,projection:yr("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:Ci,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:n?2:1,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition})||this).hidpi_=n,r.culture_=void 0!==e.culture?e.culture:"en-us",r.maxZoom_=void 0!==e.maxZoom?e.maxZoom:-1,r.apiKey_=e.key,r.imagerySet_=e.imagerySet,Kh("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+r.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+r.apiKey_+"&c="+r.culture_,r.handleImageryMetadataResponse.bind(r),void 0,"jsonp"),r}return Hh(e,t),e.prototype.getApiKey=function(){return this.apiKey_},e.prototype.getImagerySet=function(){return this.imagerySet_},e.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredenti
 als"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var e=t.resourceSets[0].resources[0],r=-1==this.maxZoom_?e.zoomMax:this.maxZoom_,n=Gu(this.getProjection()),i=this.hidpi_?2:1,o=e.imageWidth==e.imageHeight?e.imageWidth/i:[e.imageWidth/i,e.imageHeight/i],a=ku({extent:n,minZoom:e.zoomMin,maxZoom:r,tileSize:o});this.tileGrid=a;var s=this.culture_,u=this.hidpi_;if(this.tileUrlFunction=Uh(e.imageUrlSubdomains.map((function(t){var r=[0,0,0],n=e.imageUrl.replace("{subdomain}",t).replace("{culture}",s);return function(t,e,i){if(t){Pu(t[0],t[1],t[2],r);var o=n;return u&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",function(t){var e,r,n=t[0],i=new Array(n),o=1<<n-1;for(e=0;e<n;++e)r=48,t[1]&o&&(r+=1),t[2]&o&&(r+=2),i[e]=String.fromCharCode(r),o>>=1;return i.join("")}(r))}}}))),e.imageryProviders){var l=Tr(yr("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var r=[],n=t.viewState,i=this.getTileGrid(),o=i.getZForResolutio
 n(n.resolution,this.zDirection),a=i.getTileCoordForCoordAndZ(n.center,o)[0];return e.imageryProviders.map((function(e){for(var n=!1,i=e.coverageAreas,o=0,s=i.length;o<s;++o){var u=i[o];if(a>=u.zoomMin&&a<=u.zoomMax){var h=u.bbox;if(ye(_e([h[1],h[0],h[3],h[2]],l),t.extent)){n=!0;break}}}n&&r.push(e.attribution)})),r.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>'),r}.bind(this))}this.setState(Pi)}else this.setState(Ri)},e}(Zh),$h=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qh=function(t){function e(e){var r=e||{},n=void 0!==r.projection?r.projection:"EPSG:3857",i=void 0!==r.tileGrid?r.tileGrid:ku({extent:Gu(n),maxResoluti
 on:r.maxResolution,maxZoom:r.maxZoom,minZoom:r.minZoom,tileSize:r.tileSize});return t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,opaque:r.opaque,projection:n,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:r.tileLoadFunction,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:r.tileUrlFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this}return $h(e,t),e}(Zh),tc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ec=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,cach
 eSize:e.cacheSize,crossOrigin:e.crossOrigin,maxZoom:void 0!==e.maxZoom?e.maxZoom:18,minZoom:e.minZoom,projection:e.projection,wrapX:e.wrapX})||this;return r.account_=e.account,r.mapId_=e.map||"",r.config_=e.config||{},r.templateCache_={},r.initializeMap_(),r}return tc(e,t),e.prototype.getConfig=function(){return this.config_},e.prototype.updateConfig=function(t){T(this.config_,t),this.initializeMap_()},e.prototype.setConfig=function(t){this.config_=t||{},this.initializeMap_()},e.prototype.initializeMap_=function(){var t=JSON.stringify(this.config_);if(this.templateCache_[t])this.applyTemplate_(this.templateCache_[t]);else{var e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);var r=new XMLHttpRequest;r.addEventListener("load",this.handleInitResponse_.bind(this,t)),r.addEventListener("error",this.handleInitError_.bind(this)),r.open("POST",e),r.setRequestHeader("Content-type","application/json"),r.send(JSON.stringify(this.config_))}},e.prototype
 .handleInitResponse_=function(t,e){var r=e.target;if(!r.status||r.status>=200&&r.status<300){var n=void 0;try{n=JSON.parse(r.responseText)}catch(t){return void this.setState(Ri)}this.applyTemplate_(n),this.templateCache_[t]=n,this.setState(Pi)}else this.setState(Ri)},e.prototype.handleInitError_=function(t){this.setState(Ri)},e.prototype.applyTemplate_=function(t){var e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)},e}(Qh),rc=r(1),nc=r.n(rc),ic=function(){function t(t){this.rbush_=new nc.a(t),this.items_={}}return t.prototype.insert=function(t,e){var r={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(r),this.items_[o(e)]=r},t.prototype.load=function(t,e){for(var r=new Array(e.length),n=0,i=e.length;n<i;n++){var a=t[n],s=e[n],u={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],value:s};r[n]=u,this.items_[o(s)]=u}this.rbush_.load(r)},t.prototype.remove=function(t){var e=o(t),r=this.items_[e];return delete this.i
 tems_[e],null!==this.rbush_.remove(r)},t.prototype.update=function(t,e){var r=this.items_[o(e)];$t([r.minX,r.minY,r.maxX,r.maxY],t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var r,n=0,i=t.length;n<i;n++)if(r=e(t[n]))return r;return r},t.prototype.isEmpty=function(){return P(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return Zt(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_
 [e]},t}(),oc="addfeature",ac="changefeature",sc="clear",uc="removefeature",lc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hc=function(t){function e(e,r){var n=t.call(this,e)||this;return n.feature=r,n}return lc(e,t),e}(h),cc=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{attributions:n.attributions,projection:void 0,state:Pi,wrapX:void 0===n.wrapX||n.wrapX})||this).loader_=S,r.format_=n.format,r.overlaps_=void 0===n.overlaps||n.overlaps,r.url_=n.url,void 0!==n.loader?r.loader_=n.loader:void 0!==r.url_&&(lt(r.format_,7),r.loader_=wu(r.url_,r.format_)),r.strategy_=void 0!==n.strategy?n.strategy:Su;var i,o,a=void 0===n.useSpatialIndex||n.useSpatialIndex;return r.featuresRtree_=a?new ic:null,r
 .loadedExtentsRtree_=new ic,r.nullGeometryFeatures_={},r.idIndex_={},r.uidIndex_={},r.featureChangeKeys_={},r.featuresCollection_=null,Array.isArray(n.features)?o=n.features:n.features&&(o=(i=n.features).getArray()),a||void 0!==i||(i=new ut(o)),void 0!==o&&r.addFeaturesInternal(o),void 0!==i&&r.bindFeaturesCollection_(i),r}return lc(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=o(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var r=t.getGeometry();if(r){var n=r.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new hc(oc,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[W(e,I,this.handleFeatureChange_,this),W(e,c,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var r=!0,n=e.getId();return void 0!==n&&(n.
 toString()in this.idIndex_?r=!1:this.idIndex_[n.toString()]=e),r&&(lt(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),r},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],r=[],n=[],i=0,a=t.length;i<a;i++){var s=o(l=t[i]);this.addToIndex_(s,l)&&r.push(l)}i=0;for(var u=r.length;i<u;i++){var l;s=o(l=r[i]);this.setupChangeEvents_(s,l);var h=l.getGeometry();if(h){var c=h.getExtent();e.push(c),n.push(l)}else this.nullGeometryFeatures_[s]=l}this.featuresRtree_&&this.featuresRtree_.load(e,n);i=0;for(var p=r.length;i<p;i++)this.dispatchEvent(new hc(oc,r[i]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(oc,(function(r){e||(e=!0,t.push(r.feature),e=!1)})),this.addEventListener(uc,(function(r){e||(e=!0,t.remove(r.feature),e=!1)})),t.addEventListener(nt,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(it,function(t){e||(e=!0,this.removeFea
 ture(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(X)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(var r in this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this)),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var n=new hc(sc);this.dispatchEvent(n),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var r=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(r,(function(r){return r.getGeometry().intersectsCoordinate(t)
 ?e(r):void 0}))},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(r){if(r.getGeometry().intersectsExtent(t)){var n=e(r);if(n)return n}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray():this.featuresRtree_&&(t=this.featuresRtree_.getAll(),P(this.nullGeometryFeatures_)||m(t,C(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray():[]},e.
 prototype.getClosestFeatureToCoordinate=function(t,e){var r=t[0],n=t[1],i=null,o=[NaN,NaN],a=1/0,s=[-1/0,-1/0,1/0,1/0],u=e||x;return this.featuresRtree_.forEachInExtent(s,(function(t){if(u(t)){var e=t.getGeometry(),l=a;if((a=e.closestPointXY(r,n,o,a))<l){i=t;var h=Math.sqrt(a);s[0]=r-h,s[1]=n-h,s[2]=r+h,s[3]=n+h}}})),i},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,r=o(e),n=e.getGeometry();if(n){var i=n.getExtent();r in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[r],this.featuresRtree_&&this.featuresRtree_.insert(i,e)):this.featuresRtr
 ee_&&this.featuresRtree_.update(i,e)}else r in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[r]=e);var a=e.getId();if(void 0!==a){var s=a.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[r]=e;this.changed(),this.dispatchEvent(new hc(ac,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:o(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&P(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,r){var n=this.loadedExtentsRtree_,i=this.strategy_(t,e);this.loading=!1;for(var o=function(t,o){var s=i[t];n.forEachInExtent(s,(function(t){return Vt(t.extent,s)}))||(a.loader_.call(a,s,e,r),n.insert(s,{extent:s.slice()}),a.loading=a.loader_!==S)},a=this,s=0,u=i.length;s<u;++s)o(s)},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.pr
 ototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,r=this.loadedExtentsRtree_;r.forEachInExtent(t,(function(r){if($t(r.extent,t))return e=r,!0})),e&&r.remove(e)},e.prototype.removeFeature=function(t){var e=o(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var e=o(t);this.featureChangeKeys_[e].forEach(X),delete this.featureChangeKeys_[e];var r=t.getId();void 0!==r&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new hc(uc,t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var r in this.idIndex_)if(this.idIndex_[r]===t){delete this.idIndex_[r],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){lt(this.format_,7),this.setLoader(wu(t,this.format_))},e}(Ah),pc=function(){var t=function(e,r){return(t=Object.s
 etPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fc=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,wrapX:e.wrapX})||this;return r.resolution=void 0,r.distance=void 0!==e.distance?e.distance:20,r.features=[],r.geometryFunction=e.geometryFunction||function(t){var e=t.getGeometry();return lt(e.getType()==yt.POINT,10),e},r.boundRefresh_=r.refresh.bind(r),r.setSource(e.source||null),r}return pc(e,t),e.prototype.clear=function(e){this.features.length=0,t.prototype.clear.call(this,e)},e.prototype.getDistance=function(){return this.distance},e.prototype.getSource=function(){return this.source},e.prototype.loadFeatures=function(t,e,r){this.source.loadFeatures(t,e,r),e!==this.resolution&&(this.clear(),this.resolution=e,this.cluster(),this.
 addFeatures(this.features))},e.prototype.setDistance=function(t){this.distance=t,this.refresh()},e.prototype.setSource=function(t){this.source&&this.source.removeEventListener(I,this.boundRefresh_),this.source=t,t&&t.addEventListener(I,this.boundRefresh_),this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},e.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=[1/0,1/0,-1/0,-1/0],e=this.distance*this.resolution,r=this.source.getFeatures(),n={},i=0,a=r.length;i<a;i++){var s=r[i];if(!(o(s)in n)){var u=this.geometryFunction(s);if(u){Ht(u.getCoordinates(),t),zt(t,e,t);var l=this.source.getFeaturesInExtent(t);l=l.filter((function(t){var e=o(t);return!(e in n)&&(n[e]=!0,!0)})),this.features.push(this.createCluster(l))}}}},e.prototype.createCluster=function(t){for(var e=[0,0],r=t.length-1;r>=0;--r){var n=this.geometryFunction(t[r]);n?tr(e,n.getCoordinates()):t.splice(r,1)}ar(e,1/t.length);var i=new ct(new gn
 (e));return i.set("features",t),i},e}(cc),dc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gc="default",yc="truncated",mc=function(t){function e(e,r,n,i,o,a,s){var u=t.call(this,r,n,i,o,a,s)||this;return u.zoomifyImage_=null,u.tileSize_=e,u}return dc(e,t),e.prototype.getImage=function(){if(this.zoomifyImage_)return this.zoomifyImage_;var e=t.prototype.getImage.call(this);if(this.state==fa){var r=this.tileSize_;if(e.width==r[0]&&e.height==r[1])return this.zoomifyImage_=e,e;var n=Bi(r[0],r[1]);return n.drawImage(e,0,0),this.zoomifyImage_=n.canvas,n.canvas}return e},e}(mh),vc=function(t){function e(e){var r=this,n=e,i=n.size,o=void 0!==n.tierSizeCalculation?n.tierSizeCalculation:gc,a=n.tilePixelRatio||1,s=i[
 0],u=i[1],l=[],h=n.tileSize||256,c=h*a;switch(o){case gc:for(;s>c||u>c;)l.push([Math.ceil(s/c),Math.ceil(u/c)]),c+=c;break;case yc:for(var p=s,f=u;p>c||f>c;)l.push([Math.ceil(p/c),Math.ceil(f/c)]),p>>=1,f>>=1;break;default:lt(!1,53)}l.push([1,1]),l.reverse();for(var d=[a],g=[0],y=1,m=l.length;y<m;y++)d.push(a<<y),g.push(l[y-1][0]*l[y-1][1]+g[y-1]);d.reverse();var v=new Fu({tileSize:h,extent:n.extent||[0,-u,s,0],resolutions:d}),_=n.url;_&&-1==_.indexOf("{TileGroup}")&&-1==_.indexOf("{tileIndex}")&&(_+="{TileGroup}/{z}-{x}-{y}.jpg");var b=Yh(_),x=h*a;var w=Uh(b.map((function(t){return function(e,r,n){if(e){var i=e[0],o=e[1],a=e[2],s=o+a*l[i][0],u={z:i,x:o,y:a,tileIndex:s,TileGroup:"TileGroup"+((s+g[i])/x|0)};return t.replace(/\{(\w+?)\}/g,(function(t,e){return u[e]}))}}}))),S=mc.bind(null,za(h*a));(r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,projection:n.projection,tilePixelRatio:a,reprojectionErrorThreshol
 d:n.reprojectionErrorThreshold,tileClass:S,tileGrid:v,tileUrlFunction:w,transition:n.transition})||this).zDirection=n.zDirection;var T=w(v.getTileCoordForCoordAndResolution(ue(v.getExtent()),d[d.length-1]),1,null),E=new Image;return E.addEventListener("error",function(){x=h,this.changed()}.bind(r)),E.src=T,r}return dc(e,t),e}(Zh),_c=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n},bc="version1",xc="version2",wc="version3",Sc={};Sc[bc]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},Sc[xc]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regio
 nByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},Sc[wc]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},Sc.none={none:{supports:[],formats:[],qualities:[]}};var Tc=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,Ec=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,Cc=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;var Pc={};Pc[bc]=function(t){var e=t.getComplianceLevelSupportedFeatures();retu
 rn void 0===e&&(e=Sc[bc].level0),{url:void 0===t.imageInfo["@id"]?void 0:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:_c(e.formats,[void 0===t.imageInfo.formats?[]:t.imageInfo.formats]),qualities:_c(e.qualities,[void 0===t.imageInfo.qualities?[]:t.imageInfo.qualities]),resolutions:t.imageInfo.scale_factors,tileSize:void 0!==t.imageInfo.tile_width?void 0!==t.imageInfo.tile_height?[t.imageInfo.tile_width,t.imageInfo.tile_height]:[t.imageInfo.tile_width,t.imageInfo.tile_width]:null!=t.imageInfo.tile_height?[t.imageInfo.tile_height,t.imageInfo.tile_height]:void 0}},Pc[xc]=function(t){var e=t.getComplianceLevelSupportedFeatures(),r=Array.isArray(t.imageInfo.profile)&&t.imageInfo.profile.length>1,n=r&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],i=r&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],o=r&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?
 :info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:_c(e.supports,n),formats:_c(e.formats,i),qualities:_c(e.qualities,o)}},Pc[wc]=function(t){var e=t.getComplianceLevelSupportedFeatures(),r=void 0===t.imageInfo.extraFormats?e.formats:_c(e.formats,t.imageInfo.extraFormats),n=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return["jpg","png","gif"].includes(t)})).reduce((function(t,e){return void 0===t&&r.includes(e)?e:t}),void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?v
 oid 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?e.supports:_c(e.supports,t.imageInfo.extraFeatures),formats:r,qualities:void 0===t.imageInfo.extraQualities?e.qualities:_c(e.qualities,t.imageInfo.extraQualities),preferredFormat:n}};var Rc=function(){function t(t){this.setImageInfo(t)}return t.prototype.setImageInfo=function(t){this.imageInfo="string"==typeof t?JSON.parse(t):t},t.prototype.getImageApiVersion=function(){if(void 0!==this.imageInfo){var t=this.imageInfo["@context"]||"ol-no-context";"string"==typeof t&&(t=[t]);for(var e=0;e<t.length;e++)switch(t[e]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/
 context.json":return bc;case"http://iiif.io/api/image/2/context.json":return xc;case"http://iiif.io/api/image/3/context.json":return wc;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(bc)&&this.imageInfo.identifier)return bc}lt(!1,61)}},t.prototype.getComplianceLevelEntryFromProfile=function(t){if(void 0!==this.imageInfo&&void 0!==this.imageInfo.profile)switch(void 0===t&&(t=this.getImageApiVersion()),t){case bc:if(Tc.test(this.imageInfo.profile))return this.imageInfo.profile;break;case wc:if(Cc.test(this.imageInfo.profile))return this.imageInfo.profile;break;case xc:if("string"==typeof this.imageInfo.profile&&Ec.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&"string"==typeof this.imageInfo.profile[0]&&Ec.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}},t.prototype.getComplianceLevelFromProfile=function(t){var e=this.getComplianceLevelEntryFromProfile(t);if(void 0!
 ==e){var r=e.match(/level[0-2](?:\.json)?$/g);return Array.isArray(r)?r[0].replace(".json",""):void 0}},t.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var t=this.getImageApiVersion(),e=this.getComplianceLevelFromProfile(t);return void 0===e?Sc.none.none:Sc[t][e]}},t.prototype.getTileSourceOptions=function(t){var e=t||{},r=this.getImageApiVersion();if(void 0!==r){var n=void 0===r?void 0:Pc[r](this);if(void 0!==n)return{url:n.url,version:r,size:[this.imageInfo.width,this.imageInfo.height],sizes:n.sizes,format:void 0!==e.format&&n.formats.includes(e.format)?e.format:void 0!==n.preferredFormat?n.preferredFormat:"jpg",supports:n.supports,quality:e.quality&&n.qualities.includes(e.quality)?e.quality:n.qualities.includes("native")?"native":"default",resolutions:Array.isArray(n.resolutions)?n.resolutions.sort((function(t,e){return e-t})):void 0,tileSize:n.tileSize}}},t}(),Oc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}i
 nstanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Ic(t){return t.toLocaleString("en",{maximumFractionDigits:10})}var Lc=function(t){function e(e){var r=this,n=e||{},i=n.url||"";i+=i.lastIndexOf("/")===i.length-1||""===i?"":"/";var o=n.version||xc,a=n.sizes||[],s=n.size;lt(null!=s&&Array.isArray(s)&&2==s.length&&!isNaN(s[0])&&s[0]>0&&!isNaN(s[1])&&s[1]>0,60);var u,l,h,c=s[0],p=s[1],f=n.tileSize,d=n.tilePixelRatio||1,g=n.format||"jpg",y=n.quality||(n.version==bc?"native":"default"),m=n.resolutions||[],v=n.supports||[],_=n.extent||[0,-p,c,0],b=null!=a&&Array.isArray(a)&&a.length>0,x=void 0!==f&&("number"==typeof f&&Number.isInteger(f)&&f>0||Array.isArray(f)&&f.length>0),w=null!=v&&Array.isArray(v)&&(v.includes("regionByPx")||v.includes("regionByPct"))&&(v.includes("sizeByWh")||v.
 includes("sizeByH")||v.includes("sizeByW")||v.includes("sizeByPct"));if(m.sort((function(t,e){return e-t})),x||w)if(null!=f&&("number"==typeof f&&Number.isInteger(f)&&f>0?(u=f,l=f):Array.isArray(f)&&f.length>0&&((1==f.length||null==f[1]&&Number.isInteger(f[0]))&&(u=f[0],l=f[0]),2==f.length&&(Number.isInteger(f[0])&&Number.isInteger(f[1])?(u=f[0],l=f[1]):null==f[0]&&Number.isInteger(f[1])&&(u=f[1],l=f[1])))),void 0!==u&&void 0!==l||(u=256,l=256),0==m.length)for(var S=h=Math.max(Math.ceil(Math.log(c/u)/Math.LN2),Math.ceil(Math.log(p/l)/Math.LN2));S>=0;S--)m.push(Math.pow(2,S));else{var T=Math.max.apply(Math,m);h=Math.round(Math.log(T)/Math.LN2)}else if(u=c,l=p,m=[],b){a.sort((function(t,e){return t[0]-e[0]})),h=-1;var E=[];for(S=0;S<a.length;S++){var C=c/a[S][0];m.length>0&&m[m.length-1]==C?E.push(S):(m.push(C),h++)}if(E.length>0)for(S=0;S<E.length;S++)a.splice(E[S]-S,1)}else m.push(1),a.push([c,p]),h=0;var P=new Fu({tileSize:[u,l],extent:_,origin:fe(_),resolutions:m}),R=mc.bind(null,
 za(f||256).map((function(t){return t*d})));return(r=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:n.state,tileClass:R,tileGrid:P,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:function(t,e,r){var n,s,f=t[0];if(!(f>h)){var d=t[1],_=t[2],S=m[f];if(!(void 0===d||void 0===_||void 0===S||d<0||Math.ceil(c/S/u)<=d||_<0||Math.ceil(p/S/l)<=_)){if(w||x){var T=d*u*S,E=_*l*S,C=u*S,P=l*S,R=u,O=l;if(T+C>c&&(C=c-T),E+P>p&&(P=p-E),T+u*S>c&&(R=Math.floor((c-T+S-1)/S)),E+l*S>p&&(O=Math.floor((p-E+S-1)/S)),0==T&&C==c&&0==E&&P==p)n="full";else if(!w||v.includes("regionByPx"))n=T+","+E+","+C+","+P;else if(v.includes("regionByPct")){n="pct:"+Ic(T/c*100)+","+Ic(E/p*100)+","+Ic(C/c*100)+","+Ic(P/p*100)}o!=wc||w&&!v.includes("sizeByWh")?!w||v.includes("sizeByW")?s=R+",":v.includes("sizeByH")?s=","+O
 :v.includes("sizeByWh")?s=R+","+O:v.includes("sizeByPct")&&(s="pct:"+Ic(100/S)):s=R+","+O}else if(n="full",b){var I=a[f][0],L=a[f][1];s=o==wc?I==c&&L==p?"max":I+","+L:I==c?"full":I+","}else s=o==wc?"max":"full";return i+n+"/"+s+"/0/"+y+"."+g}}},transition:n.transition})||this).zDirection=n.zDirection,r}return Oc(e,t),e}(Zh),Mc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fc=function(t){function e(e,r,n,i,o,a,s){var u=this,l=e.getExtent(),h=r.getExtent(),c=h?pe(n,h):n,p=wh(e,r,ue(c),i),f=new vh(e,r,c,l,.5*p,i),d=a(f.calculateSourceExtent(),p,o),g=d?To:Ro,y=d?d.getPixelRatio():1;return(u=t.call(this,n,i,y,g)||this).targetProj_=r,u.maxSourceExtent_=l,u.triangulation_=f,u.targetResolution_=i,u.targetExtent_=
 n,u.sourceImage_=d,u.sourcePixelRatio_=y,u.contextOptions_=s,u.canvas_=null,u.sourceListenerKey_=null,u}return Mc(e,t),e.prototype.disposeInternal=function(){this.state==Eo&&this.unlistenSource_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==Co){var e=ge(this.targetExtent_)/this.targetResolution_,r=ce(this.targetExtent_)/this.targetResolution_;this.canvas_=Sh(e,r,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.contextOptions_)}this.state=t,this.changed()},e.prototype.load=function(){if(this.state==To){this.state=Eo,this.changed();var t=this.sourceImage_.getState();t==Co||t==Po?this.reproject_():(this.sourceListenerKey_=W(
 this.sourceImage_,I,(function(t){var e=this.sourceImage_.getState();e!=Co&&e!=Po||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){X(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(Zl),Ac=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),kc="imageloadstart",Nc="imageloadend",jc="imageloaderror",Gc=function(t){function e(e,r){var n=t.call(this,e)||this;return n.image=r,n}return Ac(e,t),e}(h);function Dc(t,e){t.getImage().src=e}var zc=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,projection:e.projection,state:e.state})||this;return r.resolutions_=void 0!==e.resolutions?e.resolutions:null,r.reprojectedImage_
 =null,r.reprojectedRevision_=0,r.contextOptions_=!1===e.imageSmoothing?_h:void 0,r}return Ac(e,t),e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var e=g(this.resolutions_,t,0);t=this.resolutions_[e]}return t},e.prototype.getImage=function(t,e,r,n){var i=this.getProjection();if(i&&n&&!Sr(i,n)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Sr(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&$t(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new Fc(i,n,t,e,r,function(t,e,r){return this.getImageInternal(t,e,r,i)}.bind(this),this.contextOptions_),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return i&&(n=i),this.getImageInternal(t,e,r,n)}
 ,e.prototype.getImageInternal=function(t,e,r,i){return n()},e.prototype.handleImageChange=function(t){var e=t.target;switch(e.getState()){case Eo:this.loading=!0,this.dispatchEvent(new Gc(kc,e));break;case Co:this.loading=!1,this.dispatchEvent(new Gc(Nc,e));break;case Po:this.loading=!1,this.dispatchEvent(new Gc(jc,e))}},e}(Ah);function Uc(t,e){var r=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&r.push(t+"="+encodeURIComponent(e[t]))}));var n=r.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+n}var Bc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Yc=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{attributions:n.attributions,imageSmoothing:
 n.imageSmoothing,projection:n.projection,resolutions:n.resolutions})||this).crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:null,r.hidpi_=void 0===n.hidpi||n.hidpi,r.url_=n.url,r.imageLoadFunction_=void 0!==n.imageLoadFunction?n.imageLoadFunction:Dc,r.params_=n.params||{},r.image_=null,r.imageSize_=[0,0],r.renderedRevision_=0,r.ratio_=void 0!==n.ratio?n.ratio:1.5,r}return Bc(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,r,n){if(void 0===this.url_)return null;e=this.findNearestResolution(e),r=this.hidpi_?r:1;var i=this.image_;if(i&&this.renderedRevision_==this.getRevision()&&i.getResolution()==e&&i.getPixelRatio()==r&&Vt(i.getExtent(),t))return i;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};T(o,this.params_);var a=((t=t.slice())[0]+t[2])/2,s=(t[1]+t[3])/2;if(1!=this.ratio_){var u=this.ratio_*ge(t)/2,l=this.ratio_*ce(t)/2;t[0]=a-u,t[1]=s-l,t[2]=a+u,t[3]=s+l}var h=e/r,c=Math.ceil(ge(t)/h),p=Math.ceil(ce(t)/h);t[0]=a-h*c/2,t[2]
 =a+h*c/2,t[1]=s-h*p/2,t[3]=s+h*p/2,this.imageSize_[0]=c,this.imageSize_[1]=p;var f=this.getRequestUrl_(t,this.imageSize_,r,n,o);return this.image_=new Jl(t,e,r,f,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(I,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,r,n,i){var o=n.getCode().split(":").pop();i.SIZE=e[0]+","+e[1],i.BBOX=t.join(","),i.BBOXSR=o,i.IMAGESR=o,i.DPI=Math.round(90*r);var a=this.url_,s=a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return s==a&&lt(!1,50),Uc(s,i)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(
 t){T(this.params_,t),this.image_=null,this.changed()},e}(zc),Vc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wc=function(t){function e(e,r,n,i,o){var a=this,s=void 0!==o?To:Co;return(a=t.call(this,e,r,n,s)||this).loader_=void 0!==o?o:null,a.canvas_=i,a.error_=null,a}return Vc(e,t),e.prototype.getError=function(){return this.error_},e.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=Po):this.state=Co,this.changed()},e.prototype.load=function(){this.state==To&&(this.state=Eo,this.changed(),this.loader_(this.handleLoad_.bind(this)))},e.prototype.getImage=function(){return this.canvas_},e}(Zl),qc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&funct
 ion(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xc=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{attributions:n.attributions,imageSmoothing:n.imageSmoothing,projection:n.projection,resolutions:n.resolutions,state:n.state})||this).canvasFunction_=n.canvasFunction,r.canvas_=null,r.renderedRevision_=0,r.ratio_=void 0!==n.ratio?n.ratio:1.5,r}return qc(e,t),e.prototype.getImageInternal=function(t,e,r,n){e=this.findNearestResolution(e);var i=this.canvas_;if(i&&this.renderedRevision_==this.getRevision()&&i.getResolution()==e&&i.getPixelRatio()==r&&Vt(i.getExtent(),t))return i;ve(t=t.slice(),this.ratio_);var o=[ge(t)/e*r,ce(t)/e*r],a=this.canvasFunction_.call(this,t,e,r,o,n);return a&&(i=new Wc(t,e,r,a)),this.canvas_=i,this.renderedRevision_=this.getRevision(),i},e}(zc),Zc=function(){var t=fu
 nction(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var Kc=function(t){function e(e){var r=t.call(this,{imageSmoothing:e.imageSmoothing,projection:e.projection,resolutions:e.resolutions})||this;return r.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null,r.displayDpi_=void 0!==e.displayDpi?e.displayDpi:96,r.params_=e.params||{},r.url_=e.url,r.imageLoadFunction_=void 0!==e.imageLoadFunction?e.imageLoadFunction:Dc,r.hidpi_=void 0===e.hidpi||e.hidpi,r.metersPerUnit_=void 0!==e.metersPerUnit?e.metersPerUnit:1,r.ratio_=void 0!==e.ratio?e.ratio:1,r.useOverlay_=void 0!==e.useOverlay&&e.useOverlay,r.image_=null,r.renderedRevision_=0,r}return Zc(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=fun
 ction(t,e,r,n){e=this.findNearestResolution(e),r=this.hidpi_?r:1;var i=this.image_;if(i&&this.renderedRevision_==this.getRevision()&&i.getResolution()==e&&i.getPixelRatio()==r&&Vt(i.getExtent(),t))return i;1!=this.ratio_&&ve(t=t.slice(),this.ratio_);var o=[ge(t)/e*r,ce(t)/e*r];if(void 0!==this.url_){var a=this.getUrl(this.url_,this.params_,t,o,n);(i=new Jl(t,e,r,a,this.crossOrigin_,this.imageLoadFunction_)).addEventListener(I,this.handleImageChange.bind(this))}else i=null;return this.image_=i,this.renderedRevision_=this.getRevision(),i},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.updateParams=function(t){T(this.params_,t),this.changed()},e.prototype.getUrl=function(t,e,r,n,i){var o=function(t,e,r,n){var i=ge(t),o=ce(t),a=e[0],s=e[1],u=.0254/n;return s*i>a*o?i*r/(a*u):o*r/(s*u)}(r,n,this.metersPerUnit_,this.displayDpi_),a=ue(r),s={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"o
 l/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.displayDpi_,SETDISPLAYWIDTH:Math.round(n[0]),SETDISPLAYHEIGHT:Math.round(n[1]),SETVIEWSCALE:o,SETVIEWCENTERX:a[0],SETVIEWCENTERY:a[1]};return T(s,e),Uc(t,s)},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e}(zc),Hc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jc=function(t){function e(e){var r=this,n=void 0!==e.crossOrigin?e.crossOrigin:null,i=void 0!==e.imageLoadFunction?e.imageLoadFunction:Dc;return(r=t.call(this,{attributions:e.attributions,imageSmoothing:e.imageSmoothing,projection:yr(e.projection)})||this).url_=e.url,r.imageExtent_=e.imageExtent,r.image_=new Jl(r.imageExtent_,void 0,1,
 r.url_,n,i),r.imageSize_=e.imageSize?e.imageSize:null,r.image_.addEventListener(I,r.handleImageChange.bind(r)),r}return Hc(e,t),e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,e,r,n){return ye(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(e){if(this.image_.getState()==Co){var r=this.image_.getExtent(),n=this.image_.getImage(),i=void 0,o=void 0;this.imageSize_?(i=this.imageSize_[0],o=this.imageSize_[1]):(i=n.width,o=n.height);var a=ce(r)/o,s=Math.ceil(ge(r)/a);if(s!=i){var u=Bi(s,o),l=u.canvas;u.drawImage(n,0,0,i,o,0,0,l.width,l.height),this.image_.setImage(l)}}t.prototype.handleImageChange.call(this,e)},e}(zc),$c="carmentaserver",Qc="geoserver",tp="mapserver",ep="qgis",rp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&
 &(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),np=[101,101],ip=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{attributions:n.attributions,imageSmoothing:n.imageSmoothing,projection:n.projection,resolutions:n.resolutions})||this).crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:null,r.url_=n.url,r.imageLoadFunction_=void 0!==n.imageLoadFunction?n.imageLoadFunction:Dc,r.params_=n.params||{},r.v13_=!0,r.updateV13_(),r.serverType_=n.serverType,r.hidpi_=void 0===n.hidpi||n.hidpi,r.image_=null,r.imageSize_=[0,0],r.renderedRevision_=0,r.ratio_=void 0!==n.ratio?n.ratio:1.5,r}return rp(e,t),e.prototype.getFeatureInfoUrl=function(t,e,r,n){if(void 0!==this.url_){var i=yr(r),o=this.getProjection();o&&o!==i&&(e=wh(o,i,t,e),t=Cr(t,i,o));var a=he(t,e,0,np),s={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params
 _.LAYERS};T(s,this.params_,n);var u=Math.floor((t[0]-a[0])/e),l=Math.floor((a[3]-t[1])/e);return s[this.v13_?"I":"X"]=u,s[this.v13_?"J":"Y"]=l,this.getRequestUrl_(a,np,1,o||i,s)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.url_){var r={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var n=this.params_.LAYERS;if(!(!Array.isArray(n)||1===n.length))return;r.LAYER=n}if(void 0!==t){var i=this.getProjection()?this.getProjection().getMetersPerUnit():1;r.SCALE=t*i*39.37*(25.4/.28)}return T(r,e),Uc(this.url_,r)}},e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,r,n){if(void 0===this.url_)return null;e=this.findNearestResolution(e),1==r||this.hidpi_&&void 0!==this.serverType_||(r=1);var i=e/r,o=ue(t),a=he(o,i,0,[Math.ceil(ge(t)/i),Math.ceil(ce(t)/i)]),s=he(o,i,0,[Math.ceil(this.ratio_*ge(t)/i),Math.ceil(this.ratio_*ce(t)/i)]),u=this.image_;if(u&&this.renderedRevision_==thi
 s.getRevision()&&u.getResolution()==e&&u.getPixelRatio()==r&&Vt(u.getExtent(),a))return u;var l={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};T(l,this.params_),this.imageSize_[0]=Math.round(ge(s)/i),this.imageSize_[1]=Math.round(ce(s)/i);var h=this.getRequestUrl_(s,this.imageSize_,r,n,l);return this.image_=new Jl(s,e,r,h,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(I,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,r,n,i){if(lt(void 0!==this.url_,9),i[this.v13_?"CRS":"SRS"]=n.getCode(),"STYLES"in this.params_||(i.STYLES=""),1!=r)switch(this.serverType_){case Qc:var o=90*r+.5|0;"FORMAT_OPTIONS"in i?i.FORMAT_OPTIONS+=";dpi:"+o:i.FORMAT_OPTIONS="dpi:"+o;break;case tp:i.MAP_RESOLUTION=90*r;break;case $c:case ep:i.DPI=90*r;break;default:lt(!1,8)}i.WIDTH=e[0],i.HEIGHT=e[1
 ];var a,s=n.getAxisOrientation();return a=this.v13_&&"ne"==s.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,i.BBOX=a.join(","),Uc(this.url_,i)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){T(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},e.prototype.updateV13_=function(){var t=this.params_.VERSION||"1.3.0";this.v13_=Qe(t,"1.3")>=0},e}(zc),op=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ap='© <a href="https://www.openstreetmap.org/copyright" target="_blank">Op
 enStreetMap</a> contributors.',sp=function(t){function e(e){var r,n=e||{};r=void 0!==n.attributions?n.attributions:[ap];var i=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",o=void 0!==n.url?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:r,cacheSize:n.cacheSize,crossOrigin:i,imageSmoothing:n.imageSmoothing,opaque:void 0===n.opaque||n.opaque,maxZoom:void 0!==n.maxZoom?n.maxZoom:19,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,url:o,wrapX:n.wrapX,attributionsCollapsible:!1})||this}return op(e,t),e}(Qh),up=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),lp=function(t){function e(e){var r=e||{};return t.call(this,r)||t
 his}return up(e,t),e}(Li),hp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),cp=function(t){function e(e){var r=t.call(this)||this;return r.boundHandleImageChange_=r.handleImageChange_.bind(r),r.layer_=e,r}return hp(e,t),e.prototype.getFeatures=function(t){return n()},e.prototype.prepareFrame=function(t){return n()},e.prototype.renderFrame=function(t,e){return n()},e.prototype.loadedTileCallback=function(t,e,r){t[e]||(t[e]={}),t[e][r.tileCoord.toString()]=r},e.prototype.createLoadedTileFinder=function(t,e,r){return function(n,i){var o=this.loadedTileCallback.bind(this,r,n);return t.forEachLoadedTile(e,n,i,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i){},e.prototype.getDataAtPixel
 =function(t,e,r){return n()},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===Co&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=Co&&e!=Po&&t.addEventListener(I,this.boundHandleImageChange_),e==To&&(t.load(),e=t.getState()),e==Co},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Pi&&t.changed()},e}(H),pp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fp=function(t){function e(e){var r=t.call(this,e)||this;return r.container=null,r.renderedResolution,r.tempTransform=[1,0,0,1,0,0],r.pixelTransfor
 m=[1,0,0,1,0,0],r.inversePixelTransform=[1,0,0,1,0,0],r.context=null,r.containerReused=!1,r}return pp(e,t),e.prototype.useContainer=function(t,e,r){var n,i,o=this.getLayer().getClassName();t&&""===t.style.opacity&&t.className===o&&((s=t.firstElementChild)instanceof HTMLCanvasElement&&(i=s.getContext("2d")));if(!i||0!==i.canvas.width&&i.canvas.style.transform!==e?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=i,this.containerReused=!0),!this.container){(n=document.createElement("div")).className=o;var a=n.style;a.position="absolute",a.width="100%",a.height="100%";var s=(i=Bi()).canvas;n.appendChild(s),(a=s.style).position="absolute",a.left="0",a.transformOrigin="top left",this.container=n,this.context=i}},e.prototype.clip=function(t,e,r){var n=e.pixelRatio,i=e.size[0]*n/2,o=e.size[1]*n/2,a=e.viewState.rotation,s=fe(r),u=de(r),l=se(r),h=ae(r);Tt(e.coordinateToPixelTransform,s),Tt(e.coordinateToPixelTransform,u),Tt(e
 .coordinateToPixelTransform,l),Tt(e.coordinateToPixelTransform,h),t.save(),co(t,-a,i,o),t.beginPath(),t.moveTo(s[0]*n,s[1]*n),t.lineTo(u[0]*n,u[1]*n),t.lineTo(l[0]*n,l[1]*n),t.lineTo(h[0]*n,h[1]*n),t.clip(),co(t,a,i,o)},e.prototype.clipUnrotated=function(t,e,r){var n=fe(r),i=de(r),o=se(r),a=ae(r);Tt(e.coordinateToPixelTransform,n),Tt(e.coordinateToPixelTransform,i),Tt(e.coordinateToPixelTransform,o),Tt(e.coordinateToPixelTransform,a);var s=this.inversePixelTransform;Tt(s,n),Tt(s,i),Tt(s,o),Tt(s,a),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,r){var n=this.getLayer();if(n.hasListener(t)){var i=new zo(t,this.inversePixelTransform,r,e);n.dispatchEvent(i)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(bi,t,e)},e.prototype.postRender=function(t,e){this.dispatchRend
 erEvent_(xi,t,e)},e.prototype.getRenderTransform=function(t,e,r,n,i,o,a){var s=i/2,u=o/2,l=n/e,h=-l,c=-t[0]+a,p=-t[1];return Ct(this.tempTransform,s,u,l,h,-r,c,p)},e.prototype.getDataAtPixel=function(t,e,r){var n,i=Tt(this.inversePixelTransform,t.slice()),o=this.context;try{var a=Math.round(i[0]),s=Math.round(i[1]),u=document.createElement("canvas"),l=u.getContext("2d");u.width=1,u.height=1,l.clearRect(0,0,1,1),l.drawImage(o.canvas,a,s,1,1,0,0,1,1),n=l.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?new Uint8Array:n}return 0===n[3]?null:n},e}(cp),dp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gp=function(t){function e(e){var r=t.call(this,e)||this;return r.image_=null,r}return dp(e,t)
 ,e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var e=t.layerStatesArray[t.layerIndex],r=t.pixelRatio,n=t.viewState,i=n.resolution,o=this.getLayer().getSource(),a=t.viewHints,s=t.extent;if(void 0!==e.extent&&(s=pe(s,Nr(e.extent,n.projection))),!a[va]&&!a[_a]&&!me(s))if(o){var u=n.projection,l=o.getImage(s,i,r,u);l&&this.loadImage(l)&&(this.image_=l)}else this.image_=null;return!!this.image_},e.prototype.renderFrame=function(t,e){var r=this.image_,n=r.getExtent(),i=r.getResolution(),o=r.getPixelRatio(),a=t.layerStatesArray[t.layerIndex],s=t.pixelRatio,u=t.viewState,l=u.center,h=u.resolution,c=t.size,p=s*i/(h*o),f=Math.round(c[0]*s),d=Math.round(c[1]*s),g=u.rotation;if(g){var y=Math.round(Math.sqrt(f*f+d*d));f=y,d=y}Ct(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/s,1/s,g,-f/2,-d/2),Pt(this.inversePixelTransform,this.pixelTransform);var m=go(this.pixelTransform);this.useContainer(e,m,a.opacity);var v=this.context,_=
 v.canvas;_.width!=f||_.height!=d?(_.width=f,_.height=d):this.containerReused||v.clearRect(0,0,f,d);var b=!1;if(a.extent){var x=Nr(a.extent,u.projection);(b=!Vt(x,t.extent)&&ye(x,t.extent))&&this.clipUnrotated(v,t,x)}var w=r.getImage(),S=Ct(this.tempTransform,f/2,d/2,p,p,0,o*(n[0]-l[0])/i,o*(l[1]-n[3])/i);this.renderedResolution=i*s/o;var E=S[4],C=S[5],P=w.width*S[0],R=w.height*S[3];if(T(v,this.getLayer().getSource().getContextOptions()),this.preRender(v,t),P>=.5&&R>=.5){var O=a.opacity,I=void 0;1!==O&&(I=this.context.globalAlpha,this.context.globalAlpha=O),this.context.drawImage(w,0,0,+w.width,+w.height,Math.round(E),Math.round(C),Math.round(P),Math.round(R)),1!==O&&(this.context.globalAlpha=I)}return this.postRender(v,t),b&&v.restore(),m!==_.style.transform&&(_.style.transform=m),this.container},e}(fp),yp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r
 ]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),mp=function(t){function e(e){return t.call(this,e)||this}return yp(e,t),e.prototype.createRenderer=function(){return new gp(this)},e}(lp),vp="preload",_p="useInterimTilesOnError",bp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),xp=function(t){function e(e){var r=this,n=e||{},i=T({},n);return delete i.preload,delete i.useInterimTilesOnError,(r=t.call(this,i)||this).setPreload(void 0!==n.preload?n.preload:0),r.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),r}return bp(e,t),e.prototype.getPreload=function(){return this.ge
 t(vp)},e.prototype.setPreload=function(t){this.set(vp,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(_p)},e.prototype.setUseInterimTilesOnError=function(t){this.set(_p,t)},e}(Li),wp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sp=function(t){function e(e){var r=t.call(this,e)||this;return r.extentChanged=!0,r.renderedExtent_=null,r.renderedPixelRatio,r.renderedProjection=null,r.renderedRevision,r.renderedTiles=[],r.newTiles_=!1,r.tmpExtent=[1/0,1/0,-1/0,-1/0],r.tmpTileRange_=new Cu(0,0,0,0),r}return wp(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),r=t.getState(),n=e.getUseInterimTilesOnError();return r==fa||r==ga||r==da&&!n},e.prototype.getTile=function(t,e,r,n){
 var i=n.pixelRatio,o=n.viewState.projection,a=this.getLayer(),s=a.getSource().getTile(t,e,r,i,o);return s.getState()==da&&(a.getUseInterimTilesOnError()?a.getPreload()>0&&(this.newTiles_=!0):s.setState(fa)),this.isDrawableTile(s)||(s=s.getInterimTile()),s},e.prototype.loadedTileCallback=function(e,r,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,e,r,n)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var r=t.layerStatesArray[t.layerIndex],n=t.viewState,i=n.projection,a=n.resolution,s=n.center,u=n.rotation,l=t.pixelRatio,h=this.getLayer(),c=h.getSource(),p=c.getRevision(),d=c.getTileGridForProjection(i),g=d.getZForResolution(a,c.zDirection),y=d.getResolution(g),m=t.extent,v=r.extent&&Nr(r.extent,i);v&&(m=pe(m,Nr(r.extent,i)));var _=c.getTilePixelRatio(l),b=Math.round(t.size[0]*_),x=Math.round(t.size[1]*_);if(u){var w=Math.round(Math.sqrt(b*b+x*x));b=w,x=w}var S=y*b/2/_,E=y*x/2/_,C=[s[0]-S,s[1
 ]-E,s[0]+S,s[1]+E],P=d.getTileRangeForExtentAndZ(m,g),R={};R[g]={};var O=this.createLoadedTileFinder(c,i,R),I=this.tmpExtent,L=this.tmpTileRange_;this.newTiles_=!1;for(var M=P.minX;M<=P.maxX;++M)for(var F=P.minY;F<=P.maxY;++F){var A=this.getTile(g,M,F,t);if(this.isDrawableTile(A)){var k=o(this);if(A.getState()==fa){R[g][A.tileCoord.toString()]=A;var N=A.inTransition(k);this.newTiles_||!N&&-1!==this.renderedTiles.indexOf(A)||(this.newTiles_=!0)}if(1===A.getAlpha(k,t.time))continue}var j=d.getTileCoordChildTileRange(A.tileCoord,L,I),G=!1;j&&(G=O(g+1,j)),G||d.forEachTileCoordParentTileRange(A.tileCoord,O,L,I)}var D=y/a;Ct(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/_,1/_,u,-b/2,-x/2);var z=go(this.pixelTransform);this.useContainer(e,z,r.opacity);var U=this.context,B=U.canvas;Pt(this.inversePixelTransform,this.pixelTransform),Ct(this.tempTransform,b/2,x/2,D,D,0,-b/2,-x/2),B.width!=b||B.height!=x?(B.width=b,B.height=x):this.containerReused||U.clearRect(0,0,b,x),v&&this.clipUnrotated(U,
 t,v),T(U,c.getContextOptions()),this.preRender(U,t),this.renderedTiles.length=0;var Y,V,W,q=Object.keys(R).map(Number);q.sort(f),1!==r.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(Y=[],V=[]):q=q.reverse();for(var X=q.length-1;X>=0;--X){var Z=q[X],K=c.getTilePixelSize(Z,l,i),H=d.getResolution(Z)/y,J=K[0]*H*D,$=K[1]*H*D,Q=d.getTileCoordForCoordAndZ(fe(C),Z),tt=d.getTileCoordExtent(Q),et=Tt(this.tempTransform,[_*(tt[0]-C[0])/y,_*(C[3]-tt[3])/y]),rt=_*c.getGutterForProjection(i),nt=R[Z];for(var it in nt){var ot=(A=nt[it]).tileCoord,at=et[0]-(Q[1]-ot[1])*J,st=Math.round(at+J),ut=et[1]-(Q[2]-ot[2])*$,lt=Math.round(ut+$),ht=st-(M=Math.round(at)),ct=lt-(F=Math.round(ut)),pt=g===Z;if(!(N=pt&&1!==A.getAlpha(o(this),t.time)))if(Y){U.save(),W=[M,F,M+ht,F,M+ht,F+ct,M,F+ct];for(var ft=0,dt=Y.length;ft<dt;++ft)if(g!==Z&&Z<V[ft]){var gt=Y[ft];U.beginPath(),U.moveTo(W[0],W[1]),U.lineTo(W[2],W[3]),U.lineTo(W[4],W[5]),U.lineTo(W[6],W[7]),U.moveTo(gt[6],gt[7]),U.lineTo(gt[4],gt[
 5]),U.lineTo(gt[2],gt[3]),U.lineTo(gt[0],gt[1]),U.clip()}Y.push(W),V.push(Z)}else U.clearRect(M,F,ht,ct);this.drawTileImage(A,t,M,F,ht,ct,rt,pt,r.opacity),Y&&!N&&U.restore(),this.renderedTiles.push(A),this.updateUsedTiles(t.usedTiles,c,A)}}return this.renderedRevision=p,this.renderedResolution=y,this.extentChanged=!this.renderedExtent_||!$t(this.renderedExtent_,C),this.renderedExtent_=C,this.renderedPixelRatio=l,this.renderedProjection=i,this.manageTilePyramid(t,c,d,l,i,m,g,h.getPreload()),this.scheduleExpireCache(t,c),this.postRender(U,t),r.extent&&U.restore(),z!==B.style.transform&&(B.style.transform=z),this.container},e.prototype.drawTileImage=function(t,e,r,n,i,a,s,u,l){var h=this.getTileImage(t);if(h){var c=o(this),p=u?t.getAlpha(c,e.time):1,f=l*p,d=f!==this.context.globalAlpha;d&&(this.context.save(),this.context.globalAlpha=f),this.context.drawImage(h,s,s,h.width-2*s,h.height-2*s,r,n,i,a),d&&this.context.restore(),1!==p?e.animate=!0:u&&t.endTransition(c)}},e.prototype.getImag
 e=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var r=function(t,e,r){var n=o(t);n in r.usedTiles&&t.expireCache(r.viewState.projection,r.usedTiles[n])}.bind(null,e);t.postRenderFunctions.push(r)}},e.prototype.updateUsedTiles=function(t,e,r){var n=o(e);n in t||(t[n]={}),t[n][r.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,r,n,i,a,s,u,l){var h=o(e);h in t.wantedTiles||(t.wantedTiles[h]={});var c,p,f,d,g,y,m=t.wantedTiles[h],v=t.tileQueue,_=0;for(y=r.getMinZoom();y<=s;++y)for(p=r.getTileRangeForExtentAndZ(a,y,p),f=r.getResolution(y),d=p.minX;d<=p.maxX;++d)for(g=p.minY;g<=p.maxY;++g)s-y<=u?(++_,(c=e.getTile(y,d,g,n,i)).getState()==ca&&(m[c.getKey()]=!0,v.isKeyQueued(c.getKey())||v.enqueue([c,h,r.getTileCoordCenter(c.tileCoord),f])),void 0!==l&&l(c)):e.useTile(y,d,g,i);e.updateCacheSize(_,i)},e}(fp);Sp.prototype.getLayer;var Tp=Sp,Ep=function(
 ){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cp=function(t){function e(e){return t.call(this,e)||this}return Ep(e,t),e.prototype.createRenderer=function(){return new Tp(this)},e}(xp),Pp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rp=!0;try{new ImageData(10,10)}catch(t){Rp=!1}var Op=document.createElement("canvas").getContext("2d");function Ip(t){var e=!0;try{new ImageData(10,10)}catch(t){e=!1}function r(t,r,n){return e?new ImageData(
 t,r,n):{data:t,width:r,height:n}}return function(e){var n,i,o=e.buffers,a=e.meta,s=e.imageOps,u=e.width,l=e.height,h=o.length,c=o[0].byteLength;if(s){var p=new Array(h);for(i=0;i<h;++i)p[i]=r(new Uint8ClampedArray(o[i]),u,l);n=t(p,a).data}else{n=new Uint8ClampedArray(c);var f=new Array(h),d=new Array(h);for(i=0;i<h;++i)f[i]=new Uint8ClampedArray(o[i]),d[i]=[0,0,0,0];for(var g=0;g<c;g+=4){for(var y=0;y<h;++y){var m=f[y];d[y][0]=m[g],d[y][1]=m[g+1],d[y][2]=m[g+2],d[y][3]=m[g+3]}var v=t(d,a);n[g]=v[0],n[g+1]=v[1],n[g+2]=v[2],n[g+3]=v[3]}}return n.buffer}}function Lp(t,e){var r=Object.keys(t.lib||{}).map((function(e){return"var "+e+" = "+t.lib[e].toString()+";"})).concat(["var __minion__ = ("+Ip.toString()+")(",t.operation.toString(),");",'self.addEventListener("message", function(event) {',"  var buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),n=new Blob(r,{type:"text/javascript"}),i=URL.createObjectURL(n),o=new Worker(
 i);return o.addEventListener("message",e),o}var Mp=function(t){function e(e){var r,n=t.call(this)||this;n._imageOps=!!e.imageOps;var i=[];if(r=0===e.threads?0:n._imageOps?1:e.threads||1)for(var o=0;o<r;++o)i[o]=Lp(e,n._onWorkerMessage.bind(n,o));else i[0]=function(t,e){var r=Ip(t.operation),n=!1;return{postMessage:function(t){setTimeout((function(){n||e({data:{buffer:r(t),meta:t.meta}})}),0)},terminate:function(){n=!0}}}(e,n._onWorkerMessage.bind(n,0));return n._workers=i,n._queue=[],n._maxQueueLength=e.queue||1/0,n._running=0,n._dataLookup={},n._job=null,n}return Pp(e,t),e.prototype.process=function(t,e,r){this._enqueue({inputs:t,meta:e,callback:r}),this._dispatch()},e.prototype._enqueue=function(t){for(this._queue.push(t);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)},e.prototype._dispatch=function(){if(0===this._running&&this._queue.length>0){var t=this._queue.shift();this._job=t;var e=t.inputs[0].width,r=t.inputs[0].height,n=t.inputs.map((funct
 ion(t){return t.data.buffer})),i=this._workers.length;if(this._running=i,1===i)this._workers[0].postMessage({buffers:n,meta:t.meta,imageOps:this._imageOps,width:e,height:r},n);else for(var o=t.inputs[0].data.length,a=4*Math.ceil(o/4/i),s=0;s<i;++s){for(var u=s*a,l=[],h=0,c=n.length;h<c;++h)l.push(n[s].slice(u,u+a));this._workers[s].postMessage({buffers:l,meta:t.meta,imageOps:this._imageOps,width:e,height:r},l)}}},e.prototype._onWorkerMessage=function(t,e){this.disposed||(this._dataLookup[t]=e.data,--this._running,0===this._running&&this._resolveJob())},e.prototype._resolveJob=function(){var t,e,r=this._job,n=this._workers.length;if(1===n)t=new Uint8ClampedArray(this._dataLookup[0].buffer),e=this._dataLookup[0].meta;else{var i=r.inputs[0].data.length;t=new Uint8ClampedArray(i),e=new Array(i);for(var o=4*Math.ceil(i/4/n),a=0;a<n;++a){var s=this._dataLookup[a].buffer,u=a*o;t.set(new Uint8ClampedArray(s),u),e[a]=this._dataLookup[a].meta}}this._job=null,this._dataLookup={},r.callback(nul
 l,function(t,e,r){if(Rp)return new ImageData(t,e,r);var n=Op.createImageData(e,r);return n.data.set(t),n}(t,r.inputs[0].width,r.inputs[0].height),e),this._dispatch()},e.prototype.disposeInternal=function(){for(var t=0;t<this._workers.length;++t)this._workers[t].terminate();this._workers.length=0},e}(p),Fp="beforeoperations",Ap="afteroperations",kp="pixel",Np="image",jp=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.extent=r.extent,i.resolution=r.viewState.resolution/r.pixelRatio,i.data=n,i}return Pp(e,t),e}(h),Gp=function(t){function e(e){var r=t.call(this,{projection:null})||this;r.processor_=null,r.operationType_=void 0!==e.operationType?e.operationType:kp,r.threads_=void 0!==e.threads?e.threads:1,r.layers_=function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=Up(t[n]);return r}(e.sources);for(var n,i=r.changed.bind(r),o=0,a=r.layers_.length;o<a;++o)r.layers_[o].addEventListener(I,i);return r.tileQueue_=new ma((function(){return 1}),r.changed.bind(r)),r
 .requestedFrameState_,r.renderedImageCanvas_=null,r.renderedRevision_,r.frameState_={animate:!1,coordinateToPixelTransform:[1,0,0,1,0,0],extent:null,index:0,layerIndex:0,layerStatesArray:(n=r.layers_,n.map((function(t){return t.getLayerState()}))),pixelRatio:1,pixelToCoordinateTransform:[1,0,0,1,0,0],postRenderFunctions:[],size:[0,0],tileQueue:r.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},declutterItems:[]},r.setAttributions((function(t){for(var r=[],n=0,i=e.sources.length;n<i;++n){var o=e.sources[n],a=(o instanceof Ah?o:o.getSource()).getAttributions();if("function"==typeof a){var s=a(t);r.push.apply(r,s)}}return 0!==r.length?r:null})),void 0!==e.operation&&r.setOperation(e.operation,e.lib),r}return Pp(e,t),e.prototype.setOperation=function(t,e){this.processor_&&this.processor_.dispose(),this.processor_=new Mp({operation:t,imageOps:this.operationType_===Np,queue:1,lib:e,threads:this.threads_}),this.changed()},e.prototype.updateFrameSta
 te_=function(t,e,r){var n=T({},this.frameState_);n.viewState=T({},n.viewState);var i=ue(t);n.extent=t.slice(),n.size[0]=Math.round(ge(t)/e),n.size[1]=Math.round(ce(t)/e),n.time=1/0;var o=n.viewState;return o.center=i,o.projection=r,o.resolution=e,n},e.prototype.allSourcesReady_=function(){for(var t=!0,e=0,r=this.layers_.length;e<r;++e)if(this.layers_[e].getSource().getState()!==Pi){t=!1;break}return t},e.prototype.getImage=function(t,e,r,n){if(!this.allSourcesReady_())return null;var i=this.updateFrameState_(t,e,n);if(this.requestedFrameState_=i,this.renderedImageCanvas_){var o=this.renderedImageCanvas_.getResolution(),a=this.renderedImageCanvas_.getExtent();e===o&&$t(t,a)||(this.renderedImageCanvas_=null)}return this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),i.tileQueue.loadMoreTiles(16,16),i.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_},e.prototype.processSources_=function(){for(var t=this.request
 edFrameState_,e=this.layers_.length,r=new Array(e),n=0;n<e;++n){t.layerIndex=n;var i=zp(this.layers_[n],t);if(!i)return;r[n]=i}var o={};this.dispatchEvent(new jp(Fp,t,o)),this.processor_.process(r,o,this.onWorkerComplete_.bind(this,t))},e.prototype.onWorkerComplete_=function(t,e,r,n){if(!e&&r){var i=t.extent,o=t.viewState.resolution;if(o===this.requestedFrameState_.viewState.resolution&&$t(i,this.requestedFrameState_.extent)){var a;if(this.renderedImageCanvas_)a=this.renderedImageCanvas_.getImage().getContext("2d");else a=Bi(Math.round(ge(i)/o),Math.round(ce(i)/o)),this.renderedImageCanvas_=new Wc(i,o,1,a.canvas);a.putImageData(r,0,0),this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new jp(Ap,t,n))}}},e.prototype.getImageInternal=function(){return null},e.prototype.disposeInternal=function(){this.processor_&&this.processor_.dispose(),t.prototype.disposeInternal.call(this)},e}(zc);Gp.prototype.dispose;var Dp=null;function zp(t,e){var r=t.getRenderer();if(!r
 )throw new Error("Unsupported layer type: "+t);if(!r.prepareFrame(e))return null;var n,i=e.size[0],o=e.size[1],a=r.renderFrame(e,null);if(a&&(n=a.firstElementChild),!(n instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+n);if(n.width===i&&n.height===o)return n.getContext("2d").getImageData(0,0,i,o);if(Dp){var s=Dp.canvas;s.width!==i||s.height!==o?Dp=Bi(i,o):Dp.clearRect(0,0,i,o)}else Dp=Bi(i,o);return Dp.drawImage(n,0,0,i,o),Dp.getImageData(0,0,i,o)}function Up(t){var e;return t instanceof Ah?t instanceof Gh?e=new Cp({source:t}):t instanceof zc&&(e=new mp({source:t})):e=t,e}var Bp=Gp,Yp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vp=['Map tiles by <a href="https://stamen.com/
 " target="_blank">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.',ap],Wp={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},qp={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},Xp=function(t){function e(e){var r=e.layer.indexOf("-"),n=-1==r?e.layer:e.layer.slice(0,r),i=qp[n],o=Wp[e.layer],a=void 0!==e.url?e.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+e.layer+"/{z}/{x}/{y}."+o.extension;return t.call(this,{attributions:Vp,cacheSize:e.cacheSize,crossOrigin:"anonym
 ous",imageSmoothing:e.imageSmoothing,maxZoom:null!=e.maxZoom?e.maxZoom:i.maxZoom,minZoom:null!=e.minZoom?e.minZoom:i.minZoom,opaque:o.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:a,wrapX:e.wrapX})||this}return Yp(e,t),e}(Qh),Zp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Kp=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX
 ||n.wrapX,transition:n.transition})||this).params_=n.params||{},r.hidpi_=void 0===n.hidpi||n.hidpi,r.tmpExtent_=[1/0,1/0,-1/0,-1/0],r.setKey(r.getKeyForParams_()),r}return Zp(e,t),e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var r in this.params_)e[t++]=r+"-"+this.params_[r];return e.join("/")},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,r,n,i,o){var a=this.urls;if(a){var s,u=i.getCode().split(":").pop();if(o.SIZE=e[0]+","+e[1],o.BBOX=r.join(","),o.BBOXSR=u,o.IMAGESR=u,o.DPI=Math.round(o.DPI?o.DPI*n:90*n),1==a.length)s=a[0];else s=a[Oe(Lu(t),a.length)];return Uc(s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_?t:1},e.prototype.updateParams=function(t){T(this.params_,t),this.setKey(this.getKeyForParams_())},e.prototype.tileUrlFunction=function(t,e,r){var n=this.getTileGrid();if(n||(n=this.getTileGridForProjec
 tion(r)),!(n.getResolutions().length<=t[0])){1==e||this.hidpi_||(e=1);var i=n.getTileCoordExtent(t,this.tmpExtent_),o=za(n.getTileSize(t[0]),this.tmpSize);1!=e&&(o=Da(o,e,this.tmpSize));var a={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return T(a,this.params_),this.getRequestUrl_(t,o,i,e,r,a)}},e}(Zh),Hp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jp=function(t){function e(e,r,n){var i=t.call(this,e,fa)||this;return i.tileSize_=r,i.text_=n,i.canvas_=null,i}return Hp(e,t),e.prototype.getImage=function(){if(this.canvas_)return this.canvas_;var t=this.tileSize_,e=Bi(t[0],t[1]);return e.strokeStyle="grey",e.strokeRect(.5,.5,t[0]+.5,t[1]+.5),e.fillStyle="grey",e.strokeStyle="white",e.textAlign="center",e.textB
 aseline="middle",e.font="24px sans-serif",e.lineWidth=4,e.strokeText(this.text_,t[0]/2,t[1]/2,t[0]),e.fillText(this.text_,t[0]/2,t[1]/2,t[0]),this.canvas_=e.canvas,e.canvas},e.prototype.load=function(){},e}(dh),$p=function(t){function e(e){var r=e||{};return t.call(this,{opaque:!1,projection:r.projection,tileGrid:r.tileGrid,wrapX:void 0===r.wrapX||r.wrapX,zDirection:r.zDirection})||this}return Hp(e,t),e.prototype.getTile=function(t,e,r){var n=Ru(t,e,r);if(this.tileCache.containsKey(n))return this.tileCache.get(n);var i=za(this.tileGrid.getTileSize(t)),o=[t,e,r],a=this.getTileCoordForTileUrlFunction(o),s=void 0;s=a?"z:"+a[0]+" x:"+a[1]+" y:"+a[2]:"none";var u=new Jp(o,i,s);return this.tileCache.set(n,u),u},e}(Qh),Qp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null=
 ==r?Object.create(r):(n.prototype=r.prototype,new n)}}(),tf=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,imageSmoothing:e.imageSmoothing,projection:yr("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:Ci,tileLoadFunction:e.tileLoadFunction,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition})||this;if(r.tileJSON_=null,r.tileSize_=e.tileSize,e.url)if(e.jsonp)Kh(e.url,r.handleTileJSONResponse.bind(r),r.handleTileJSONError.bind(r));else{var n=new XMLHttpRequest;n.addEventListener("load",r.onXHRLoad_.bind(r)),n.addEventListener("error",r.onXHRError_.bind(r)),n.open("GET",e.url),n.send()}else e.tileJSON?r.handleTileJSONResponse(e.tileJSON):lt(!1,51);return r}return Qp(e,t),e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(
 r)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTileJSON=function(){return this.tileJSON_},e.prototype.handleTileJSONResponse=function(t){var e,r=yr("EPSG:4326"),n=this.getProjection();if(void 0!==t.bounds){var i=Tr(r,n);e=_e(t.bounds,i)}var o=t.minzoom||0,a=t.maxzoom||22,s=ku({extent:Gu(n),maxZoom:a,minZoom:o,tileSize:this.tileSize_});if(this.tileGrid=s,this.tileUrlFunction=zh(t.tiles,s),void 0!==t.attribution&&!this.getAttributions()){var u=void 0!==e?e:r.getExtent();this.setAttributions((function(e){return ye(u,e.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState(Pi)},e.prototype.handleTileJSONError=function(){this.setState(Ri)},e}(Zh),ef=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=n
 ull===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rf=function(t){function e(e){var r=this,n=e||{},i=n.params||{},o=!("TRANSPARENT"in i)||i.TRANSPARENT;return(r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,opaque:!o,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileClass:n.tileClass,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this).gutter_=void 0!==n.gutter?n.gutter:0,r.params_=i,r.v13_=!0,r.serverType_=n.serverType,r.hidpi_=void 0===n.hidpi||n.hidpi,r.tmpExtent_=[1/0,1/0,-1/0,-1/0],r.updateV13_(),r.setKey(r.getKeyForParams_()),r}return ef(e,t),e.prototype.getFeatureInfoUrl=function(t,e,r,n){var i=yr(r),o=this.getProjection(),a=this.getTileGrid();a||(a=this.getTileGridForProjection(i));var s=a.getZForResolution(e,this.zDirection),u=a.getTileCoordForCoordAndZ(t,s);if(!(a.get
 Resolutions().length<=u[0])){var l=a.getResolution(u[0]),h=a.getTileCoordExtent(u,this.tmpExtent_),c=za(a.getTileSize(u[0]),this.tmpSize),p=this.gutter_;0!==p&&(c=Ga(c,p,this.tmpSize),h=zt(h,l*p,h)),o&&o!==i&&(l=wh(o,i,t,l),h=Pr(h,i,o),t=Cr(t,i,o));var f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};T(f,this.params_,n);var d=Math.floor((t[0]-h[0])/l),g=Math.floor((h[3]-t[1])/l);return f[this.v13_?"I":"X"]=d,f[this.v13_?"J":"Y"]=g,this.getRequestUrl_(u,c,h,1,o||i,f)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var r={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var n=this.params_.LAYERS;if(!(!Array.isArray(n)||1===n.length))return;r.LAYER=n}if(void 0!==t){var i=this.getProjection()?this.getProjection().getMetersPerUnit():1;r.SCALE=t*i*39.37*(25.4/.28)}return T(r,e),Uc(this.urls[0],r)}},e.prototype.getGutter=function(){ret
 urn this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,r,n,i,o){var a=this.urls;if(a){if(o.WIDTH=e[0],o.HEIGHT=e[1],o[this.v13_?"CRS":"SRS"]=i.getCode(),"STYLES"in this.params_||(o.STYLES=""),1!=n)switch(this.serverType_){case Qc:var s=90*n+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+s:o.FORMAT_OPTIONS="dpi:"+s;break;case tp:o.MAP_RESOLUTION=90*n;break;case $c:case ep:o.DPI=90*n;break;default:lt(!1,52)}var u,l=i.getAxisOrientation(),h=r;if(this.v13_&&"ne"==l.substr(0,2)){var c=void 0;c=r[0],h[0]=r[1],h[1]=c,c=r[2],h[2]=r[3],h[3]=c}if(o.BBOX=h.join(","),1==a.length)u=a[0];else u=a[Oe(Lu(t),a.length)];return Uc(u,o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var r in this.params_)e[t++]=r+"-"+this.params_[r];return e.join("/")},e.prototype.updateParams=function(t){T(this.params_,t),this.updateV13_(),this.setKey(th
 is.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||"1.3.0";this.v13_=Qe(t,"1.3")>=0},e.prototype.tileUrlFunction=function(t,e,r){var n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(r)),!(n.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var i=n.getResolution(t[0]),o=n.getTileCoordExtent(t,this.tmpExtent_),a=za(n.getTileSize(t[0]),this.tmpSize),s=this.gutter_;0!==s&&(a=Ga(a,s,this.tmpSize),o=zt(o,i*s,o)),1!=e&&(a=Da(a,e,this.tmpSize));var u={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return T(u,this.params_),this.getRequestUrl_(t,a,o,e,r,u)}},e}(Zh),nf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype
 ,new n)}}(),of=function(t){function e(e,r,n,i,o,a){var s=t.call(this,e,r)||this;return s.src_=n,s.extent_=i,s.preemptive_=o,s.grid_=null,s.keys_=null,s.data_=null,s.jsonp_=a,s}return nf(e,t),e.prototype.getImage=function(){return null},e.prototype.getData=function(t){if(!this.grid_||!this.keys_)return null;var e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),r=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),n=this.grid_[Math.floor((1-r)*this.grid_.length)];if("string"!=typeof n)return null;var i=n.charCodeAt(Math.floor(e*n.length));i>=93&&i--,i>=35&&i--;var o=null;if((i-=32)in this.keys_){var a=this.keys_[i];o=this.data_&&a in this.data_?this.data_[a]:a}return o},e.prototype.forDataAtCoordinate=function(t,e,r){this.state==ga&&!0===r?(this.state=ca,q(this,I,(function(r){e(this.getData(t))}),this),this.loadInternal_()):!0===r?setTimeout(function(){e(this.getData(t))}.bind(this),0):e(this.getData(t))},e.prototype.getKey=function(){return this.src_},e.prototype.handle
 Error_=function(){this.state=da,this.changed()},e.prototype.handleLoad_=function(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=fa,this.changed()},e.prototype.loadInternal_=function(){if(this.state==ca)if(this.state=pa,this.jsonp_)Kh(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}},e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleError_()}this.handleLoad_(r)}else this.handleError_()},e.prototype.onXHRError_=function(t){this.handleError_()},e.prototype.load=function(){this.preemptive_?this.loadInternal_():this.setState(ga)},e}(dh),af=function(t){function e(e){var r=t.call(this,{projection:yr("EPSG:3857"),state:Ci})||this;if(r.preemptive_=void 0===e.pree
 mptive||e.preemptive,r.tileUrlFunction_=Bh,r.template_=void 0,r.jsonp_=e.jsonp||!1,e.url)if(r.jsonp_)Kh(e.url,r.handleTileJSONResponse.bind(r),r.handleTileJSONError.bind(r));else{var n=new XMLHttpRequest;n.addEventListener("load",r.onXHRLoad_.bind(r)),n.addEventListener("error",r.onXHRError_.bind(r)),n.open("GET",e.url),n.send()}else e.tileJSON?r.handleTileJSONResponse(e.tileJSON):lt(!1,51);return r}return nf(e,t),e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(r)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTemplate=function(){return this.template_},e.prototype.forDataAtCoordinateAndResolution=function(t,e,r,n){if(this.tileGrid){var i=this.tileGrid.getZForResolution(e,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,i);this.getTile(o[0],o[1]
 ,o[2],1,this.getProjection()).forDataAtCoordinate(t,r,n)}else!0===n?setTimeout((function(){r(null)}),0):r(null)},e.prototype.handleTileJSONError=function(){this.setState(Ri)},e.prototype.handleTileJSONResponse=function(t){var e,r=yr("EPSG:4326"),n=this.getProjection();if(void 0!==t.bounds){var i=Tr(r,n);e=_e(t.bounds,i)}var o=t.minzoom||0,a=t.maxzoom||22,s=ku({extent:Gu(n),maxZoom:a,minZoom:o});this.tileGrid=s,this.template_=t.template;var u=t.grids;if(u){if(this.tileUrlFunction_=zh(u,s),void 0!==t.attribution){var l=void 0!==e?e:r.getExtent();this.setAttributions((function(e){return ye(l,e.extent)?[t.attribution]:null}))}this.setState(Pi)}else this.setState(Ri)},e.prototype.getTile=function(t,e,r,n,i){var o=Ru(t,e,r);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var a=[t,e,r],s=this.getTileCoordForTileUrlFunction(a,i),u=this.tileUrlFunction_(s,n,i),l=new of(a,void 0!==u?ca:ga,void 0!==u?u:"",this.tileGrid.getTileCoordExtent(a),this.preemptive_,this.jsonp_);return th
 is.tileCache.set(o,l),l},e.prototype.useTile=function(t,e,r){var n=Ru(t,e,r);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(Gh),sf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),uf=function(t){function e(e,r,n,i,o,a){var s=t.call(this,e,r,a)||this;return s.extent=null,s.format_=i,s.features_=null,s.loader_,s.projection=null,s.resolution,s.tileLoadFunction_=o,s.url_=n,s}return sf(e,t),e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.getKey=function(){return this.url_},e.prototype.load=function(){this.state==ca&&(this.setState(pa),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,t
 his.projection))},e.prototype.onLoad=function(t,e){this.setFeatures(t)},e.prototype.onError=function(){this.setState(da)},e.prototype.setFeatures=function(t){this.features_=t,this.setState(fa)},e.prototype.setLoader=function(t){this.loader_=t},e}(dh),lf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hf=[],cf=function(t){function e(e,r,n,i){var o=t.call(this,e,r,{transition:0})||this;return o.context_={},o.executorGroups={},o.loadingSourceTiles=0,o.errorSourceTileKeys={},o.hitDetectionImageData={},o.replayState_={},o.sourceTiles=null,o.wantedResolution,o.getSourceTiles=i.bind(void 0,o),o.sourceZ=-1,o.hifi=!1,o.wrappedTileCoord=n,o}return lf(e,t),e.prototype.getContext=function(t){var e=o(t);return e in this
 .context_||(this.context_[e]=Bi(1,1,hf)),this.context_[e]},e.prototype.hasContext=function(t){return o(t)in this.context_},e.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},e.prototype.getReplayState=function(t){var e=o(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedZ:-1,renderedTileZ:-1}),this.replayState_[e]},e.prototype.load=function(){this.getSourceTiles()},e.prototype.release=function(){for(var e in this.context_)hf.push(this.context_[e].canvas);t.prototype.release.call(this)},e}(dh),pf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.proto
 type,new n)}}(),ff=function(t){function e(e){var r=this,n=e.projection||"EPSG:3857",i=e.extent||Gu(n),o=e.tileGrid||ku({extent:i,maxResolution:e.maxResolution,maxZoom:void 0!==e.maxZoom?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});return(r=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,opaque:!1,projection:n,state:e.state,tileGrid:o,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:df,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:void 0===e.zDirection?1:e.zDirection})||this).format_=e.format?e.format:null,r.loadingTiles_={},r.sourceTileCache=new Rh(r.tileCache.highWaterMark),r.overlaps_=null==e.overlaps||e.overlaps,r.tileClass=e.tileClass?e.tileClass:uf,r.tileGrids_={},r}return pf(e,t),e.prototype.getFeaturesInExtent=function(t){var e=[],r=this.tileCache;if(0===r.getCount())return e;var n=Iu(r.peekFirstKey())[0],i=this.tileG
 rid;return r.forEach((function(r){if(r.tileCoord[0]===n&&r.getState()===fa)for(var o=r.getSourceTiles(),a=0,s=o.length;a<s;++a){var u=o[a],l=u.tileCoord;if(ye(t,i.getTileCoordExtent(l))){var h=u.getFeatures();if(h)for(var c=0,p=h.length;c<p;++c){var f=h[c],d=f.getGeometry();ye(t,d.getExtent())&&e.push(f)}}}})),e},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},e.prototype.expireCache=function(e,r){t.prototype.expireCache.call(this,e,r),this.sourceTileCache.expireCache({})},e.prototype.getSourceTiles=function(t,e,r){var n=r.wrappedTileCoord,i=this.getTileGridForProjection(e),o=i.getTileCoordExtent(n),a=n[0],s=i.getResolution(a);zt(o,-s,o);var u=this.tileGrid,l=u.getExtent();l&&pe(o,l,o);var h,c,p,f=u.getZForResolution(s,1),d=u.getMinZoom(),g=r.sourceTiles;if(g&&g.length>0&&g[0].tileCoord[0]===f)h=g,c=!0,p=f;else{h=[],p=f+1;do{--p,c=!0,u.forEachTileCoord(o,p,function(n){var i,o=this.tileUrlFunc
 tion(n,t,e);if(void 0!==o)if(this.sourceTileCache.containsKey(o)){var a=(i=this.sourceTileCache.get(o)).getState();if(a===fa||a===da||a===ga)return void h.push(i)}else p===f&&((i=new this.tileClass(n,ca,o,this.format_,this.tileLoadFunction)).extent=u.getTileCoordExtent(n),i.projection=e,i.resolution=u.getResolution(n[0]),this.sourceTileCache.set(o,i),i.addEventListener(I,this.handleTileChange.bind(this)),i.load());c=c&&i&&i.getState()===fa,i&&i.getState()!==ga&&r.getState()===ca&&(r.loadingSourceTiles++,i.addEventListener(I,(function t(){var e=i.getState(),n=i.getKey();if(e===fa||e===da){e===fa?(i.removeEventListener(I,t),r.loadingSourceTiles--,delete r.errorSourceTileKeys[n]):e===da&&(r.errorSourceTileKeys[n]=!0);var o=Object.keys(r.errorSourceTileKeys).length;r.loadingSourceTiles-o==0&&(r.hifi=0===o,r.sourceZ=f,r.setState(fa))}})))}.bind(this)),c||(h.length=0)}while(!c&&p>d)}return r.getState()===ca&&r.setState(pa),c&&(r.hifi=f===p,r.sourceZ=p,r.getState()<fa?r.setState(fa):g&&_(h
 ,g)||(r.sourceTiles=h)),h},e.prototype.getTile=function(t,e,r,n,i){var o,a=Ru(t,e,r),s=this.getKey();if(this.tileCache.containsKey(a)&&(o=this.tileCache.get(a)).key===s)return o;var u=[t,e,r],l=this.getTileCoordForTileUrlFunction(u,i),h=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(i);if(l&&h){var p=c.getTileCoordExtent(l);zt(p,-c.getResolution(t),p),ye(h,p)||(l=null)}var f=!0;if(null!==l){var d=this.tileGrid,g=c.getResolution(t),y=d.getZForResolution(g,1),m=c.getTileCoordExtent(l);zt(m,-g,m),d.forEachTileCoord(m,y,function(t){f=f&&!this.tileUrlFunction(t,n,i)}.bind(this))}var v=new cf(u,f?ga:ca,l,this.getSourceTiles.bind(this,n,i));return v.key=s,o?(v.interimTile=o,v.refreshInterimChain(),this.tileCache.replace(a,v)):this.tileCache.set(a,v),v},e.prototype.getTileGridForProjection=function(t){var e=t.getCode(),r=this.tileGrids_[e];if(!r){var n=this.tileGrid;r=ju(t,void 0,n?n.getTileSize(n.getMinZoom()):void 0),this.tileGrids_[e]=r}return r},e.prototype.getTilePixelR
 atio=function(t){return t},e.prototype.getTilePixelSize=function(t,e,r){var n=za(this.getTileGridForProjection(r).getTileSize(t),this.tmpSize);return[Math.round(n[0]*e),Math.round(n[1]*e)]},e.prototype.updateCacheSize=function(e,r){t.prototype.updateCacheSize.call(this,2*e,r)},e}(Wh);function df(t,e){var r=xu(e,t.getFormat(),t.onLoad.bind(t),t.onError.bind(t));t.setLoader(r)}var gf="KVP",yf="REST",mf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),vf=function(t){function e(e){var r=this,n=void 0!==e.requestEncoding?e.requestEncoding:gf,i=e.tileGrid,o=e.urls;return void 0===o&&void 0!==e.url&&(o=Yh(e.url)),(r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,imageSmooth
 ing:e.imageSmoothing,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileClass:e.tileClass,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,urls:o,wrapX:void 0!==e.wrapX&&e.wrapX,transition:e.transition})||this).version_=void 0!==e.version?e.version:"1.0.0",r.format_=void 0!==e.format?e.format:"image/jpeg",r.dimensions_=void 0!==e.dimensions?e.dimensions:{},r.layer_=e.layer,r.matrixSet_=e.matrixSet,r.style_=e.style,r.requestEncoding_=n,r.setKey(r.getKeyForDimensions_()),o&&o.length>0&&(r.tileUrlFunction=Uh(o.map(r.createFromWMTSTemplate.bind(r)))),r}return mf(e,t),e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.setTileUrlFunction(Uh(t.map(this.createFromWMTSTemplate.bind(this))),e)},e.prototype.getDimensions=function(){return this.dimensions_},e.prototype.getFormat=function(){return this.format_},e.prototype.getLayer=function(){return this.layer_},e.prototype.getMatrixSet=function(){return this.matrixS
 et_},e.prototype.getRequestEncoding=function(){return this.requestEncoding_},e.prototype.getStyle=function(){return this.style_},e.prototype.getVersion=function(){return this.version_},e.prototype.getKeyForDimensions_=function(){var t=0,e=[];for(var r in this.dimensions_)e[t++]=r+"-"+this.dimensions_[r];return e.join("/")},e.prototype.updateDimensions=function(t){T(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())},e.prototype.createFromWMTSTemplate=function(t){var e=this.requestEncoding_,r={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};e==gf&&T(r,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=e==gf?Uc(t,r):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in r?r[e.toLowerCase()]:t}));var n=this.tileGrid,i=this.dimensions_;return function(r,o,a){if(r){var s={TileMatrix:n.getMatrixId(r[0]),TileCol:r[1],TileRow:r[2]};T(s,i);var u=t;return u=e==gf?Uc(u,s):u.replace(/\{(\w+?)\}/g,(function(t,e){return s[e]}))}}}
 ,e}(Zh);var _f=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bf="renderOrder",xf=function(t){function e(e){var r=this,n=e||{},i=T({},n);return delete i.style,delete i.renderBuffer,delete i.updateWhileAnimating,delete i.updateWhileInteracting,(r=t.call(this,i)||this).declutter_=void 0!==n.declutter&&n.declutter,r.renderBuffer_=void 0!==n.renderBuffer?n.renderBuffer:100,r.style_=null,r.styleFunction_=void 0,r.setStyle(n.style),r.updateWhileAnimating_=void 0!==n.updateWhileAnimating&&n.updateWhileAnimating,r.updateWhileInteracting_=void 0!==n.updateWhileInteracting&&n.updateWhileInteracting,r}return _f(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return
  t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(bf)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.setRenderOrder=function(t){this.set(bf,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:ah,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var r;if(Array.isArray(t))r=t;else lt("function"==typeof t.getZIndex,41),r=[t];e=function(){return r}}return e}(this.style_),this.changed()},e}(Li),wf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,
 r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sf="GENERATE_BUFFERS",Tf=function(t){function e(e,r){var n=t.call(this,e)||this,i=r||{};return n.helper=new Rl({postProcesses:i.postProcesses,uniforms:i.uniforms}),n}return wf(e,t),e.prototype.disposeInternal=function(){this.helper.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getShaderCompileErrors=function(){return this.helper.getShaderCompileErrors()},e}(cp);var Ef=Tf,Cf=new Blob(['var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.l
 ength=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};'],{type:"application/javascript"}),Pf=URL.createObjectURL(Cf);var Rf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnPro
 perty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Of=function(t){function e(e,r){var n=this,i=r.uniforms||{},a=[1,0,0,1,0,0];i[_l]=a,(n=t.call(this,e,{uniforms:i,postProcesses:r.postProcesses})||this).sourceRevision_=-1,n.verticesBuffer_=new fl(34962,35048),n.hitVerticesBuffer_=new fl(34962,35048),n.indicesBuffer_=new fl(34963,35048),n.program_=n.helper.getProgram(r.fragmentShader,r.vertexShader),n.hitDetectionEnabled_=!(!r.hitFragmentShader||!r.hitVertexShader),n.hitProgram_=n.hitDetectionEnabled_&&n.helper.getProgram(r.hitFragmentShader,r.hitVertexShader);var s=r.attributes?r.attributes.map((function(t){return{name:"a_"+t.name,size:1,type:El.FLOAT}})):[];n.attributes=[{name:"a_position",size:2,type:El.FLOAT},{name:"a_index",size:1,type:El.FLOAT}].concat(s),n.hitDetectionAttributes=[{name:"a_position",size:2,type:El.FLOAT},{name:"a_index",size:1,type:El.FLOAT},{name:"a_
 hitColor",size:4,type:El.FLOAT},{name:"a_featureUid",size:1,type:El.FLOAT}].concat(s),n.customAttributes=r.attributes?r.attributes:[],n.previousExtent_=[1/0,1/0,-1/0,-1/0],n.currentTransform_=a,n.renderTransform_=[1,0,0,1,0,0],n.invertRenderTransform_=[1,0,0,1,0,0],n.renderInstructions_=new Float32Array(0),n.hitRenderInstructions_=new Float32Array(0),n.hitRenderTarget_=n.hitDetectionEnabled_&&new Il(n.helper),n.worker_=new Worker(Pf),n.worker_.addEventListener("message",function(t){var e=t.data;if(e.type===Sf){var r=e.projectionTransform;e.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=r,Pt(this.invertRenderTransform_,this.renderTransform_),e.hitDetection?this.hitRenderInstructions_=n
 ew Float32Array(t.data.renderInstructions):this.renderInstructions_=new Float32Array(t.data.renderInstructions),this.getLayer().changed()}}.bind(n)),n.featureCache_={},n.featureCount_=0;var u=n.getLayer().getSource();return n.sourceListenKeys_=[W(u,oc,n.handleSourceFeatureAdded_,n),W(u,ac,n.handleSourceFeatureChanged_,n),W(u,uc,n.handleSourceFeatureDelete_,n),W(u,sc,n.handleSourceFeatureClear_,n)],u.forEachFeature(function(t){this.featureCache_[o(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}.bind(n)),n}return Rf(e,t),e.prototype.handleSourceFeatureAdded_=function(t){var e=t.feature;this.featureCache_[o(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var e=t.feature;this.featureCache_[o(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var e=t.feature;delete this.featureCac
 he_[o(e)],this.featureCount_--},e.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e),this.helper.finalizeDraw(t);var r=this.helper.getCanvas(),n=t.layerStatesArray[t.layerIndex].opacity;return n!==parseFloat(r.style.opacity)&&(r.style.opacity=String(n)),this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),r},e.prototype.prepareFrame=function(t){var e=this.getLayer(),r=e.getSource(),n=t.viewState,i=!t.viewHints[va]&&!t.viewHints[_a],o=!$t(this.previousExtent_,t.extent),a=this.sourceRevision_<r.getRevision();if(a&&(this.sourceRevision_=r.getRevision()),i&&(o||a)){var s=n.projection,u=n.resolution,l=e instanceof xf?e.getRenderBuffer():0,h=zt(t.extent,l*u);r.loadFeatures(h,u,s),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_
 ),wt(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},e.prototype.rebuildBuffers_=function(t){var e=[1,0,0,1,0,0];this.helper.makeProjectionTransform(t,e);var r,n,i=(2+this.customAttributes.length)*this.featureCount_;if(this.renderInstructions_&&this.renderInstructions_.length===i||(this.renderInstructions_=new Float32Array(i)),this.hitDetectionEnabled_){var o=(7+this.customAttributes.length)*this.featureCount_;this.hitRenderInstructions_&&this.hitRenderInstructions_.length===o||(this.hitRenderInstructions_=new Float32Array(o))}var a,s,u,l=[],h=[],c=0,p=0;for(var f in this.featureCache_)if((n=(r=this.featureCache_[f]).geometry)&&n.getType()===yt.POINT){l[0]=n.getFlatCoordinates()[0],l[1]=n.getFlatCoordinates()[1],Tt(e,l),s=p+6,u=void 0,(u=h||[])[0]=Math.floor(s/256/256/256)/255,u
 [1]=Math.floor(s/256/256)%256/255,u[2]=Math.floor(s/256)%256/255,u[3]=s%256/255,a=u,this.renderInstructions_[c++]=l[0],this.renderInstructions_[c++]=l[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[p++]=l[0],this.hitRenderInstructions_[p++]=l[1],this.hitRenderInstructions_[p++]=a[0],this.hitRenderInstructions_[p++]=a[1],this.hitRenderInstructions_[p++]=a[2],this.hitRenderInstructions_[p++]=a[3],this.hitRenderInstructions_[p++]=Number(f));for(var d=void 0,g=0;g<this.customAttributes.length;g++)d=this.customAttributes[g].callback(r.feature,r.properties),this.renderInstructions_[c++]=d,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[p++]=d)}var y={type:Sf,renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(y.projectionTransform=e,this.worker_.postMessage(y,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var m={type:Sf,renderInstructions:this.hitRenderInstructions_.buffe
 r,customAttributesCount:5+this.customAttributes.length};m.projectionTransform=e,m.hitDetection=!0,this.worker_.postMessage(m,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i){if(lt(this.hitDetectionEnabled_,66),this.hitRenderInstructions_){var o=Tt(e.coordinateToPixelTransform,t.slice()),a=this.hitRenderTarget_.readPixel(o[0]/2,o[1]/2),s=function(t){var e=0;return e+=Math.round(256*t[0]*256*256*255),e+=Math.round(256*t[1]*256*255),e+=Math.round(256*t[2]*255),e+=Math.round(255*t[3])}([a[0]/255,a[1]/255,a[2]/255,a[3]/255]),u=this.hitRenderInstructions_[s],l=Math.floor(u).toString(),h=this.getLayer().getSource().getFeatureByUid(l);return h?n(h,this.getLayer()):void 0}},e.prototype.renderHitDetection=function(t){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget
 (t,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e)}},e.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach((function(t){X(t)})),this.sourceListenKeys_=null,t.prototype.disposeInternal.call(this)},e}(Ef),If={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Lf=[If.FILL],Mf=[If.STROKE],Ff=[If.BEGIN_PATH],Af=[If.CLOSE_PATH],kf=If,Nf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.crea
 te(r):(n.prototype=r.prototype,new n)}}(),jf=function(t){function e(e,r,n,i){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=r,o.pixelRatio=i,o.maxLineWidth=0,o.resolution=n,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return Nf(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatCoordinates=function(t,e,r,n,i,o){var a=this.coordinates.length,s=this.getBufferedMaxExtent();o&&(e+=n);var u,l,h,c=t[e],p=t[e+1],f=this.tmpCoordinate_,d=!0;for(u=e+n;u<r;u+=n)f[0]=t[u],f[1]=t[u+1],(h=qt(s,f))!==l?(d&&(this.coordinates[a++]=c,this.coordinates[a++]=p),this.coordinates[a++]=f[0],this.coordinates[a++]=f[1],d=!1):h===At?(this.coordinates[a++]=f[0],this.coordinates[a++]=f[1],d=!1):d=!0,c=f[0],p=f[1],l=h;return(i&&d||u===e+n)&&(this.coordinates[a++]=c,this.co
 ordinates[a++]=p),a},e.prototype.drawCustomCoordinates_=function(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){var s=r[o],u=this.appendFlatCoordinates(t,e,s,n,!1,!1);i.push(u),e=s}return e},e.prototype.drawCustom=function(t,e,r){this.beginGeometry(t,e);var n,i,o,a,s,u=t.getType(),l=t.getStride(),h=this.coordinates.length;if(u==yt.MULTI_POLYGON){n=t.getOrientedFlatCoordinates(),a=[];var c=t.getEndss();s=0;for(var p=0,f=c.length;p<f;++p){var d=[];s=this.drawCustomCoordinates_(n,s,c[p],l,d),a.push(d)}this.instructions.push([kf.CUSTOM,h,a,t,r,ln])}else u==yt.POLYGON||u==yt.MULTI_LINE_STRING?(o=[],n=u==yt.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),s=this.drawCustomCoordinates_(n,0,t.getEnds(),l,o),this.instructions.push([kf.CUSTOM,h,o,t,r,un])):u==yt.LINE_STRING||u==yt.MULTI_POINT?(n=t.getFlatCoordinates(),i=this.appendFlatCoordinates(n,0,n.length,l,!1,!1),this.instructions.push([kf.CUSTOM,h,i,t,r,sn])):u==yt.POINT&&(n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1
 ]),i=this.coordinates.length,this.instructions.push([kf.CUSTOM,h,i,t,r]));this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){var r=t.getExtent();this.beginGeometryInstruction1_=[kf.BEGIN_GEOMETRY,e,0,r],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[kf.BEGIN_GEOMETRY,e,0,r],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var r,n,i=e.length,o=-1;for(t=0;t<i;++t)(n=(r=e[t])[0])==kf.END_GEOMETRY?o=t:n==kf.BEGIN_GEOMETRY&&(r[2]=t,y(this.hitDetectionInstructions,o,t),o=-1)},e.prototype.setFillStrokeStyle=function(t,e){var r=this.state;if(t){var n=t.getColor();r.fillStyle=Fi(n||"#000")}else r.fillStyle=void 0;if(e){var i=e.getColor();r.strokeStyle=Fi(i||"#000");v
 ar o=e.getLineCap();r.lineCap=void 0!==o?o:"round";var a=e.getLineDash();r.lineDash=a?a.slice():Ji;var s=e.getLineDashOffset();r.lineDashOffset=s||0;var u=e.getLineJoin();r.lineJoin=void 0!==u?u:"round";var l=e.getWidth();r.lineWidth=void 0!==l?l:1;var h=e.getMiterLimit();r.miterLimit=void 0!==h?h:10,r.lineWidth>this.maxLineWidth&&(this.maxLineWidth=r.lineWidth,this.bufferedMaxExtent_=null)}else r.strokeStyle=void 0,r.lineCap=void 0,r.lineDash=null,r.lineDashOffset=void 0,r.lineJoin=void 0,r.lineWidth=void 0,r.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,r=[kf.SET_FILL_STYLE,e];return"string"!=typeof e&&r.push(!0),r},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[kf.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var r=t.fillS
 tyle;"string"==typeof r&&t.currentFillStyle==r||(void 0!==r&&this.instructions.push(e.call(this,t)),t.currentFillStyle=r)},e.prototype.updateStrokeStyle=function(t,e){var r=t.strokeStyle,n=t.lineCap,i=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,s=t.lineWidth,u=t.miterLimit;(t.currentStrokeStyle!=r||t.currentLineCap!=n||i!=t.currentLineDash&&!_(t.currentLineDash,i)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=s||t.currentMiterLimit!=u)&&(void 0!==r&&e.call(this,t),t.currentStrokeStyle=r,t.currentLineCap=n,t.currentLineDash=i,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=s,t.currentMiterLimit=u)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[kf.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBuf
 feredMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Ut(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;zt(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(Mi),Gf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Df=function(t){function e(e,r,n,i){var o=t.call(this,e,r,n,i)||this;return o.declutterGroups_=null,o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o}return Gf(e,t),e.prototype.drawCoordinates_=function(t,
 e,r,n){return this.appendFlatCoordinates(t,e,r,n,!1,!1)},e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var r=t.getFlatCoordinates(),n=t.getStride(),i=this.coordinates.length,o=this.drawCoordinates_(r,0,r.length,n);this.instructions.push([kf.DRAW_IMAGE,i,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.hitDetectionInstructions.push([kf.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){th
 is.beginGeometry(t,e);var r=t.getFlatCoordinates(),n=t.getStride(),i=this.coordinates.length,o=this.drawCoordinates_(r,0,r.length,n);this.instructions.push([kf.DRAW_IMAGE,i,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.hitDetectionInstructions.push([kf.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.i
 magePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var r=t.getAnchor(),n=t.getSize(),i=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),a=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=r[0],this.anchorY_=r[1],this.declutterGroups_=e,this.hitDetectionImage_=i,this.image_=o,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0]},e}(jf),zf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e
 ,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Uf=function(t){function e(e,r,n,i){return t.call(this,e,r,n,i)||this}return zf(e,t),e.prototype.drawFlatCoordinates_=function(t,e,r,n){var i=this.coordinates.length,o=this.appendFlatCoordinates(t,e,r,n,!1,!1),a=[kf.MOVE_TO_LINE_TO,i,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),r},e.prototype.drawLineString=function(t,e){var r=this.state,n=r.strokeStyle,i=r.lineWidth;if(void 0!==n&&void 0!==i){this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([kf.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset],Ff);var o=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(Mf),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var r=this.state,n=r.strokeStyle,i=r.lineWidth;if(void 0!==n&&void 0!==i){this.updat
 eStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([kf.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset],Ff);for(var o=t.getEnds(),a=t.getFlatCoordinates(),s=t.getStride(),u=0,l=0,h=o.length;l<h;++l)u=this.drawFlatCoordinates_(a,u,o[l],s);this.hitDetectionInstructions.push(Mf),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(Mf),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Mf),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(Ff)},e}(jf),Bf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}
 ||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Yf=function(t){function e(e,r,n,i){return t.call(this,e,r,n,i)||this}return Bf(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,r,n){var i=this.state,o=void 0!==i.fillStyle,a=void 0!==i.strokeStyle,s=r.length;this.instructions.push(Ff),this.hitDetectionInstructions.push(Ff);for(var u=0;u<s;++u){var l=r[u],h=this.coordinates.length,c=this.appendFlatCoordinates(t,e,l,n,!0,!a),p=[kf.MOVE_TO_LINE_TO,h,c];this.instructions.push(p),this.hitDetectionInstructions.push(p),a&&(this.instructions.push(Af),this.hitDetectionInstructions.push(Af)),e=l}return o&&(this.instructions.push(Lf),this.hitDetectionInstructions.push(Lf)),a&&(this.instructions.push(Mf),this.hitDetectionInstructions.push(Mf)),e},e.prototype.drawCircle=function(t,e){var r=this.state,n=r.fillStyle,i=r.strokeStyle;if(void 0
 !==n||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([kf.SET_FILL_STYLE,"#000"]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([kf.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);var o=t.getFlatCoordinates(),a=t.getStride(),s=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,a,!1,!1);var u=[kf.CIRCLE,s];this.instructions.push(Ff,u),this.hitDetectionInstructions.push(Ff,u),void 0!==r.fillStyle&&(this.instructions.push(Lf),this.hitDetectionInstructions.push(Lf)),void 0!==r.strokeStyle&&(this.instructions.push(Mf),this.hitDetectionInstructions.push(Mf)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var r=this.state,n=r.fillStyle,i=r.strokeStyle;if(void 0!==n||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([kf.SET_FILL_STYLE,"#000"]),void 0!==
 r.strokeStyle&&this.hitDetectionInstructions.push([kf.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);var o=t.getEnds(),a=t.getOrientedFlatCoordinates(),s=t.getStride();this.drawFlatCoordinatess_(a,0,o,s),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var r=this.state,n=r.fillStyle,i=r.strokeStyle;if(void 0!==n||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([kf.SET_FILL_STYLE,"#000"]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([kf.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);for(var o=t.getEndss(),a=t.getOrientedFlatCoordinates(),s=t.getStride(),u=0,l=0,h=o.length;l<h;++l)u=this.drawFlatCoordinatess_(a,u,o[l],s);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var r=
 this.coordinates,n=0,i=r.length;n<i;++n)r[n]=nn(r[n],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(jf);function Vf(t,e,r,n,i){var o,a,s,u,l,h,c,p,f,d=r,g=r,y=0,m=0,v=r;for(o=r;o<n;o+=i){var _=e[o],b=e[o+1];void 0!==u&&(p=_-u,f=b-l,s=Math.sqrt(p*p+f*f),void 0!==h&&(m+=a,Math.acos((h*p+c*f)/(a*s))>t&&(m>y&&(y=m,d=v,g=o),m=0,v=o-i)),a=s,h=p,c=f),u=_,l=b}return(m+=s)>y?[v,o]:[d,g]}var Wf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qf={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideograp
 hic:.8,bottom:1},Xf={Circle:Yf,Default:jf,Image:Df,LineString:Uf,Polygon:Yf,Text:function(t){function e(e,r,n,i){var o=t.call(this,e,r,n,i)||this;return o.declutterGroups_,o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o}return Wf(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var r=this.textFillState_,n=this.textStrokeState_,i=this.textState_;if(""!==this.text_&&i&&(r||n)){var o,a,s=this.coordinates.length,u=t.getType(),l=null,h=2,c=t.getStride();if(i.placement===ch){if(!ye(this.getBufferedMaxExtent(),t.getExtent()))return;var p=void 0;if(l=t.getFlatCoordinates(),u==yt.LINE_STRING)p=[l.length];else if(u==yt.MULTI
 _LINE_STRING)p=t.getEnds();else if(u==yt.POLYGON)p=t.getEnds().slice(0,1);else if(u==yt.MULTI_POLYGON){var f=t.getEndss();for(p=[],o=0,a=f.length;o<a;++o)p.push(f[o][0])}this.beginGeometry(t,e);for(var d=i.textAlign,g=0,y=void 0,m=0,v=p.length;m<v;++m){if(null==d){var _=Vf(i.maxAngle,l,g,p[m],c);g=_[0],y=_[1]}else y=p[m];for(o=g;o<y;o+=c)this.coordinates.push(l[o],l[o+1]);h=this.coordinates.length,g=p[m];var b=this.declutterGroups_?0===m?this.declutterGroups_[0]:[].concat(this.declutterGroups_[0]):null;this.drawChars_(s,h,b),s=h}this.endGeometry(e)}else{var x=null;switch(i.overflow||(x=[]),u){case yt.POINT:case yt.MULTI_POINT:h=(l=t.getFlatCoordinates()).length;break;case yt.LINE_STRING:l=t.getFlatMidpoint();break;case yt.CIRCLE:l=t.getCenter();break;case yt.MULTI_LINE_STRING:c=2,h=(l=t.getFlatMidpoints()).length;break;case yt.POLYGON:l=t.getFlatInteriorPoint(),i.overflow||x.push(l[2]/this.resolution),c=3;break;case yt.MULTI_POLYGON:var w=t.getFlatInteriorPoints();for(l=[],o=0,a=w.l
 ength;o<a;o+=3)i.overflow||x.push(w[o+2]/this.resolution),l.push(w[o],w[o+1]);if(c=2,0==(h=l.length))return}h=this.appendFlatCoordinates(l,0,h,c,!1,!1),this.saveTextStates_(),(i.backgroundFill||i.backgroundStroke)&&(this.setFillStrokeStyle(i.backgroundFill,i.backgroundStroke),i.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),i.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var S=i.padding;if(S!=$i&&(i.scale[0]<0||i.scale[1]<0)){var T=i.padding[0],E=i.padding[1],C=i.padding[2],P=i.padding[3];i.scale[0]<0&&(E=-E,P=-P),i.scale[1]<0&&(T=-T,C=-C),S=[T,E,C,P]}var R=this.pixelRatio;this.instructions.push([kf.DRAW_IMAGE,s,h,null,NaN,NaN,this.declutterGroups_,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,S==$i?$i:S.map((function(t){return t*R})),!!i.backgroundFill,!!i.background
 Stroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,x]);var O=1/R;this.hitDetectionInstructions.push([kf.DRAW_IMAGE,s,h,null,NaN,NaN,this.declutterGroups_,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[O,O],NaN,S,!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,x]),this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,r=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var i=this.textKey_;i in this.textStates||(this.textStates[i]={font:e.font,textAlign:e.textAlign||"center",textBaseline:e.textBaseline||"middle",scale:e.scale});var o=this.fillKey_;r&&(o in this.fillStates||(this.fillStates[o]={fil
 lStyle:r.fillStyle}))},e.prototype.drawChars_=function(t,e,r){var n=this.textStrokeState_,i=this.textState_,o=this.strokeKey_,a=this.textKey_,s=this.fillKey_;this.saveTextStates_();var u=this.pixelRatio,l=qf[i.textBaseline],h=this.textOffsetY_*u,c=this.text_,p=n?n.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([kf.DRAW_CHARS,t,e,l,r,i.overflow,s,i.maxAngle,u,h,o,p*u,c,a,1]),this.hitDetectionInstructions.push([kf.DRAW_CHARS,t,e,l,r,i.overflow,s,i.maxAngle,1,h,o,p,c,a,1/u])},e.prototype.setTextStyle=function(t,e){var r,n,i;if(t){this.declutterGroups_=e;var a=t.getFill();a?((n=this.textFillState_)||(n={},this.textFillState_=n),n.fillStyle=Fi(a.getColor()||"#000")):(n=null,this.textFillState_=n);var s=t.getStroke();if(s){(i=this.textStrokeState_)||(i={},this.textStrokeState_=i);var u=s.getLineDash(),l=s.getLineDashOffset(),h=s.getWidth(),c=s.getMiterLimit();i.lineCap=s.getLineCap()||"round",i.lineDash=u?u.slice():Ji,i.lineDashOffset=void 0===l?0:l,i.lineJoin=s.getLineJoin()||
 "round",i.lineWidth=void 0===h?1:h,i.miterLimit=void 0===c?10:c,i.strokeStyle=Fi(s.getColor()||"#000")}else i=null,this.textStrokeState_=i;r=this.textState_;var p=t.getFont()||"10px sans-serif";ao(p);var f=t.getScaleArray();r.overflow=t.getOverflow(),r.font=p,r.maxAngle=t.getMaxAngle(),r.placement=t.getPlacement(),r.textAlign=t.getTextAlign(),r.textBaseline=t.getTextBaseline()||"middle",r.backgroundFill=t.getBackgroundFill(),r.backgroundStroke=t.getBackgroundStroke(),r.padding=t.getPadding()||$i,r.scale=void 0===f?[1,1]:f;var d=t.getOffsetX(),g=t.getOffsetY(),y=t.getRotateWithView(),m=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===d?0:d,this.textOffsetY_=void 0===g?0:g,this.textRotateWithView_=void 0!==y&&y,this.textRotation_=void 0===m?0:m,this.strokeKey_=i?("string"==typeof i.strokeStyle?i.strokeStyle:o(i.strokeStyle))+i.lineCap+i.lineDashOffset+"|"+i.lineWidth+i.lineJoin+i.miterLimit+"["+i.lineDash.join()+"]":"",this.textKey_=r.font+r.scale+(r.textAlign||"?
 ")+(r.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+o(n.fillStyle):""}else this.text_=""},e}(jf)},Zf=function(){function t(t,e,r,n,i){this.declutter_=i,this.declutterGroups_=null,this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=r,this.buildersByZIndex_={}}return t.prototype.addDeclutter=function(t){var e=null;return this.declutter_&&(t?(e=this.declutterGroups_)[0][0]++:(e=[[1]],this.declutterGroups_=e)),e},t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var r=this.buildersByZIndex_[e];for(var n in r){var i=r[n].finish();t[e][n]=i}}return t},t.prototype.getBuilder=function(t,e){var r=void 0!==t?t.toString():"0",n=this.buildersByZIndex_[r];void 0===n&&(n={},this.buildersByZIndex_[r]=n);var i=n[e];void 0===i&&(i=new(0,Xf[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=i);return i},t}();function Kf(t,e,r,n,i,o,a,s,u,l,h,c){var p,f=[];if(c){var d=Dr(t,e,r,n,c,[t[
 e],t[e+1]]);p=d[0]>d[d.length-n]}else p=t[e]>t[r-n];for(var g,y,m=i.length,v=t[e],_=t[e+1],b=t[e+=n],x=t[e+1],w=0,S=Math.sqrt(Math.pow(b-v,2)+Math.pow(x-_,2)),T=!1,E=0;E<m;++E){for(var C=i[g=p?m-E-1:E],P=s*u(l,C,h),R=o+P/2;e<r-n&&w+S<R;)v=b,_=x,b=t[e+=n],x=t[e+1],w+=S,S=Math.sqrt(Math.pow(b-v,2)+Math.pow(x-_,2));var O=R-w,I=Math.atan2(x-_,b-v);if(p&&(I+=I>0?-Math.PI:Math.PI),void 0!==y){var L=I-y;if(T=T||0!==L,L+=L>Math.PI?-2*Math.PI:L<-Math.PI?2*Math.PI:0,Math.abs(L)>a)return null}y=I;var M=O/S,F=Ie(v,b,M),A=Ie(_,x,M);f[g]=[F,A,P/2,I,C],o+=P}return T?f:[[f[0][0],f[0][1],f[0][2],f[0][3],i]]}function Hf(t,e,r,n){for(var i=t[e],o=t[e+1],a=0,s=e+n;s<r;s+=n){var u=t[s],l=t[s+1];a+=Math.sqrt((u-i)*(u-i)+(l-o)*(l-o)),i=u,o=l}return a}var Jf=[1/0,1/0,-1/0,-1/0],$f=[1,0,0,1,0,0],Qf=[],td=[],ed=[],rd=[],nd=function(){function t(t,e,r,n,i){this.overlaps=r,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.declutterItems=[],this.instructions=n.instructions,this.coordinates=n.coordinates,
 this.coordinateCache_={},this.renderBuffer_=i,this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,r,n){var i=t+e+r+n;if(this.labels_[i])return this.labels_[i];var o=n?this.strokeStates[n]:null,a=r?this.fillStates[r]:null,s=this.textStates[e],u=this.pixelRatio,l=[s.scale[0]*u,s.scale[1]*u],h=qf[s.textAlign||"center"],c=n&&o.lineWidth?o.lineWidth:0,p=t.split("\n"),f=p.length,d=[],g=function(t,e,r){for(var n=e.length,i=0,o=0;o<n;++o){var a=lo(t,e[o]);i=Math.max(i,a),r.push(a)}return i}(s.font,p,d),y=so(s.font),m=g+c,v=[],_=(m+2)*l[0],b=(y*f+c)*l[1],x={width:_<0?Math.floor(_):Math.ceil(_),height:b<0?Math.floor(b):Math.ceil(b),contextInstructions:v};(1==l[0]&&1==l[1]||v.push("scale",l),v.push("font",s.font),n)&&(v.push("s
 trokeStyle",o.strokeStyle),v.push("lineWidth",c),v.push("lineCap",o.lineCap),v.push("lineJoin",o.lineJoin),v.push("miterLimit",o.miterLimit),(Di?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(v.push("setLineDash",[o.lineDash]),v.push("lineDashOffset",o.lineDashOffset)));r&&v.push("fillStyle",a.fillStyle),v.push("textBaseline","middle"),v.push("textAlign","center");var w,S=.5-h,T=h*m+S*c;if(n)for(w=0;w<f;++w)v.push("strokeText",[p[w],T+S*d[w],.5*(c+y)+w*y]);if(r)for(w=0;w<f;++w)v.push("fillText",[p[w],T+S*d[w],.5*(c+y)+w*y]);return this.labels_[i]=x,x},t.prototype.replayTextBackground_=function(t,e,r,n,i,o,a,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,r),t.lineTo.apply(t,n),t.lineTo.apply(t,i),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],s&&(t.fillStyle=o[1]),this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())},t.prototype.replayImageOrLabel_=function(t,e,r,n,i,o,a,s,u,l,h,c,p,f,d,g,y,m,v){var _=m||v;r-=o*=f[0],n-=a*=f[1];var b=g+h>
 i.width?i.width-h:g,x=u+c>i.height?i.height-c:u,w=y[3]+b*f[0]+y[1],S=y[0]+x*f[1]+y[2],T=r-y[3],E=n-y[0];(_||0!==p)&&(Qf[0]=T,rd[0]=T,Qf[1]=E,td[1]=E,td[0]=T+w,ed[0]=td[0],ed[1]=E+S,rd[1]=ed[1]);var C=null;if(0!==p){var P=r+o,R=n+a;C=Ct($f,P,R,1,1,p,-P,-R),Tt($f,Qf),Tt($f,td),Tt($f,ed),Tt($f,rd),Zt(Math.min(Qf[0],td[0],ed[0],rd[0]),Math.min(Qf[1],td[1],ed[1],rd[1]),Math.max(Qf[0],td[0],ed[0],rd[0]),Math.max(Qf[1],td[1],ed[1],rd[1]),Jf)}else Zt(T,E,T+w,E+S,Jf);this.renderBuffer_[0]=Math.max(this.renderBuffer_[0],ge(Jf)),this.renderBuffer_[1]=Math.max(this.renderBuffer_[1],ce(Jf));var O=t.canvas,I=v?v[2]*f[0]/2:0,L=this.renderBuffer_,M=Jf[0]-I<=(O.width+L[0])/e&&Jf[2]+I>=-L[0]/e&&Jf[1]-I<=(O.height+L[1])/e&&Jf[3]+I>=-L[1]/e;if(d&&(r=Math.round(r),n=Math.round(n)),s){if(!M&&1==s[0])return!1;var F=M?[t,C?C.slice(0):null,l,i,h,c,b,x,r,n,f,Jf.slice()]:null;F&&(_&&F.push(m,v,Qf.slice(0),td.slice(0),ed.slice(0),rd.slice(0)),s.push(F))}else M&&(_&&this.replayTextBackground_(t,Qf,td,ed,rd,m,v,
 !1),po(t,C,l,i,h,c,b,x,r,n,f));return!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=Tt(this.renderedTransform_,[0,0]),r=512*this.pixelRatio;t.save(),t.translate(e[0]%r,e[1]%r),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.renderDeclutter=function(t,e,r,n){for(var i=[],o=1,a=t.length;o<a;++o){var s=(c=t[o])[11];i.push({minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:e})}n||(n=new nc.a(9));var u=!1;for(o=0,a=i.length;o<a;++o)if(n.collides(i[o])){u=!0;break}if(!u){n.load(i);for(var l=1,h=t.length;l<h;++l){var c,p=(c=t[l])[0],f=p.globalAlpha;f!==r&&(p.globalAlpha=r),c.length>12&&this.replayTextBackground_(c[0],c[14],c[15],c[16],c[17],c[12],c[13],!0),po.apply(void 0,c),f!==r&&(p.globalAlpha=f)}}return t.length=1,n},t.prototype.drawLabelWithPointPlacement_=func
 tion(t,e,r,n){var i=this.textStates[e],o=this.createLabel(t,e,n,r),a=this.strokeStates[r],s=this.pixelRatio,u=qf[i.textAlign||"center"],l=qf[i.textBaseline||"middle"],h=a&&a.lineWidth?a.lineWidth:0;return{label:o,anchorX:u*(o.width/s-2*i.scale[0])+2*(.5-u)*h,anchorY:l*o.height/s+2*(.5-l)*h}},t.prototype.execute_=function(t,e,r,n,i,o,a){var s,u,l;this.declutterItems.length=0,this.pixelCoordinates_&&_(r,this.renderedTransform_)?s=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),s=Gr(this.coordinates,0,this.coordinates.length,2,r,this.pixelCoordinates_),u=this.renderedTransform_,l=r,u[0]=l[0],u[1]=l[1],u[2]=l[2],u[3]=l[3],u[4]=l[4],u[5]=l[5]);for(var h,c,p,f,d,g,y,m,v,b,x,w,S,T,E,C,P,R=0,O=n.length,I=0,L=0,M=0,F=null,A=null,k=this.coordinateCache_,N=this.viewRotation_,j=Math.round(1e12*Math.atan2(-r[1],r[0]))/1e12,G={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:N},D=this.instructions!=n||this.overlaps?0:200;R<O;){var z=n[R];switch(
 z[0]){case kf.BEGIN_GEOMETRY:(E=z[1]).getGeometry()?void 0===a||ye(a,z[3])?++R:R=z[2]+1:R=z[2];break;case kf.BEGIN_PATH:L>D&&(this.fill_(t),L=0),M>D&&(t.stroke(),M=0),L||M||(t.beginPath(),f=NaN,d=NaN),++R;break;case kf.CIRCLE:var U=s[I=z[1]],B=s[I+1],Y=s[I+2]-U,V=s[I+3]-B,W=Math.sqrt(Y*Y+V*V);t.moveTo(U+W,B),t.arc(U,B,W,0,2*Math.PI,!0),++R;break;case kf.CLOSE_PATH:t.closePath(),++R;break;case kf.CUSTOM:I=z[1],h=z[2];var q=z[3],X=z[4],Z=6==z.length?z[5]:void 0;G.geometry=q,G.feature=E,R in k||(k[R]=[]);var K=k[R];Z?Z(s,I,h,2,K):(K[0]=s[I],K[1]=s[I+1],K.length=2),X(K,G),++R;break;case kf.DRAW_IMAGE:I=z[1],h=z[2],b=z[3],c=z[4],p=z[5],v=o?null:z[6];var H=z[7],J=z[8],$=z[9],Q=z[10],tt=z[11],et=z[12],rt=z[13],nt=z[14];if(!b&&z.length>=19){x=z[18],w=z[19],S=z[20],T=z[21];var it=this.drawLabelWithPointPlacement_(x,w,S,T);b=it.label,z[3]=b;var ot=z[22];c=(it.anchorX-ot)*this.pixelRatio,z[4]=c;var at=z[23];p=(it.anchorY-at)*this.pixelRatio,z[5]=p,H=b.height,z[7]=H,nt=b.width,z[14]=nt}var st=v
 oid 0;z.length>24&&(st=z[24]);var ut=void 0,lt=void 0,ht=void 0;z.length>16?(ut=z[15],lt=z[16],ht=z[17]):(ut=$i,lt=!1,ht=!1),tt&&j?et+=N:tt||j||(et-=N);for(var ct=0,pt=0;I<h;I+=2)if(!(st&&st[ct++]<nt/this.pixelRatio)){if(v){var ft=Math.floor(pt);m=v.length<ft+1?[v[0][0]]:v[ft]}(Lt=this.replayImageOrLabel_(t,e,s[I],s[I+1],b,c,p,m,H,J,$,Q,et,rt,i,nt,ut,lt?F:null,ht?A:null))&&m&&v[v.length-1]!==m&&v.push(m),m&&(m.length-1===m[0]&&this.declutterItems.push(this,m,E),pt+=1/m[0])}++R;break;case kf.DRAW_CHARS:var dt=z[1],gt=z[2],yt=z[3];m=o?null:z[4];var mt=z[5];T=z[6];var vt=z[7],_t=z[8],bt=z[9];S=z[10];var xt=z[11];x=z[12],w=z[13];var wt=[z[14],z[14]],St=this.textStates[w],Tt=St.font,Et=[St.scale[0]*_t,St.scale[1]*_t],Ct=void 0;Tt in this.widths_?Ct=this.widths_[Tt]:(Ct={},this.widths_[Tt]=Ct);var Pt=Hf(s,dt,gt,2),Rt=Math.abs(Et[0])*ho(Tt,x,Ct);if(mt||Rt<=Pt){var Ot=this.textStates[w].textAlign,It=Kf(s,dt,gt,2,x,(Pt-Rt)*qf[Ot],vt,Math.abs(Et[0]),ho,Tt,Ct,j?0:this.viewRotation_);if(It){var
  Lt=!1,Mt=void 0,Ft=void 0,At=void 0,kt=void 0,Nt=void 0;if(S)for(Mt=0,Ft=It.length;Mt<Ft;++Mt)At=(Nt=It[Mt])[4],kt=this.createLabel(At,w,"",S),c=Nt[2]+xt,p=yt*kt.height+2*(.5-yt)*xt*Et[1]/Et[0]-bt,Lt=this.replayImageOrLabel_(t,e,Nt[0],Nt[1],kt,c,p,m,kt.height,1,0,0,Nt[3],wt,!1,kt.width,$i,null,null)||Lt;if(T)for(Mt=0,Ft=It.length;Mt<Ft;++Mt)At=(Nt=It[Mt])[4],kt=this.createLabel(At,w,T,""),c=Nt[2],p=yt*kt.height-bt,Lt=this.replayImageOrLabel_(t,e,Nt[0],Nt[1],kt,c,p,m,kt.height,1,0,0,Nt[3],wt,!1,kt.width,$i,null,null)||Lt;Lt&&this.declutterItems.push(this,m,E)}}++R;break;case kf.END_GEOMETRY:if(void 0!==o){var jt=o(E=z[1]);if(jt)return jt}++R;break;case kf.FILL:D?L++:this.fill_(t),++R;break;case kf.MOVE_TO_LINE_TO:for(I=z[1],h=z[2],C=s[I],y=(P=s[I+1])+.5|0,(g=C+.5|0)===f&&y===d||(t.moveTo(C,P),f=g,d=y),I+=2;I<h;I+=2)g=(C=s[I])+.5|0,y=(P=s[I+1])+.5|0,I!=h-2&&g===f&&y===d||(t.lineTo(C,P),f=g,d=y);++R;break;case kf.SET_FILL_STYLE:F=z,this.alignFill_=z[2],L&&(this.fill_(t),L=0,M&&(t.stro
 ke(),M=0)),t.fillStyle=z[1],++R;break;case kf.SET_STROKE_STYLE:A=z,M&&(t.stroke(),M=0),this.setStrokeStyle_(t,z),++R;break;case kf.STROKE:D?M++:t.stroke(),++R;break;default:++R}}L&&this.fill_(t),M&&t.stroke()},t.prototype.execute=function(t,e,r,n,i){this.viewRotation_=n,this.execute_(t,e,r,this.instructions,i,void 0,void 0)},t.prototype.executeHitDetection=function(t,e,r,n,i){return this.viewRotation_=r,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,i)},t}(),id=[wo,vo,xo,bo,So,_o],od=function(){function t(t,e,r,n,i,o){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=r,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(i)}return t.prototype.clip=function(t,e){var r=this.getClipCoords(e);t.beginPath(),t.moveTo(r[0],r[1]),t.lineTo(r[2],r[3]),t.lineTo(r[4],r[5]),t.lineTo(r[6],r[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var r=this.executor
 sByZIndex_[e];void 0===r&&(r={},this.executorsByZIndex_[e]=r);var n=t[e],i=[this.renderBuffer_||0,this.renderBuffer_||0];for(var o in n){var a=n[o];r[o]=new nd(this.resolution_,this.pixelRatio_,this.overlaps_,a,i)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var r=this.executorsByZIndex_[e],n=0,i=t.length;n<i;++n)if(t[n]in r)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i,o){var a=2*(n=Math.round(n))+1,s=Ct(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-r,-t[0],-t[1]);this.hitDetectionContext_||(this.hitDetectionContext_=Bi(a,a));var u,l=this.hitDetectionContext_;l.canvas.width!==a||l.canvas.height!==a?(l.canvas.width=a,l.canvas.height=a):l.clearRect(0,0,a,a),void 0!==this.renderBuffer_&&(te(u=[1/0,1/0,-1/0,-1/0],t),zt(u,e*(this.renderBuffer_+n),u));var h,c=function(t){if(void 0!==ad[t])return ad[t];for(var e=2*t+1,r=new Array(e),n=0;n<e;n++)r[n]=new Array(e);var i=t,o=0,a=0;for(;i>=o;)sd(r,t+i,t+o),sd(r,t+o,t+i),sd(r
 ,t-o,t+i),sd(r,t-i,t+o),sd(r,t-i,t-o),sd(r,t-o,t-i),sd(r,t+o,t-i),sd(r,t+i,t-o),o++,2*((a+=1+2*o)-i)+1>0&&(a+=1-2*(i-=1));return ad[t]=r,r}(n);function p(t){for(var e=l.getImageData(0,0,a,a).data,r=0;r<a;r++)for(var n=0;n<a;n++)if(c[r][n]&&e[4*(n*a+r)+3]>0){var s=void 0;return(!o||h!=bo&&h!=So||-1!==o.indexOf(t))&&(s=i(t)),s||void l.clearRect(0,0,a,a)}}var d,g,y,m,v,_=Object.keys(this.executorsByZIndex_).map(Number);for(_.sort(f),d=_.length-1;d>=0;--d){var b=_[d].toString();for(y=this.executorsByZIndex_[b],g=id.length-1;g>=0;--g)if(void 0!==(m=y[h=id[g]])&&(v=m.executeHitDetection(l,s,r,p,u)))return v}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var r=e[0],n=e[1],i=e[2],o=e[3],a=[r,n,r,o,i,o,i,n];return Gr(a,0,8,2,t,a),a},t.prototype.isEmpty=function(){return P(this.executorsByZIndex_)},t.prototype.execute=function(t,e,r,n,i,o,a){var s=Object.keys(this.executorsByZIndex_).map(Number);s.sort(f),this.maxExtent_&&(t.save(),this.clip(t,r));var u,l,h,c,
 p,d,g=o||id;for(u=0,l=s.length;u<l;++u){var y=s[u].toString();for(p=this.executorsByZIndex_[y],h=0,c=g.length;h<c;++h){var m=g[h];if(void 0!==(d=p[m]))if(!a||m!=bo&&m!=So)d.execute(t,e,r,n,i);else{var v=a[y];v?v.push(d,r.slice(0)):a[y]=[d,r.slice(0)]}}}this.maxExtent_&&t.restore()},t}(),ad={0:[[!0]]};function sd(t,e,r){var n,i=Math.floor(t.length/2);if(e>=i)for(n=i;n<e;n++)t[n][r]=!0;else if(e<i)for(n=e+1;n<i;n++)t[n][r]=!0}function ud(t,e,r,n,i,o){for(var a=Object.keys(t).map(Number).sort(f),s=0,u=a.length;s<u;++s)for(var l=t[a[s].toString()],h=void 0,c=0,p=l.length;c<p;){var d=l[c++],g=l[c++];d.execute(e,1,g,r,i),d!==h&&d.declutterItems.length>0&&(h=d,o.push({items:d.declutterItems,opacity:n}))}}var ld=od;function hd(t,e,r,n,i,o,a){var s=Bi(t[0]/2,t[1]/2);s.imageSmoothingEnabled=!1;for(var u=s.canvas,l=new mo(s,.5,i,null,a),h=r.length,c=Math.floor(16777215/h),p={},d=1;d<=h;++d){var g=r[d-1],y=g.getStyleFunction()||n;if(n){var m=y(g,o);if(m){Array.isArray(m)||(m=[m]);for(var v="#"+
 ("000000"+(d*c).toString(16)).slice(-6),_=0,b=m.length;_<b;++_){var x=m[_],w=x.clone(),S=w.getFill();S&&S.setColor(v);var T=w.getStroke();T&&T.setColor(v),w.setText(void 0);var E=x.getImage();if(E){var C=E.getImageSize();if(!C)continue;var P=document.createElement("canvas");P.width=C[0],P.height=C[1];var R=P.getContext("2d",{alpha:!1});R.fillStyle=v;var O=R.canvas;R.fillRect(0,0,O.width,O.height),Bi(C?C[0]:O.width,C?C[1]:O.height).drawImage(O,0,0),w.setImage(new rh({img:O,imgSize:C,anchor:E.getAnchor(),anchorXUnits:Bl,anchorYUnits:Bl,offset:E.getOrigin(),size:E.getSize(),opacity:E.getOpacity(),scale:E.getScale(),rotation:E.getRotation(),rotateWithView:E.getRotateWithView()}))}var I=Number(w.getZIndex());(A=p[I])||(A={},p[I]=A,A[yt.POLYGON]=[],A[yt.CIRCLE]=[],A[yt.LINE_STRING]=[],A[yt.POINT]=[]);var L=w.getGeometryFunction()(g);L&&ye(i,L.getExtent())&&A[L.getType().replace("Multi","")].push(L,w)}}}}for(var M=Object.keys(p).map(Number).sort(f),F=(d=0,M.length);d<F;++d){var A=p[M[d]];f
 or(var k in A){var N=A[k];for(_=0,b=N.length;_<b;_+=2){l.setStyle(N[_+1]);for(var j=0,G=e.length;j<G;++j)l.setTransform(e[j]),l.drawGeometry(N[_])}}}return s.getImageData(0,0,u.width,u.height)}function cd(t,e,r){var n=[];if(r){var i=4*(Math.round(t[0]/2)+Math.round(t[1]/2)*r.width),o=r.data[i],a=r.data[i+1],s=r.data[i+2]+256*(a+256*o),u=Math.floor(16777215/e.length);s&&s%u==0&&n.push(e[s/u-1])}return n}var pd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fd=function(t){function e(e){var r=t.call(this,e)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.animatingOrInteracting_,r.dirty_=!1,r.hitDetectionImageData_=null,r.renderedFeatures_=null,r.renderedRevision_=-1,r.renderedR
 esolution_=NaN,r.renderedExtent_=[1/0,1/0,-1/0,-1/0],r.renderedRotation_,r.renderedCenter_=null,r.renderedProjection_=null,r.renderedRenderOrder_=null,r.replayGroup_=null,r.replayGroupChanged=!0,r.clipping=!0,r}return pd(e,t),e.prototype.useContainer=function(e,r,n){n<1&&(e=null),t.prototype.useContainer.call(this,e,r,n)},e.prototype.renderFrame=function(t,e){var r=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];!function(t,e,r){St(t,e,0,0,r,0,0)}(this.pixelTransform,1/r,1/r),Pt(this.inversePixelTransform,this.pixelTransform);var i=Rt(this.pixelTransform);this.useContainer(e,i,n.opacity);var o=this.context,a=o.canvas,s=this.replayGroup_;if(!s||s.isEmpty())return!this.containerReused&&a.width>0&&(a.width=0),this.container;var u=Math.round(t.size[0]*r),l=Math.round(t.size[1]*r);a.width!=u||a.height!=l?(a.width=u,a.height=l,a.style.transform!==i&&(a.style.transform=i)):this.containerReused||o.clearRect(0,0,u,l),this.preRender(o,t);var h=t.extent,c=t.viewState,p=c.center,f=c.resolution,
 d=c.projection,g=c.rotation,y=d.getExtent(),m=this.getLayer().getSource(),v=!1;if(n.extent&&this.clipping){var _=Nr(n.extent,d);(v=!Vt(_,t.extent)&&ye(_,t.extent))&&this.clipUnrotated(o,t,_)}var b=t.viewHints,x=!(b[va]||b[_a]),w=this.getRenderTransform(p,f,g,r,u,l,0),S=this.getLayer().getDeclutter()?{}:null;if(s.execute(o,1,w,g,x,void 0,S),m.getWrapX()&&d.canWrapX()&&!Vt(y,h)){for(var T=h[0],E=ge(y),C=0,P=void 0;T<y[0];){P=E*--C;var R=this.getRenderTransform(p,f,g,r,u,l,P);s.execute(o,1,R,g,x,void 0,S),T+=E}for(C=0,T=h[2];T>y[2];){P=E*++C;var O=this.getRenderTransform(p,f,g,r,u,l,P);s.execute(o,1,O,g,x,void 0,S),T-=E}}if(S){var I=t.viewHints;ud(S,o,g,1,!(I[va]||I[_a]),t.declutterItems)}v&&o.restore(),this.postRender(o,t);var L=n.opacity,M=this.container;return L!==parseFloat(M.style.opacity)&&(M.style.opacity=1===L?"":String(L)),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t
 ){return new Promise(function(e,r){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var n=[this.context.canvas.width,this.context.canvas.height];Tt(this.pixelTransform,n);var i=this.renderedCenter_,o=this.renderedResolution_,a=this.renderedRotation_,s=this.renderedProjection_,u=this.renderedExtent_,l=this.getLayer(),h=[],c=n[0]/2,p=n[1]/2;h.push(this.getRenderTransform(i,o,a,.5,c,p,0).slice());var f=l.getSource(),d=s.getExtent();if(f.getWrapX()&&s.canWrapX()&&!Vt(d,u)){for(var g=u[0],y=ge(d),m=0,v=void 0;g<d[0];)v=y*--m,h.push(this.getRenderTransform(i,o,a,.5,c,p,v).slice()),g+=y;for(m=0,g=u[2];g>d[2];)v=y*++m,h.push(this.getRenderTransform(i,o,a,.5,c,p,v).slice()),g-=y}this.hitDetectionImageData_=hd(n,h,this.renderedFeatures_,l.getStyleFunction(),u,o,a)}e(cd(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i){if(this.replayGroup_){var a=e.viewState.resolution,s=e.viewState.rotation,u=this.get
 Layer(),l={};return this.replayGroup_.forEachFeatureAtCoordinate(t,a,s,r,(function(t){var e=o(t);if(!(e in l))return l[e]=!0,n(t,u)}),u.getDeclutter()?i:null)}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),r=e.getSource();if(!r)return!1;var n=t.viewHints[va],i=t.viewHints[_a],o=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(!this.dirty_&&!o&&n||!a&&i)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var s=t.extent,u=t.viewState,l=u.projection,h=u.resolution,c=t.pixelRatio,p=e.getRevision(),f=e.getRenderBuffer(),d=e.getRenderOrder();void 0===d&&(d=Io);var g=u.center.slice(),y=zt(s,f*h),m=[y.slice()],v=l.getExtent();if(r.getWrapX()&&l.canWrapX()&&!Vt(v,t.extent)){var _=ge(v),b=Math.max(ge(y)/2,_);y[0]=v[0]-b,y[2]=v[2]+b,cr(g,l);var x=be(m[0],l
 );x[0]<v[0]&&x[2]<v[2]?m.push([x[0]+_,x[1],x[2]+_,x[3]]):x[0]>v[0]&&x[2]>v[2]&&m.push([x[0]-_,x[1],x[2]-_,x[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==p&&this.renderedRenderOrder_==d&&Vt(this.renderedExtent_,y))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var w,S=new Zf(Mo(h,c),y,h,c,e.getDeclutter()),T=Mr();if(T){for(var E=0,C=m.length;E<C;++E)r.loadFeatures(kr(m[E],l),h,T);w=Tr(T,l)}else for(E=0,C=m.length;E<C;++E)r.loadFeatures(m[E],h,l);var P=Lo(h,c),R=function(t){var r,n=t.getStyleFunction()||e.getStyleFunction();if(n&&(r=n(t,h)),r){var i=this.renderFeature(t,P,r,S,w);this.dirty_=this.dirty_||i}}.bind(this),O=kr(y,l),I=r.getFeaturesInExtent(O);d&&I.sort(d);for(E=0,C=I.length;E<C;++E)R(I[E]);this.renderedFeatures_=I;var L=S.finish(),M=new ld(y,h,c,r.getOverlaps(),L,e.getRenderBuffer());return this.renderedResolution_=h,this.renderedRevision_=p,this.renderedRenderOrder_=d,this.renderedExtent_=y,this.renderedCenter_=g,t
 his.renderedProjection_=l,this.replayGroup_=M,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,r,n,i){if(!r)return!1;var o=!1;if(Array.isArray(r))for(var a=0,s=r.length;a<s;++a)o=Fo(n,t,r[a],e,this.boundHandleStyleImageChange_,i)||o;else o=Fo(n,t,r,e,this.boundHandleStyleImageChange_,i);return o},e}(fp),dd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gd=function(t){function e(e){var r=t.call(this,e)||this;return r.vectorRenderer_=new fd(e),r.layerImageRatio_=e.getImageRatio(),r.coordinateToVectorPixelTransform_=[1,0,0,1,0,0],r.renderedPixelToCoordinateTransform_=null,r}return dd(e,t),e.prototype.disposeInternal=function(){this.vectorRenderer_.dispose(
 ),t.prototype.disposeInternal.call(this)},e.prototype.getFeatures=function(t){if(this.vectorRenderer_){var e=Tt(this.coordinateToVectorPixelTransform_,Tt(this.renderedPixelToCoordinateTransform_,t.slice()));return this.vectorRenderer_.getFeatures(e)}return new Promise((function(t,e){t([])}))},e.prototype.handleFontsChanged=function(){this.vectorRenderer_.handleFontsChanged()},e.prototype.prepareFrame=function(t){var e=t.pixelRatio,r=t.viewState,n=r.resolution,i=t.viewHints,o=this.vectorRenderer_,a=t.extent;1!==this.layerImageRatio_&&ve(a=a.slice(0),this.layerImageRatio_);var s=ge(a)/n,u=ce(a)/n;if(!i[va]&&!i[_a]&&!me(a)){o.useContainer(null,null,1);var l=o.context,h=T({},t,{declutterItems:[],extent:a,size:[s,u],viewState:T({},t.viewState,{rotation:0})}),c=new Wc(a,n,e,l.canvas,(function(t){o.prepareFrame(h)&&o.replayGroupChanged&&(o.clipping=!1,o.renderFrame(h,null),ko(h,null),t())}));c.addEventListener(I,function(){if(c.getState()===Co){this.image_=c;var t=c.getResolution(),n=c.get
 PixelRatio(),i=t*e/n;this.renderedResolution=i,this.coordinateToVectorPixelTransform_=Ct(this.coordinateToVectorPixelTransform_,s/2,u/2,1/i,-1/i,0,-r.center[0],-r.center[1])}}.bind(this)),c.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice()),!!this.image_},e.prototype.preRender=function(){},e.prototype.postRender=function(){},e.prototype.forEachFeatureAtCoordinate=function(e,r,n,i,o){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(e,r,n,i,o):t.prototype.forEachFeatureAtCoordinate.call(this,e,r,n,i,o)},e}(gp),yd="image",md="hybrid",vd="vector",_d=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bd={image:[wo,vo,xo,bo,So],hybrid
 :[wo,xo],vector:[]},xd={image:[_o],hybrid:[bo,So,_o],vector:[wo,vo,xo,bo,So,_o]},wd=function(t){function e(e){var r=t.call(this,e)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.dirty_=!1,r.renderedLayerRevision_,r.renderedPixelToCoordinateTransform_=null,r.renderedRotation_,r.renderTileImageQueue_={},r.tileListenerKeys_={},r.tmpTransform_=[1,0,0,1,0,0],r}return _d(e,t),e.prototype.prepareTile=function(t,e,r,n){var i,a=o(t),s=t.getState();return(s===fa&&t.hifi||s===da)&&a in this.tileListenerKeys_&&(X(this.tileListenerKeys_[a]),delete this.tileListenerKeys_[a]),s!==fa&&s!==da||(this.updateExecutorGroup_(t,e,r),this.tileImageNeedsRender_(t,e,r)&&(i=!0,n&&(this.renderTileImageQueue_[a]=t))),i},e.prototype.getTile=function(e,r,n,i){var a=i.pixelRatio,s=i.viewState,u=s.resolution,l=s.projection,h=this.getLayer(),c=h.getSource().getTile(e,r,n,a,l);if(c.getState()<fa){c.wantedResolution=u;var p=o(c);if(!(p in this.tileListenerKeys_)){var f=W(c,I,this.prepa
 reTile.bind(this,c,a,l,!0));this.tileListenerKeys_[p]=f}}else{var d=i.viewHints;!!(d[va]||d[_a])&&c.wantedResolution||(c.wantedResolution=u),this.prepareTile(c,a,l,!1)&&h.getRenderMode()!==vd&&this.renderTileImage_(c,i)}return t.prototype.getTile.call(this,e,r,n,i)},e.prototype.isDrawableTile=function(e){var r=this.getLayer();return t.prototype.isDrawableTile.call(this,e)&&(r.getRenderMode()===vd?o(r)in e.executorGroups:e.hasContext(r))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(e){var r=this.getLayer().getRevision();return this.renderedLayerRevision_!=r&&(this.renderedTiles.length=0),this.renderedLayerRevision_=r,t.prototype.prepareFrame.call(this,e)},e.prototype.updateExecutorGroup_=function(t,e,r){var n=this.getLayer(),i=n.getRevision(),a=n.getRenderOrder()||null,s=t.wantedResolution,u=t.getReplayState(n);if(u.dirty||u.renderedResolution!==s||u.renderedRevision!=i||u.renderedRenderOrder!=a||u.renderedZ!==t.sourceZ){
 var l=n.getSource(),h=l.getTileGrid(),c=l.getTileGridForProjection(r).getTileCoordExtent(t.wrappedTileCoord),p=l.getSourceTiles(e,r,t),f=o(n);delete t.hitDetectionImageData[f],t.executorGroups[f]=[];for(var d=function(r,i){var o=p[r];if(o.getState()!=fa)return"continue";var d=o.tileCoord,y=h.getTileCoordExtent(d),m=pe(c,y),v=$t(y,m)?null:zt(m,n.getRenderBuffer()*s,g.tmpExtent);u.dirty=!1;var _=new Zf(0,m,s,e,n.getDeclutter()),b=Lo(s,e),x=function(t){var e,r=t.getStyleFunction()||n.getStyleFunction();if(r&&(e=r(t,s)),e){var i=this.renderFeature(t,b,e,_);this.dirty_=this.dirty_||i,u.dirty=u.dirty||i}},w=o.getFeatures();a&&a!==u.renderedRenderOrder&&w.sort(a);for(var S=0,T=w.length;S<T;++S){var E=w[S];v&&!ye(v,E.getGeometry().getExtent())||x.call(g,E)}var C=_.finish(),P=n.getRenderMode()!==vd&&n.getDeclutter()&&1===p.length?null:m,R=new ld(P,s,e,l.getOverlaps(),C,n.getRenderBuffer());t.executorGroups[f].push(R)},g=this,y=0,m=p.length;y<m;++y)d(y);u.renderedRevision=i,u.renderedZ=t.sour
 ceZ,u.renderedRenderOrder=a,u.renderedResolution=s}},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i){var a=e.viewState.resolution,s=e.viewState.rotation;r=null==r?0:r;var u,l,h,c=this.getLayer(),p=c.getDeclutter(),f=c.getSource().getTileGridForProjection(e.viewState.projection),d={},g=this.renderedTiles,y=function(){var e=g[l],h=Yt(f.getTileCoordExtent(e.wrappedTileCoord),t);if(!p&&!h)return"continue";for(var y=e.executorGroups[o(c)],m=0,v=y.length;m<v;++m){var _=y[m];u=u||_.forEachFeatureAtCoordinate(t,a,s,r,(function(t){if(h||i&&-1!==i.indexOf(t)){var e=t.getId();if(void 0===e&&(e=o(t)),!(e in d))return d[e]=!0,n(t,c)}}),c.getDeclutter()?i:null)}};for(l=0,h=g.length;l<h;++l)y();return u},e.prototype.getFeatures=function(t){return new Promise(function(e,r){for(var n,i=this.getLayer(),a=o(i),s=i.getSource(),u=this.renderedProjection,l=u.getExtent(),h=this.renderedResolution,c=s.getTileGridForProjection(u),p=Tt(this.renderedPixelToCoordinateTransform_,t.slice()),f=c.getTil
 eCoordForCoordAndResolution(p,h),d=0,g=this.renderedTiles.length;d<g;++d)if(f.toString()===this.renderedTiles[d].tileCoord.toString()){if((n=this.renderedTiles[d]).getState()===fa&&n.hifi){var y=c.getTileCoordExtent(n.tileCoord);s.getWrapX()&&u.canWrapX()&&!Vt(l,y)&&cr(p,u);break}n=void 0}if(!n||n.loadingSourceTiles>0)e([]);else{var m=fe(c.getTileCoordExtent(n.wrappedTileCoord)),v=[(p[0]-m[0])/h,(m[1]-p[1])/h],_=n.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]),b=n.hitDetectionImageData[a];if(!b&&!this.animatingOrInteracting_){var x=za(c.getTileSize(c.getZForResolution(h))),w=[x[0]/2,x[1]/2],S=this.renderedRotation_;b=hd(x,[this.getRenderTransform(c.getTileCoordCenter(n.wrappedTileCoord),h,0,.5,w[0],w[1],0)],_,i.getStyleFunction(),c.getTileCoordExtent(n.wrappedTileCoord),n.getReplayState(i).renderedResolution,S),n.hitDetectionImageData[a]=b}e(cd(v,_,b))}}.bind(this))},e.prototype.handleFontsChanged=function(){E(this.renderTileImageQueue_);var t=this.get
 Layer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderFrame=function(e,r){var n=e.viewHints,i=!(n[va]||n[_a]);this.renderQueuedTileImages_(i,e),t.prototype.renderFrame.call(this,e,r),this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;var a=this.getLayer(),s=a.getRenderMode();if(s===yd)return this.container;var u=a.getSource(),l=e.usedTiles[o(u)];for(var h in this.renderTileImageQueue_)l&&h in l||delete this.renderTileImageQueue_[h];for(var c=this.context,p=a.getDeclutter()?{}:null,f=xd[s],d=e.pixelRatio,g=e.viewState,y=g.center,m=g.resolution,v=g.rotation,_=e.size,b=Math.round(_[0]*d),x=Math.round(_[1]*d),w=this.renderedTiles,S=u.getTileGridForProjection(e.viewState.projection),T=[],E=[],C=w.length-1;C>=0;--C)for(var P=w[C],R=P.tileCoord,O=S.getTileCoordExtent(P.wrappedTileCoord),I=S.getTileCoord
 Extent(R,this.tmpExtent)[0]-O[0],L=wt(Et(this.inversePixelTransform.slice(),1/d,1/d),this.getRenderTransform(y,m,v,d,b,x,I)),M=P.executorGroups[o(a)],F=!1,A=0,k=M.length;A<k;++A){var N=M[A];if(N.hasExecutors(f)){var j=P.tileCoord[0],G=void 0;if(!p&&!F){G=N.getClipCoords(L),c.save();for(var D=0,z=T.length;D<z;++D){var U=T[D];j<E[D]&&(c.beginPath(),c.moveTo(G[0],G[1]),c.lineTo(G[2],G[3]),c.lineTo(G[4],G[5]),c.lineTo(G[6],G[7]),c.moveTo(U[6],U[7]),c.lineTo(U[4],U[5]),c.lineTo(U[2],U[3]),c.lineTo(U[0],U[1]),c.clip())}}N.execute(c,1,L,v,i,f,p),p||F||(c.restore(),T.push(G),E.push(j),F=!0)}}p&&ud(p,c,v,e.layerStatesArray[e.layerIndex].opacity,i,e.declutterItems);return this.container},e.prototype.renderQueuedTileImages_=function(t,e){for(var r in this.renderTileImageQueue_){if(!t&&Date.now()-e.time>8){e.animate=!0;break}var n=this.renderTileImageQueue_[r];delete this.renderTileImageQueue_[r],this.renderTileImage_(n,e)}},e.prototype.renderFeature=function(t,e,r,n){if(!r)return!1;var i=!1;if
 (Array.isArray(r))for(var o=0,a=r.length;o<a;++o)i=Fo(n,t,r[o],e,this.boundHandleStyleImageChange_)||i;else i=Fo(n,t,r,e,this.boundHandleStyleImageChange_);return i},e.prototype.tileImageNeedsRender_=function(t,e,r){var n=this.getLayer(),i=t.getReplayState(n),o=n.getRevision(),a=t.sourceZ,s=t.wantedResolution;return i.renderedTileResolution!==s||i.renderedTileRevision!==o||i.renderedTileZ!==a},e.prototype.renderTileImage_=function(t,e){var r=this.getLayer(),n=t.getReplayState(r),i=r.getRevision(),a=t.executorGroups[o(r)];n.renderedTileRevision=i,n.renderedTileZ=t.sourceZ;var s=t.wrappedTileCoord,u=s[0],l=r.getSource(),h=e.pixelRatio,c=e.viewState.projection,p=l.getTileGridForProjection(c),f=p.getResolution(t.tileCoord[0]),d=e.pixelRatio/t.wantedResolution*f,g=p.getResolution(u),y=t.getContext(r);h=Math.max(h,d/h);var m=l.getTilePixelSize(u,h,c);y.canvas.width=m[0],y.canvas.height=m[1];var v=h/d;if(1!==v){var _=xt(this.tmpTransform_);Et(_,v,v),y.setTransform.apply(y,_)}var b=p.getTil
 eCoordExtent(s,this.tmpExtent),x=d/g,w=xt(this.tmpTransform_);Et(w,x,-x),function(t,e,r){wt(t,St(bt,1,0,0,1,e,r))}(w,-b[0],-b[3]);for(var S=0,T=a.length;S<T;++S){a[S].execute(y,v,w,0,!0,bd[r.getRenderMode()])}n.renderedTileResolution=t.wantedResolution},e}(Tp);function Sd(t,e,r,n,i,o,a){var s,u,l=(r-e)/n;if(1===l)s=e;else if(2===l)s=e,u=i;else if(0!==l){for(var h=t[e],c=t[e+1],p=0,d=[0],g=e+n;g<r;g+=n){var y=t[g],m=t[g+1];p+=Math.sqrt((y-h)*(y-h)+(m-c)*(m-c)),d.push(p),h=y,c=m}var v=i*p,_=function(t,e,r){for(var n,i,o=r||f,a=0,s=t.length,u=!1;a<s;)(i=+o(t[n=a+(s-a>>1)],e))<0?a=n+1:(s=n,u=!i);return u?a:~a}(d,v);_<0?(u=(v-d[-_-2])/(d[-_-1]-d[-_-2]),s=e+(-_-2)*n):s=e+_*n}var b=a>1?a:2,x=o||new Array(b);for(g=0;g<b;++g)x[g]=void 0===s?NaN:void 0===u?t[s+g]:Ie(t[s+g],t[s+n+g],u);return x}function Td(t,e,r,n,i,o){if(r==e)return null;var a;if(i<t[e+n-1])return o?((a=t.slice(e,e+n))[n-1]=i,a):null;if(t[r-1]<i)return o?((a=t.slice(r-n,r))[n-1]=i,a):null;if(i==t[e+n-1])return t.slice(e,e+n);
 for(var s=e/n,u=r/n;s<u;){var l=s+u>>1;i<t[(l+1)*n-1]?u=l:s=l+1}var h=t[s*n-1];if(i==h)return t.slice((s-1)*n,(s-1)*n+n);var c=(i-h)/(t[(s+1)*n-1]-h);a=[];for(var p=0;p<n-1;++p)a.push(Ie(t[(s-1)*n+p],t[s*n+p],c));return a.push(i),a}var Ed=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cd=function(t){function e(e,r){var n=t.call(this)||this;return n.flatMidpoint_=null,n.flatMidpointRevision_=-1,n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===r||Array.isArray(e[0])?n.setCoordinates(e,r):n.setFlatCoordinates(r,e),n}return Ed(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?m(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){return new e(this.f
 latCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,n){return n<Bt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Zr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Hr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,r,n))},e.prototype.forEachSegment=function(t){return xn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=dt&&this.layout!=gt)return null;var r=void 0!==e&&e;return Td(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r)},e.prototype.getCoordinates=function(){return sn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return Sd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return Hf(this.
 flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[];return r.length=en(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r,0),new e(r,pt)},e.prototype.getType=function(){return yt.LINE_STRING},e.prototype.intersectsExtent=function(t){return wn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Qr(this.flatCoordinates,0,t,this.stride),this.changed()},e}(qr),Pd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnPropert
 y(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rd=function(t){function e(e){return t.call(this,e)||this}return Pd(e,t),e.prototype.createRenderer=function(){return new fd(this)},e}(xf);function Od(t,e,r){for(var n,i,o,a,s,u,l=[],h=t(0),c=t(1),p=e(h),f=e(c),d=[c,h],g=[f,p],y=[1,0],m={},v=1e5;--v>0&&y.length>0;)o=y.pop(),h=d.pop(),p=g.pop(),(u=o.toString())in m||(l.push(p[0],p[1]),m[u]=!0),a=y.pop(),c=d.pop(),f=g.pop(),Ee((i=e(n=t(s=(o+a)/2)))[0],i[1],p[0],p[1],f[0],f[1])<r?(l.push(f[0],f[1]),m[u=a.toString()]=!0):(y.push(a,s,s,o),g.push(f,i,i,p),d.push(c,n,n,h));return l}var Id=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prot
 otype=r.prototype,new n)}}(),Ld=new nh({color:"rgba(0,0,0,0.2)"}),Md=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001],Fd=function(t){function e(e){var r=this,n=e||{},i=T({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},n);return delete i.maxLines,delete i.strokeStyle,delete i.targetSize,delete i.showLabels,delete i.lonLabelFormatter,delete i.latLabelFormatter,delete i.lonLabelPosition,delete i.latLabelPosition,delete i.lonLabelStyle,delete i.latLabelStyle,delete i.intervals,(r=t.call(this,i)||this).projection_=null,r.maxLat_=1/0,r.maxLon_=1/0,r.minLat_=-1/0,r.minLon_=-1/0,r.maxX_=1/0,r.maxY_=1/0,r.minX_=-1/0,r.minY_=-1/0,r.targetSize_=void 0!==n.targetSize?n.targetSize:100,r.maxLines_=void 0!==n.maxLines?n.maxLines:100,r.meridians_=[],r.parallels_=[],r.strokeStyle_=void 0!==n.strokeStyle?n.strokeStyle:Ld,r.fromLonLatTransform_=void 0,r.toLonLatTransform_=void 0,r.projectionCenterLonLat_=null,r.bottomLeft_=null,r.bottomRight_=null,r.topLeft_=null,r.topRight_=n
 ull,r.meridiansLabels_=null,r.parallelsLabels_=null,n.showLabels&&(r.lonLabelFormatter_=null==n.lonLabelFormatter?rr.bind(r,"EW"):n.lonLabelFormatter,r.latLabelFormatter_=null==n.latLabelFormatter?rr.bind(r,"NS"):n.latLabelFormatter,r.lonLabelPosition_=null==n.lonLabelPosition?0:n.lonLabelPosition,r.latLabelPosition_=null==n.latLabelPosition?1:n.latLabelPosition,r.lonLabelStyleBase_=new lh({text:void 0!==n.lonLabelStyle?n.lonLabelStyle.clone():new ph({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new zl({color:"rgba(0,0,0,1)"}),stroke:new nh({color:"rgba(255,255,255,1)",width:3})})}),r.lonLabelStyle_=function(t){var e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_}.bind(r),r.latLabelStyleBase_=new lh({text:void 0!==n.latLabelStyle?n.latLabelStyle.clone():new ph({font:"12px Calibri,sans-serif",textAlign:"right",fill:new zl({color:"rgba(0,0,0,1)"}),stroke:new nh({color:"rgba(255,255,255,1)",width:3})})}),r.latLabelStyle
 _=function(t){var e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_}.bind(r),r.meridiansLabels_=[],r.parallelsLabels_=[],r.addEventListener(xi,r.drawLabels_.bind(r))),r.intervals_=void 0!==n.intervals?n.intervals:Md,r.setSource(new cc({loader:r.loaderFunction.bind(r),strategy:r.strategyFunction.bind(r),features:new ut,overlaps:!1,useSpatialIndex:!1,wrapX:n.wrapX})),r.featurePool_=[],r.lineStyle_=new lh({stroke:r.strokeStyle_}),r.loadedExtent_=null,r.renderedExtent_=null,r.setRenderOrder(null),r}return Id(e,t),e.prototype.strategyFunction=function(t,e){var r,n,i,o=t.slice();return this.projection_&&this.getSource().getWrapX()&&be(o,this.projection_),this.loadedExtent_&&(r=this.loadedExtent_,n=o,i=e,Math.abs(r[0]-n[0])<i&&Math.abs(r[2]-n[2])<i&&Math.abs(r[1]-n[1])<i&&Math.abs(r[3]-n[3])<i?o=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[o]},e.prototype.loaderFunction=function(t,e,r){this.loadedE
 xtent_=t;var n=this.getSource(),i=pe(this.getExtent()||[-1/0,-1/0,1/0,1/0],t);if(!(this.renderedExtent_&&$t(this.renderedExtent_,i)||(this.renderedExtent_=i,me(i)))){var o=ue(i),a=e*e/4;(!this.projection_||!Sr(this.projection_,r))&&this.updateProjectionInfo_(r),this.createGraticule_(i,o,e,a);var s,u=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(u+=this.meridians_.length),this.parallelsLabels_&&(u+=this.parallels_.length);u>this.featurePool_.length;)s=new ct,this.featurePool_.push(s);var l=n.getFeaturesCollection();l.clear();var h,c,p=0;for(h=0,c=this.meridians_.length;h<c;++h)(s=this.featurePool_[p++]).setGeometry(this.meridians_[h]),s.setStyle(this.lineStyle_),l.push(s);for(h=0,c=this.parallels_.length;h<c;++h)(s=this.featurePool_[p++]).setGeometry(this.parallels_[h]),s.setStyle(this.lineStyle_),l.push(s)}},e.prototype.addMeridian_=function(t,e,r,n,i,o){var a=this.getMeridian_(t,e,r,n,o);if(ye(a.getExtent(),i)){if(this.meridiansLabels_){var s=this.lonLab
 elFormatter_(t);o in this.meridiansLabels_?this.meridiansLabels_[o].text=s:this.meridiansLabels_[o]={geom:new gn([]),text:s}}this.meridians_[o++]=a}return o},e.prototype.addParallel_=function(t,e,r,n,i,o){var a=this.getParallel_(t,e,r,n,o);if(ye(a.getExtent(),i)){if(this.parallelsLabels_){var s=this.latLabelFormatter_(t);o in this.parallelsLabels_?this.parallelsLabels_[o].text=s:this.parallelsLabels_[o]={geom:new gn([]),text:s}}this.parallels_[o++]=a}return o},e.prototype.drawLabels_=function(t){var e=t.frameState.viewState.rotation,r=t.frameState.extent,n=ue(r),i=r;if(e){var o=ge(r),a=ce(r),s=Math.abs(Math.cos(e)),u=Math.abs(Math.sin(e)),l=(u*a-s*o)/(u*u-s*s),h=(u*o-s*a)/(u*u-s*s);i=[n[0]-l/2,n[1]-h/2,n[0]+l/2,n[1]+h/2]}var c=0,p=0,f=this.latLabelPosition_<.5,d=this.projection_.getExtent(),g=ge(d);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!Vt(d,r)&&(c=Math.floor((r[0]-d[0])/g),p=Math.ceil((r[2]-d[2])/g),f=f!==Math.abs(e)>Math.PI/2);for(var y=Ao(t),m=c;m<=p;++m){var 
 v=this.meridians_.length+this.parallels_.length,_=void 0,b=void 0,x=void 0,w=void 0;if(this.meridiansLabels_)for(b=0,x=this.meridiansLabels_.length;b<x;++b){var S=this.meridians_[b];if(e||0!==m)(T=S.clone()).translate(m*g,0),T.rotate(-e,n),(w=this.getMeridianPoint_(T,i,b)).rotate(e,n);else w=this.getMeridianPoint_(S,r,b);(_=this.featurePool_[v++]).setGeometry(w),_.set("graticule_label",this.meridiansLabels_[b].text),y.drawFeature(_,this.lonLabelStyle_(_))}if(this.parallelsLabels_&&(m===c&&f||m===p&&!f))for(b=0,x=this.parallels_.length;b<x;++b){var T;S=this.parallels_[b];if(e||0!==m)(T=S.clone()).translate(m*g,0),T.rotate(-e,n),(w=this.getParallelPoint_(T,i,b)).rotate(e,n);else w=this.getParallelPoint_(S,r,b);(_=this.featurePool_[v++]).setGeometry(w),_.set("graticule_label",this.parallelsLabels_[b].text),y.drawFeature(_,this.latLabelStyle_(_))}}},e.prototype.createGraticule_=function(t,e,r,n){var i=this.getInterval_(r);if(-1==i)return this.meridians_.length=0,this.parallels_.length=0
 ,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));var o=!1,a=this.projection_.getExtent(),s=ge(a);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!Vt(a,t)&&(ge(t)>=s?(t[0]=a[0],t[2]=a[2]):o=!0);var u=[we(e[0],this.minX_,this.maxX_),we(e[1],this.minY_,this.maxY_)],l=this.toLonLatTransform_(u);isNaN(l[1])&&(l[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);var h,c,p,f,d=we(l[0],this.minLon_,this.maxLon_),g=we(l[1],this.minLat_,this.maxLat_),y=this.maxLines_,m=t;o||(m=[we(t[0],this.minX_,this.maxX_),we(t[1],this.minY_,this.maxY_),we(t[2],this.minX_,this.maxX_),we(t[3],this.minY_,this.maxY_)]);var v=_e(m,this.toLonLatTransform_,void 0,8),_=v[3],b=v[2],x=v[1],w=v[0];if(o||(Yt(m,this.bottomLeft_)&&(w=this.minLon_,x=this.minLat_),Yt(m,this.bottomRight_)&&(b=this.maxLon_,x=this.minLat_),Yt(m,this.topLeft_)&&(w=this.minLon_,_=this.maxLat_),Yt(m,this.topRight_)&&(b=this.maxLon_,_=this.m
 axLat_),_=we(_,g,this.maxLat_),b=we(b,d,this.maxLon_),x=we(x,this.minLat_,g),w=we(w,this.minLon_,d)),f=we(d=Math.floor(d/i)*i,this.minLon_,this.maxLon_),c=this.addMeridian_(f,x,_,n,t,0),h=0,o)for(;(f-=i)>=w&&h++<y;)c=this.addMeridian_(f,x,_,n,t,c);else for(;f!=this.minLon_&&h++<y;)f=Math.max(f-i,this.minLon_),c=this.addMeridian_(f,x,_,n,t,c);if(f=we(d,this.minLon_,this.maxLon_),h=0,o)for(;(f+=i)<=b&&h++<y;)c=this.addMeridian_(f,x,_,n,t,c);else for(;f!=this.maxLon_&&h++<y;)f=Math.min(f+i,this.maxLon_),c=this.addMeridian_(f,x,_,n,t,c);for(this.meridians_.length=c,this.meridiansLabels_&&(this.meridiansLabels_.length=c),p=we(g=Math.floor(g/i)*i,this.minLat_,this.maxLat_),c=this.addParallel_(p,w,b,n,t,0),h=0;p!=this.minLat_&&h++<y;)p=Math.max(p-i,this.minLat_),c=this.addParallel_(p,w,b,n,t,c);for(p=we(g,this.minLat_,this.maxLat_),h=0;p!=this.maxLat_&&h++<y;)p=Math.min(p+i,this.maxLat_),c=this.addParallel_(p,w,b,n,t,c);this.parallels_.length=c,this.parallelsLabels_&&(this.parallelsLabels_
 .length=c)},e.prototype.getInterval_=function(t){for(var e=this.projectionCenterLonLat_[0],r=this.projectionCenterLonLat_[1],n=-1,i=Math.pow(this.targetSize_*t,2),o=[],a=[],s=0,u=this.intervals_.length;s<u;++s){var l=we(this.intervals_[s]/2,0,90),h=we(r,-90+l,90-l);if(o[0]=e-l,o[1]=h-l,a[0]=e+l,a[1]=h+l,this.fromLonLatTransform_(o,o),this.fromLonLatTransform_(a,a),Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)<=i)break;n=this.intervals_[s]}return n},e.prototype.getMeridian_=function(t,e,r,n,i){var o=function(t,e,r,n,i){return Od((function(n){return[t,e+(r-e)*n]}),Er(yr("EPSG:4326"),n),i)}(t,e,r,this.projection_,n),a=this.meridians_[i];return a?(a.setFlatCoordinates(pt,o),a.changed()):(a=new Cd(o,pt),this.meridians_[i]=a),a},e.prototype.getMeridianPoint_=function(t,e,r){var n=t.getFlatCoordinates(),i=1,o=n.length-1;n[i]>n[o]&&(i=o,o=1);var a=Math.max(e[1],n[i]),s=Math.min(e[3],n[o]),u=we(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,a,s),l=[n[i-1]+(n[o-1]-n[i-1])*(u-n[i])/(n[o]-n[i]),
 u],h=this.meridiansLabels_[r].geom;return h.setCoordinates(l),h},e.prototype.getMeridians=function(){return this.meridians_},e.prototype.getParallel_=function(t,e,r,n,i){var o=function(t,e,r,n,i){return Od((function(n){return[e+(r-e)*n,t]}),Er(yr("EPSG:4326"),n),i)}(t,e,r,this.projection_,n),a=this.parallels_[i];return a?(a.setFlatCoordinates(pt,o),a.changed()):a=new Cd(o,pt),a},e.prototype.getParallelPoint_=function(t,e,r){var n=t.getFlatCoordinates(),i=0,o=n.length-2;n[i]>n[o]&&(i=o,o=0);var a=Math.max(e[0],n[i]),s=Math.min(e[2],n[o]),u=we(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,a,s),l=[u,n[i+1]+(n[o+1]-n[i+1])*(u-n[i])/(n[o]-n[i])],h=this.parallelsLabels_[r].geom;return h.setCoordinates(l),h},e.prototype.getParallels=function(){return this.parallels_},e.prototype.updateProjectionInfo_=function(t){var e=yr("EPSG:4326"),r=t.getWorldExtent();this.maxLat_=r[3],this.maxLon_=r[2],this.minLat_=r[1],this.minLon_=r[0];var n=Er(t,e);if(this.minLon_<this.maxLon_)this.toLonLatTransfo
 rm_=n;else{var i=this.minLon_+this.maxLon_/2;this.maxLon_+=360,this.toLonLatTransform_=function(t,e,r){for(var o=r||2,a=n(t,e,o),s=0,u=a.length;s<u;s+=o)a[s]<i&&(a[s]+=360);return a}}this.fromLonLatTransform_=Er(e,t);var o=_e([this.minLon_,this.minLat_,this.maxLon_,this.maxLat_],this.fromLonLatTransform_,void 0,8);this.minX_=o[0],this.maxX_=o[2],this.minY_=o[1],this.maxY_=o[3],this.bottomLeft_=this.fromLonLatTransform_([this.minLon_,this.minLat_]),this.bottomRight_=this.fromLonLatTransform_([this.maxLon_,this.minLat_]),this.topLeft_=this.fromLonLatTransform_([this.minLon_,this.maxLat_]),this.topRight_=this.fromLonLatTransform_([this.maxLon_,this.maxLat_]),this.projectionCenterLonLat_=this.toLonLatTransform_(ue(t.getExtent())),isNaN(this.projectionCenterLonLat_[1])&&(this.projectionCenterLonLat_[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t},e}(Rd),Ad=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanc
 eof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),kd="blur",Nd="gradient",jd="radius",Gd=["#00f","#0ff","#0f0","#ff0","#f00"];var Dd=function(t){function e(e){var r=this,n=e||{},i=T({},n);delete i.gradient,delete i.radius,delete i.blur,delete i.weight,(r=t.call(this,i)||this).gradient_=null,r.addEventListener(et(Nd),r.handleGradientChanged_),r.setGradient(n.gradient?n.gradient:Gd),r.setBlur(void 0!==n.blur?n.blur:15),r.setRadius(void 0!==n.radius?n.radius:8);var o=n.weight?n.weight:"weight";return r.weightFunction_="string"==typeof o?function(t){return t.get(o)}:o,r.setRenderOrder(null),r}return Ad(e,t),e.prototype.getBlur=function(){return this.get(kd)},e.prototype.getGradient=function(){return this.get(Nd)},e.prototype.getRadius=function(){return this.get(jd)},e.prototype.handleGradientCha
 nged_=function(){this.gradient_=function(t){for(var e=Bi(1,256),r=e.createLinearGradient(0,0,1,256),n=1/(t.length-1),i=0,o=t.length;i<o;++i)r.addColorStop(i*n,t[i]);return e.fillStyle=r,e.fillRect(0,0,1,256),e.canvas}(this.getGradient())},e.prototype.setBlur=function(t){this.set(kd,t)},e.prototype.setGradient=function(t){this.set(Nd,t)},e.prototype.setRadius=function(t){this.set(jd,t)},e.prototype.createRenderer=function(){return new Of(this,{attributes:[{name:"weight",callback:function(t){var e=this.weightFunction_(t);return void 0!==e?we(e,0,1):1}.bind(this)}],vertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n       
    float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_weight = a_weight;\n        }",fragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_we
 ight;\n          gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n        }",hitVertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n        attribute vec4 a_hitColor;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float
  v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_hitColor = a_hitColor;\n          v_weight = a_weight;\n        }",hitFragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          if (alpha < 0.05) {\n            discard;\n          }\n\n          gl_FragColor = v_hitColor;\n        }",uniforms:{u_size:function(){return 2*(this.get(jd)+this.get(kd))}.bind(this),u_blurSlope:function(){return this.get(jd)/Math.max(1,this.get(kd))}.bind(this)},postProcesses:[{fragmentShader:"\n            precision mediump
  float;\n\n            uniform sampler2D u_image;\n            uniform sampler2D u_gradientTexture;\n\n            varying vec2 v_texCoord;\n\n            void main() {\n              vec4 color = texture2D(u_image, v_texCoord);\n              gl_FragColor.a = color.a;\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n              gl_FragColor.rgb *= gl_FragColor.a;\n            }",uniforms:{u_gradientTexture:function(){return this.gradient_}.bind(this)}}]})},e}(Rd),zd=function(){function t(){this.dataProjection=null,this.defaultFeatureProjection=null}return t.prototype.getReadOptions=function(t,e){var r;if(e){var n=e.dataProjection?yr(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()===_t.TILE_PIXELS&&(n=yr(n)).setWorldExtent(e.extent),r={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(r)},t.prototype.adaptOptions=function(t){return T({dataProjection:this.dataProjection,featureProjection:this.
 defaultFeatureProjection},t)},t.prototype.getType=function(){return n()},t.prototype.readFeature=function(t,e){return n()},t.prototype.readFeatures=function(t,e){return n()},t.prototype.readGeometry=function(t,e){return n()},t.prototype.readProjection=function(t){return n()},t.prototype.writeFeature=function(t,e){return n()},t.prototype.writeFeatures=function(t,e){return n()},t.prototype.writeGeometry=function(t,e){return n()},t}();function Ud(t,e,r){var n,i=r?yr(r.featureProjection):null,o=r?yr(r.dataProjection):null;if(n=i&&o&&!Sr(i,o)?(e?t.clone():t).transform(e?i:o,e?o:i):t,e&&r&&void 0!==r.decimals){var a=Math.pow(10,r.decimals);n===t&&(n=t.clone()),n.applyTransform((function(t){for(var e=0,r=t.length;e<r;++e)t[e]=Math.round(t[e]*a)/a;return t}))}return n}function Bd(t,e){var r=e?yr(e.featureProjection):null,n=e?yr(e.dataProjection):null;return r&&n&&!Sr(r,n)?Pr(t,n,r):t}var Yd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&functi
 on(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vd=function(t){function e(e,r,n){var i=t.call(this)||this;if(i.ends_=[],i.maxDelta_=-1,i.maxDeltaRevision_=-1,Array.isArray(e[0]))i.setCoordinates(e,r);else if(void 0!==r&&n)i.setFlatCoordinates(r,e),i.ends_=n;else{for(var o=i.getLayout(),a=e,s=[],u=[],l=0,h=a.length;l<h;++l){var c=a[l];0===l&&(o=c.getLayout()),m(s,c.getFlatCoordinates()),u.push(s.length)}i.setFlatCoordinates(o,s),i.ends_=u}return i}return Yd(e,t),e.prototype.appendLineString=function(t){this.flatCoordinates?m(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice())},e.prototype.close
 stPointXY=function(t,e,r,n){return n<Bt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Kr(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Jr(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,r,n))},e.prototype.getCoordinateAtM=function(t,e,r){if(this.layout!=dt&&this.layout!=gt||0===this.flatCoordinates.length)return null;var n=void 0!==e&&e,i=void 0!==r&&r;return function(t,e,r,n,i,o,a){if(a)return Td(t,e,r[r.length-1],n,i,o);var s;if(i<t[n-1])return o?((s=t.slice(0,n))[n-1]=i,s):null;if(t[t.length-1]<i)return o?((s=t.slice(t.length-n))[n-1]=i,s):null;for(var u=0,l=r.length;u<l;++u){var h=r[u];if(e!=h){if(i<t[e+n-1])return null;if(i<=t[h-1])return Td(t,e,h,n,i,!1);e=h}}return null}(this.flatCoordinates,0,this.ends_,this.stride,t,n,i)},e.prototype.getCoordinates=function(){return un(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.e
 nds_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new Cd(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,e=this.ends_,r=this.layout,n=[],i=0,o=0,a=e.length;o<a;++o){var s=e[o],u=new Cd(t.slice(i,s),r);n.push(u),i=s}return n},e.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,r=0,n=this.ends_,i=this.stride,o=0,a=n.length;o<a;++o){var s=n[o];m(t,Sd(e,r,s,i,.5)),r=s}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],n=[];return r.length=rn(this.flatCoordinates,0,this.ends_,this.stride,t,r,0,n),new e(r,pt,n)},e.prototype.getType=function(){return yt.MULTI_LINE_STRING},e.prototype.intersectsExtent=function(t){return function(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){if(wn(t,e,r[o],n,i))return!0;e=r[o]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setL
 ayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var r=tn(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===r.length?0:r[r.length-1],this.changed()},e}(qr),Wd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qd=function(t){function e(e,r){var n=t.call(this)||this;return r&&!Array.isArray(e[0])?n.setFlatCoordinates(r,e):n.setCoordinates(e,r),n}return Wd(e,t),e.prototype.appendPoint=function(t){this.flatCoordinates?m(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,n){if(n<Bt(this
 .getExtent(),t,e))return n;for(var i=this.flatCoordinates,o=this.stride,a=0,s=i.length;a<s;a+=o){var u=Ce(t,e,i[a],i[a+1]);if(u<n){n=u;for(var l=0;l<o;++l)r[l]=i[a+l];r.length=o}}return n},e.prototype.getCoordinates=function(){return sn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new gn(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,e=this.layout,r=this.stride,n=[],i=0,o=t.length;i<o;i+=r){var a=new gn(t.slice(i,i+r),e);n.push(a)}return n},e.prototype.getType=function(){return yt.MULTI_POINT},e.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,r=this.stride,n=0,i=e.length;n<i;n+=r){if(Wt(t,e[n],e[n+1]))return!0}return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),t
 his.flatCoordinates.length=Qr(this.flatCoordinates,0,t,this.stride),this.changed()},e}(qr);function Xd(t,e,r,n){for(var i=[],o=[1/0,1/0,-1/0,-1/0],a=0,s=r.length;a<s;++a){var u=r[a];o=Jt(t,e,u[0],n),i.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=u[u.length-1]}return i}var Zd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Kd=function(t){function e(e,r,n){var i=t.call(this)||this;if(i.endss_=[],i.flatInteriorPointsRevision_=-1,i.flatInteriorPoints_=null,i.maxDelta_=-1,i.maxDeltaRevision_=-1,i.orientedRevision_=-1,i.orientedFlatCoordinates_=null,!n&&!Array.isArray(e[0])){for(var o=i.getLayout(),a=e,s=[],u=[],l=0,h=a.length;l<h;++l){var c=a[l];0===l&&(o=c.getLayout());for(var p=s.length,f=c.getEnds(),d=0,g=f.length;d<g
 ;++d)f[d]+=p;m(s,c.getFlatCoordinates()),u.push(f)}r=o,e=s,n=u}return void 0!==r&&n?(i.setFlatCoordinates(r,e),i.endss_=n):i.setCoordinates(e,r),i}return Zd(e,t),e.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var r=this.flatCoordinates.length;m(this.flatCoordinates,t.getFlatCoordinates());for(var n=0,i=(e=t.getEnds().slice()).length;n<i;++n)e[n]+=r}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,r=new Array(t),n=0;n<t;++n)r[n]=this.endss_[n].slice();return new e(this.flatCoordinates.slice(),this.layout,r)},e.prototype.closestPointXY=function(t,e,r,n){return n<Bt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){var s=r[o];i=Kr(t,e,s,n,i),e=s[s.length-1]}return i}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDel
 taRevision_=this.getRevision()),function(t,e,r,n,i,o,a,s,u,l,h){for(var c=h||[NaN,NaN],p=0,f=r.length;p<f;++p){var d=r[p];l=Jr(t,e,d,n,i,o,a,s,u,l,c),e=d[d.length-1]}return l}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,r,n))},e.prototype.containsXY=function(t,e){return function(t,e,r,n,i,o){if(0===r.length)return!1;for(var a=0,s=r.length;a<s;++a){var u=r[a];if(vn(t,e,u,n,i,o))return!0;e=u[u.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},e.prototype.getArea=function(){return function(t,e,r,n){for(var i=0,o=0,a=r.length;o<a;++o){var s=r[o];i+=cn(t,e,s,n),e=s[s.length-1]}return i}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Rn(e=this.getOrientedFlatCoordinates().slice(),0,this.endss_,this.stride,t):e=this.flatCoordinates,ln(e,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteri
 orPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=Xd(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=bn(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new qd(this.getFlatInteriorPoints().slice(),dt)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;!function(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){var s=r[o];if(!Cn(t,e,s,n,i))return!1;s.length&&(e=s[s.length-1])}return!0}(t,0,this.endss_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Rn(this.orientedFlatCoordinates_,0,this.endss_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var
  r=[],n=[];return r.length=function(t,e,r,n,i,o,a,s){for(var u=0,l=r.length;u<l;++u){var h=r[u],c=[];a=an(t,e,h,n,i,o,a,c),s.push(c),e=h[h.length-1]}return a}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),r,0,n),new e(r,pt,n)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var r=this.endss_[t-1];e=r[r.length-1]}var n=this.endss_[t].slice(),i=n[n.length-1];if(0!==e)for(var o=0,a=n.length;o<a;++o)n[o]-=e;return new Ln(this.flatCoordinates.slice(e,i),this.layout,n)},e.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,r=this.endss_,n=[],i=0,o=0,a=r.length;o<a;++o){var s=r[o].slice(),u=s[s.length-1];if(0!==i)for(var l=0,h=s.length;l<h;++l)s[l]-=i;var c=new Ln(e.slice(i,u),t,s);n.push(c),i=u}return n},e.prototype.getType=function(){return yt.MULTI_POLYGON},e.prototype.intersectsExtent=function(t){return function(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){var s=r[o];if(Sn(t,e,s,n,i))return!0;e=s
 [s.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var r=function(t,e,r,n,i){for(var o=i||[],a=0,s=0,u=r.length;s<u;++s){var l=tn(t,e,r[s],n,o[a]);o[a++]=l,e=l[l.length-1]}return o.length=a,o}(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===r.length)this.flatCoordinates.length=0;else{var n=r[r.length-1];this.flatCoordinates.length=0===n.length?0:n[n.length-1]}this.changed()},e}(qr),Hd=r(5),Jd=r.n(Hd),$d=[1,0,0,1,0,0],Qd=function(){function t(t,e,r,n,i){this.extent_,this.id_=i,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r,this.properties_=n}return t.prototype.get=function(t){return this.properties_[t]},t.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===yt.POINT?Ht(this.flatCoordinates_):Jt(this.flatCoordinates_,0,this.flatCoordinates_.length,2
 )),this.extent_},t.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=ue(this.getExtent());this.flatInteriorPoints_=_n(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},t.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=Xd(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=bn(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},t.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=Sd(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},t.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,r=this.ends_,n=0,i=r.length;n<i;++n){var o=r[n],a=Sd(t,e,o,2,.5);m(this.flatMidpoints_,a),e=o}}return this.flatMidpoints_},t.prototype.getId=function(){return this.id_},t.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},t.protot
 ype.getGeometry=function(){return this},t.prototype.getSimplifiedGeometry=function(t){return this},t.prototype.simplifyTransformed=function(t,e){return this},t.prototype.getProperties=function(){return this.properties_},t.prototype.getStride=function(){return 2},t.prototype.getStyleFunction=function(){},t.prototype.getType=function(){return this.type_},t.prototype.transform=function(t,e){var r=(t=yr(t)).getExtent(),n=t.getWorldExtent(),i=ce(n)/ce(r);Ct($d,n[0],n[3],i,-i,0,0,0),Gr(this.flatCoordinates_,0,this.flatCoordinates_.length,2,$d,this.flatCoordinates_)},t.prototype.getEnds=function(){return this.ends_},t}();Qd.prototype.getEndss=Qd.prototype.getEnds,Qd.prototype.getFlatCoordinates=Qd.prototype.getOrientedFlatCoordinates;var tg=Qd,eg=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e
 }t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function rg(t,e,r){if(3===t){var n={keys:[],values:[],features:[]},i=r.readVarint()+r.pos;r.readFields(ng,n,i),n.length=n.features.length,n.length&&(e[n.name]=n)}}function ng(t,e,r){if(15===t)e.version=r.readVarint();else if(1===t)e.name=r.readString();else if(5===t)e.extent=r.readVarint();else if(2===t)e.features.push(r.pos);else if(3===t)e.keys.push(r.readString());else if(4===t){for(var n=null,i=r.readVarint()+r.pos;r.pos<i;)n=1===(t=r.readVarint()>>3)?r.readString():2===t?r.readFloat():3===t?r.readDouble():4===t?r.readVarint64():5===t?r.readVarint():6===t?r.readSVarint():7===t?r.readBoolean():null;e.values.push(n)}}function ig(t,e,r){if(1==t)e.id=r.readVarint();else if(2==t)for(var n=r.readVarint()+r.pos;r.pos<n;){var i=e.layer.keys[r.readVarint()],o=e.layer.values[r.readVarint()];e.properties[i]=o}else 3==t?e.type=r.readVarint():4==t&&(e.geometry=r.pos)}function og(t,e,r){t.pos=e.features[r];var n
 =t.readVarint()+t.pos,i={layer:e,type:0,properties:{}};return t.readFields(ig,i,n),i}var ag=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.dataProjection=new xe({code:"",units:_t.TILE_PIXELS}),r.featureClass_=n.featureClass?n.featureClass:tg,r.geometryName_=n.geometryName,r.layerName_=n.layerName?n.layerName:"layer",r.layers_=n.layers?n.layers:null,r.idProperty_=n.idProperty,r}return eg(e,t),e.prototype.readRawGeometry_=function(t,e,r,n){t.pos=e.geometry;for(var i=t.readVarint()+t.pos,o=1,a=0,s=0,u=0,l=0,h=0;t.pos<i;){if(!a){var c=t.readVarint();o=7&c,a=c>>3}a--,1===o||2===o?(s+=t.readSVarint(),u+=t.readSVarint(),1===o&&l>h&&(n.push(l),h=l),r.push(s,u),l+=2):7===o?l>h&&(r.push(r[h],r[h+1]),l+=2):lt(!1,59)}l>h&&(n.push(l),h=l)},e.prototype.createFeature_=function(t,e,r){var n,i=e.type;if(0===i)return null;var o,a=e.properties;this.idProperty_?(o=a[this.idProperty_],delete a[this.idProperty_]):o=e.id,a[this.layerName_]=e.layer.name;var s=[],u=[];this.readRawGeomet
 ry_(t,e,s,u);var l=function(t,e){var r;1===t?r=1===e?yt.POINT:yt.MULTI_POINT:2===t?r=1===e?yt.LINE_STRING:yt.MULTI_LINE_STRING:3===t&&(r=yt.POLYGON);return r}(i,u.length);if(this.featureClass_===tg)(n=new this.featureClass_(l,s,u,a,o)).transform(r.dataProjection,r.featureProjection);else{var h=void 0;if(l==yt.POLYGON){for(var c=[],p=0,f=0,d=0,g=u.length;d<g;++d){var y=u[d];if(En(s,p,y,2)){if(0===c.length)continue;c[c.length-1].push(u[f])}else c.push(u.slice(f,d+1));f=d+1,p=y}h=c.length>1?new Kd(s,pt,c):new Ln(s,pt,u)}else h=l===yt.POINT?new gn(s,pt):l===yt.LINE_STRING?new Cd(s,pt):l===yt.POLYGON?new Ln(s,pt,u):l===yt.MULTI_POINT?new qd(s,pt):l===yt.MULTI_LINE_STRING?new Vd(s,pt,u):null;n=new(0,this.featureClass_),this.geometryName_&&n.setGeometryName(this.geometryName_);var m=Ud(h,!1,r);n.setGeometry(m),n.setId(o),n.setProperties(a,!0)}return n},e.prototype.getType=function(){return yu},e.prototype.readFeatures=function(t,e){var r=this.layers_,n=this.adaptOptions(e),i=yr(n.dataProje
 ction);i.setWorldExtent(n.extent),n.dataProjection=i;var o=new Jd.a(t),a=o.readFields(rg,{}),s=[];for(var u in a)if(!r||-1!=r.indexOf(u)){var l=a[u],h=l?[0,0,l.extent,l.extent]:null;i.setExtent(h);for(var c=0,p=l.length;c<p;++c){var f=og(o,l,c);s.push(this.createFeature_(o,f,n))}}return s},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(zd),sg=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ug=function(t){function e(e){var r=this,n=e||{},i=T({},n);delete i.preload,delete i.useInterimTilesOnError,r=t.call(this,i)||this;var o=n.renderMode||md;return lt(null==o||o==yd||o==md||o==vd,28),r.renderMode_=o,r.setPreload(n.preload?n.preload:0),r.
 setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),r}return sg(e,t),e.prototype.createRenderer=function(){return new wd(this)},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderMode=function(){return this.renderMode_},e.prototype.getPreload=function(){return this.get(vp)},e.prototype.getUseInterimTilesOnError=function(){return this.get(_p)},e.prototype.setPreload=function(t){this.set(vp,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(_p,t)},e}(xf),lg=r(2),hg=r.n(lg),cg=r(0);function pg(t){return t*Math.PI/180}var fg=function(){for(var t=[],e=78271.51696402048;t.length<=24;e/=2)t.push(e);return t}();function dg(t,e){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,e);var r=document.createElement("canvas");return r.width=t,r.height=e,r}var gg,yg=Array(256).join(" ");function mg(t,e){if(e>=.
 05){for(var r="",n=t.split("\n"),i=yg.slice(0,Math.round(e/.1)),o=0,a=n.length;o<a;++o)o>0&&(r+="\n"),r+=n[o].split("").join(i);return r}return t}function vg(){return gg||(gg=dg(1,1).getContext("2d")),gg}function _g(t,e){return vg().measureText(t).width+(t.length-1)*e}var bg={};to&&W(to,M,(function(){bg={}}));var xg,wg,Sg=cg.e.isFunction,Tg=cg.e.convertFunction,Eg=cg.c.isExpression,Cg=cg.c.createPropertyExpression,Pg={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},Rg={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},Og={},Ig={zoom:0},Lg={};function Mg(t,e,r,n,i){var o=t.id;Lg[o]||(Lg[o]={});var a=Lg[o];if(!a[r]){var s=(t[e]||Og)[r],u=cg.f[e+"_"+t.type][r];void 0===s&&(s=u.default);var l=Eg(s);if(!l&&Sg(s)&&(s=Tg(s,u),l=!0),l){var h=function(t,e){var r=Cg(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "
 ));return r.value}(s,u);a[r]=h.evaluate.bind(h)}else"color"==u.type&&(s=cg.a.parse(s)),a[r]=function(){return s}}return Ig.zoom=n,a[r](Ig,i)}var Fg={};function Ag(t,e){if(t){if(0===t.a||0===e)return;var r=t.a;return e=void 0===e?1:e,"rgba("+Math.round(255*t.r/r)+","+Math.round(255*t.g/r)+","+Math.round(255*t.b/r)+","+r*e+")"}return t}var kg=/^([^]*)\{(.*)\}([^]*)$/;function Ng(t,e){var r;do{if(r=t.match(kg)){var n=e[r[2]]||"";t=r[1]+n+r[3]}}while(r);return t}var jg=function(t,e,r,n,i,o,a){if(void 0===n&&(n=fg),"string"==typeof e&&(e=JSON.parse(e)),8!=e.version)throw new Error("glStyle version 8 required.");var s,u;if(o)if("undefined"!=typeof Image){var l=new Image;l.crossOrigin="anonymous",l.onload=function(){s=l,u=[l.width,l.height],t.changed(),l.onload=null},l.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var h=self;h.postMessage({action:"loadImage",src:o}),h.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src
 ===o&&(s=t.data.image,u=[s.width,s.height])}))}for(var c,p=Object(cg.b)(e.layers),f={},d=[],g=0,y=p.length;g<y;++g){var m=p[g],v=m.id;if("string"==typeof r&&m.source==r||-1!==r.indexOf(v)){var _=m["source-layer"];if(!c){c=m.source;var b=e.sources[c];if(!b)throw new Error('Source "'+c+'" is not defined');var x=b.type;if("vector"!==x&&"geojson"!==x)throw new Error('Source "'+c+'" is not of type "vector" or "geojson", but "'+x+'"')}var w=f[_];w||(w=f[_]=[]),w.push({layer:m,index:g}),d.push(v)}delete Lg[v],delete Fg[v]}var S=new nh,T=new zl,E={},C={},P=[],R=function(t,e){var r=t.getProperties(),o=f[r.layer];if(o){var l=n.indexOf(e);-1==l&&(l=function(t,e){for(var r=0,n=e.length;r<n;++r){if(e[r]<t&&r+1<n){var i=e[r]/e[r+1];return r+Math.log(e[r]/t)/Math.log(i)}}return n-1}(e,n));for(var h=Pg[t.getGeometry().getType()],c={properties:r,type:h},p=-1,d=function(n,f){var d=o[n],g=d.layer,y=g.id,m=g.layout||Og,v=g.paint||Og;if("none"===m.visibility||"minzoom"in g&&l<g.minzoom||"maxzoom"in g&&l
 >=g.maxzoom)return"continue";var _=g.filter;if(!_||function(t,e,r,n){return t in Fg||(Fg[t]=Object(cg.d)(e).filter),Ig.zoom=n,Fg[t](Ig,r)}(y,_,c,l)){var b=void 0,x=void 0,w=void 0,R=void 0,O=void 0,I=void 0,L=d.index;if(3==h&&"fill"==g.type)if(x=Mg(g,"paint","fill-opacity",l,c),"fill-pattern"in v){var M=Mg(g,"paint","fill-pattern",l,c);if(M){var F="string"==typeof M?Ng(M,r):M.toString();if(s&&i&&i[F]){++p,(I=P[p])&&I.getFill()&&!I.getStroke()&&!I.getText()||(I=P[p]=new lh({fill:new zl})),w=I.getFill(),I.setZIndex(L);var A=C[ut=F+"."+x];if(!A)(ct=(ht=dg((lt=i[F]).width,lt.height)).getContext("2d")).globalAlpha=x,ct.drawImage(s,lt.x,lt.y,lt.width,lt.height,0,0,lt.width,lt.height),A=ct.createPattern(ht,"repeat"),C[ut]=A;w.setColor(A)}}}else(b=Ag(Mg(g,"paint","fill-color",l,c),x))&&("fill-outline-color"in v&&(O=Ag(Mg(g,"paint","fill-outline-color",l,c),x)),O||(O=b),++p,(I=P[p])&&I.getFill()&&I.getStroke()&&!I.getText()||(I=P[p]=new lh({fill:new zl,stroke:new nh})),(w=I.getFill()).setCol
 or(b),(R=I.getStroke()).setColor(O),R.setWidth(1),I.setZIndex(L));if(1!=h&&"line"==g.type){b=!("line-pattern"in v)&&"line-color"in v?Ag(Mg(g,"paint","line-color",l,c),Mg(g,"paint","line-opacity",l,c)):void 0;var k=Mg(g,"paint","line-width",l,c);b&&k>0&&(++p,(I=P[p])&&I.getStroke()&&!I.getFill()&&!I.getText()||(I=P[p]=new lh({stroke:new nh})),(R=I.getStroke()).setLineCap(Mg(g,"layout","line-cap",l,c)),R.setLineJoin(Mg(g,"layout","line-join",l,c)),R.setMiterLimit(Mg(g,"layout","line-miter-limit",l,c)),R.setColor(b),R.setWidth(k),R.setLineDash(v["line-dasharray"]?Mg(g,"paint","line-dasharray",l,c).map((function(t){return t*k})):null),I.setZIndex(L))}var N=!1,j=null,G=0,D=void 0,z=void 0,U=void 0;if((1==h||2==h)&&"icon-image"in m){var B=Mg(g,"layout","icon-image",l,c);if(B){D="string"==typeof B?Ng(B,r):B.toString();var Y=void 0;if(s&&i&&i[D]){var V=Mg(g,"layout","icon-rotation-alignment",l,c);if(2==h){var W=t.getGeometry();if(W.getFlatMidpoint||W.getFlatMidpoints){var q=W.getExtent();if
 (Math.sqrt(Math.max(Math.pow((q[2]-q[0])/e,2),Math.pow((q[3]-q[1])/e,2)))>150){var X="MultiLineString"===W.getType()?W.getFlatMidpoints():W.getFlatMidpoint();if(wg||(wg=new tg("Point",xg=[NaN,NaN],[],{},null)),Y=wg,xg[0]=X[0],xg[1]=X[1],"line"===(Lt=Mg(g,"layout","symbol-placement",l,c))&&"map"===V)for(var Z=W.getStride(),K=W.getFlatCoordinates(),H=0,J=K.length-Z;H<J;H+=Z){var $=K[H],Q=K[H+1],tt=K[H+Z],et=K[H+Z+1],rt=Math.min($,tt),nt=Math.min(Q,et),it=Math.max($,tt),ot=Math.max(Q,et);if(X[0]>=rt&&X[0]<=it&&X[1]>=nt&&X[1]<=ot){G=Math.atan2(Q-et,tt-$);break}}}}}if(2!==h||Y){++p,(I=P[p])&&I.getImage()&&!I.getFill()&&!I.getStroke()||(I=P[p]=new lh),I.setGeometry(Y);var at=Mg(g,"layout","icon-size",l,c),st=void 0!==v["icon-color"]?Mg(g,"paint","icon-color",l,c):null,ut=D+"."+at;if(null!==st&&(ut+="."+st),!(z=E[ut])){var lt=i[D];if(null!==st){var ht,ct;(ct=(ht=dg(lt.width,lt.height)).getContext("2d")).drawImage(s,lt.x,lt.y,lt.width,lt.height,0,0,lt.width,lt.height);for(var pt=ct.getImage
 Data(0,0,ht.width,ht.height),ft=0,dt=pt.data.length;ft<dt;ft+=4){var gt=st.a;0!==gt&&(pt.data[ft]=255*st.r/gt,pt.data[ft+1]=255*st.g/gt,pt.data[ft+2]=255*st.b/gt),pt.data[ft+3]=gt}ct.putImageData(pt,0,0),z=E[ut]=new rh({img:ht,imgSize:[ht.width,ht.height],scale:at/lt.pixelRatio})}else z=E[ut]=new rh({img:s,imgSize:u,size:[lt.width,lt.height],offset:[lt.x,lt.y],rotateWithView:"map"===V,scale:at/lt.pixelRatio})}z.setRotation(G+pg(Mg(g,"layout","icon-rotate",l,c))),z.setOpacity(Mg(g,"paint","icon-opacity",l,c)),z.setAnchor(Rg[Mg(g,"layout","icon-anchor",l,c)]),I.setImage(z),j=I.getText(),I.setText(void 0),I.setZIndex(L),N=!0,U=!1}else U=!0}}}if(1==h&&"circle-radius"in v){++p,(I=P[p])&&I.getImage()&&!I.getFill()&&!I.getStroke()||(I=P[p]=new lh);var yt=Mg(g,"paint","circle-radius",l,c),mt=Ag(Mg(g,"paint","circle-stroke-color",l,c),Mg(g,"paint","circle-stroke-opacity",l,c)),vt=Ag(Mg(g,"paint","circle-color",l,c),Mg(g,"paint","circle-opacity",l,c)),_t=Mg(g,"paint","circle-stroke-width",l,c
 ),bt=yt+"."+mt+"."+vt+"."+_t;(z=E[bt])||(z=E[bt]=new Dl({radius:yt,stroke:mt&&_t>0?new nh({width:_t,color:mt}):void 0,fill:vt?new zl({color:vt}):void 0})),I.setImage(z),j=I.getText(),I.setText(void 0),I.setGeometry(void 0),I.setZIndex(L),N=!0}var xt=void 0;if("text-field"in m)xt=Ng(Mg(g,"layout","text-field",l,c).toString(),r).trim(),x=Mg(g,"paint","text-opacity",l,c);if(xt&&x&&!U){N||(++p,(I=P[p])&&I.getText()&&!I.getFill()&&!I.getStroke()||(I=P[p]=new lh),I.setImage(void 0),I.setGeometry(void 0)),I.getText()||I.setText(j||new ph({padding:[2,2,2,2]})),j=I.getText();var wt=Math.round(Mg(g,"layout","text-size",l,c)),St=Mg(g,"layout","text-font",l,c),Tt=Mg(g,"layout","text-line-height",l,c),Et=hg()(a?a(St):St,wt,Tt),Ct=m["text-transform"];"uppercase"==Ct?xt=xt.toUpperCase():"lowercase"==Ct&&(xt=xt.toLowerCase());var Pt=Mg(g,"layout","text-max-width",l,c),Rt=Mg(g,"layout","text-letter-spacing",l,c),Ot=2==h?mg(xt,Rt):function t(e,r,n,i){if(-1!==e.indexOf("\n")){for(var o=e.split("\n"),a
 =[],s=0,u=o.length;s<u;++s)a.push(t(o[s],r,n,i));return a.join("\n")}var l=n+","+r+","+e+","+i,h=bg[l];if(!h){var c=e.split(" ");if(c.length>1){var p=vg();p.font=r;var f=p.measureText("M").width*n,d="";for(a=[],s=0,u=c.length;s<u;++s){var g=c[s],y=d+(d?" ":"")+g;_g(y,i)<=f?d=y:(d&&a.push(d),d=g)}d&&a.push(d);for(s=0;s<a.length;++s){var m=a[s];if(_g(m,i)<.35*f){var v=s>0?_g(a[s-1],i):1/0,_=s<a.length-1?_g(a[s+1],i):1/0;a.splice(s,1),v<_?(a[s-1]+=" "+m,s-=1):a[s]=m+" "+a[s]}}for(s=0,u=a.length-1;s<u;++s){var b=a[s],x=a[s+1];if(_g(b,i)>.7*f&&_g(x,i)<.6*f){var w=b.split(" "),S=w.pop();_g(S,i)<.2*f&&(a[s]=w.join(" "),a[s+1]=S+" "+x),u-=1}}h=a.join("\n")}else h=e;h=mg(h,i),bg[l]=h}return h}(xt,Et,Pt,Rt);j.setText(Ot),j.setFont(Et),j.setRotation(pg(Mg(g,"layout","text-rotate",l,c)));var It=Mg(g,"layout","text-anchor",l,c),Lt=N||1==h?"point":Mg(g,"layout","symbol-placement",l,c);j.setPlacement(Lt);var Mt=Mg(g,"paint","text-halo-width",l,c),Ft=Mg(g,"layout","text-offset",l,c),At=Mg(g,"paint"
 ,"text-translate",l,c),kt=0,Nt=0;if("point"==Lt){var jt="center";-1!==It.indexOf("left")?(jt="left",Nt=Mt):-1!==It.indexOf("right")&&(jt="right",Nt=-Mt),j.setTextAlign(jt);var Gt=Mg(g,"layout","text-rotation-alignment",l,c);j.setRotateWithView("map"==Gt)}else j.setMaxAngle(pg(Mg(g,"layout","text-max-angle",l,c))*xt.length/Ot.length),j.setTextAlign(),j.setRotateWithView(!1);var Dt="middle";0==It.indexOf("bottom")?(Dt="bottom",kt=-Mt-.5*(Tt-1)*wt):0==It.indexOf("top")&&(Dt="top",kt=Mt+.5*(Tt-1)*wt),j.setTextBaseline(Dt),j.setOffsetX(Ft[0]*wt+Nt+At[0]),j.setOffsetY(Ft[1]*wt+kt+At[1]),T.setColor(Ag(Mg(g,"paint","text-color",l,c),x)),j.setFill(T);var zt=Ag(Mg(g,"paint","text-halo-color",l,c),x);if(zt){S.setColor(zt),Mt*=2;var Ut=.5*wt;S.setWidth(Mt<=Ut?Mt:Ut),j.setStroke(S)}else j.setStroke(void 0);var Bt=Mg(g,"layout","text-padding",l,c),Yt=j.getPadding();Bt!==Yt[0]&&(Yt[0]=Yt[1]=Yt[2]=Yt[3]=Bt),I.setZIndex(L)}}},g=0,y=o.length;g<y;++g)d(g);return p>-1?(P.length=p+1,P):void 0}};return t
 .setStyle(R),t.set("mapbox-source",c),t.set("mapbox-layers",d),R},Gg=r(6),Dg=r.n(Gg),zg=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Ug(t){for(var e=[],r=0,n=t.length;r<n;++r)e.push(t[r].clone());return e}var Bg=function(t){function e(e){var r=t.call(this)||this;return r.geometries_=e||null,r.changeEventsKeys_=[],r.listenGeometriesChange_(),r}return zg(e,t),e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(X),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(W(this.geometries_[t],I,this.changed,this))},e.prototype.clone=function(){var t=new e(n
 ull);return t.setGeometries(this.geometries_),t},e.prototype.closestPointXY=function(t,e,r,n){if(n<Bt(this.getExtent(),t,e))return n;for(var i=this.geometries_,o=0,a=i.length;o<a;++o)n=i[o].closestPointXY(t,e,r,n);return n},e.prototype.containsXY=function(t,e){for(var r=this.geometries_,n=0,i=r.length;n<i;++n)if(r[n].containsXY(t,e))return!0;return!1},e.prototype.computeExtent=function(t){Kt(t);for(var e=this.geometries_,r=0,n=e.length;r<n;++r)Qt(t,e[r].getExtent());return t},e.prototype.getGeometries=function(){return Ug(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],e=this.geometries_,r=0,n=e.length;r<n;++r)e[r].getType()===this.getType()?t=t.concat(e[r].getGeometriesArrayRecursive()):t.push(e[r]);return t},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometry
 Revision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var r=[],n=this.geometries_,i=!1,o=0,a=n.length;o<a;++o){var s=n[o],u=s.getSimplifiedGeometry(t);r.push(u),u!==s&&(i=!0)}if(i){var l=new e(null);return l.setGeometriesArray(r),l}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return yt.GEOMETRY_COLLECTION},e.prototype.intersectsExtent=function(t){for(var e=this.geometries_,r=0,n=e.length;r<n;++r)if(e[r].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return 0===this.geometries_.length},e.prototype.rotate=function(t,e){for(var r=this.geometries_,n=0,i=r.length;n<i;++n)r[n].rotate(t,e);this.changed()},e.prototype.scale=function(t,e,r){var n=r;n||(n=ue(this.getExtent()));for(var i=this.geometries_,o=0,a=i.length;o<a;++o)i[o].scale(t,e,n);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(Ug(t))},e.
 prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var e=this.geometries_,r=0,n=e.length;r<n;++r)e[r].applyTransform(t);this.changed()},e.prototype.translate=function(t,e){for(var r=this.geometries_,n=0,i=r.length;n<i;++n)r[n].translate(t,e);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},e}(Yr),Yg=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Vg(t){if("string"==typeof t){var e=JSON.parse(t);return e||null}return null!==t?t:null}var Wg=function(t){function e(){return t.call(this)||this}re
 turn Yg(e,t),e.prototype.getType=function(){return mu},e.prototype.readFeature=function(t,e){return this.readFeatureFromObject(Vg(t),this.getReadOptions(t,e))},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(Vg(t),this.getReadOptions(t,e))},e.prototype.readFeatureFromObject=function(t,e){return n()},e.prototype.readFeaturesFromObject=function(t,e){return n()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(Vg(t),this.getReadOptions(t,e))},e.prototype.readGeometryFromObject=function(t,e){return n()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(Vg(t))},e.prototype.readProjectionFromObject=function(t){return n()},e.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},e.prototype.writeFeatureObject=function(t,e){return n()},e.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},e.prototype.writeFeaturesObject=function(t,e){return 
 n()},e.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},e.prototype.writeGeometryObject=function(t,e){return n()},e}(zd),qg=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Xg(t,e){if(!t)return null;var r;switch(t.type){case yt.POINT:r=function(t){return new gn(t.coordinates)}(t);break;case yt.LINE_STRING:r=function(t){return new Cd(t.coordinates)}(t);break;case yt.POLYGON:r=function(t){return new Ln(t.coordinates)}(t);break;case yt.MULTI_POINT:r=function(t){return new qd(t.coordinates)}(t);break;case yt.MULTI_LINE_STRING:r=function(t){return new Vd(t.coordinates)}(t);break;case yt.MULTI_POLYGON:r=function(t){return new Kd(t.coordinates)}(t);break;case yt.G
 EOMETRY_COLLECTION:r=function(t,e){var r=t.geometries.map((function(t){return Xg(t,e)}));return new Bg(r)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return Ud(r,!1,e)}function Zg(t,e){var r,n=(t=Ud(t,!0,e)).getType();switch(n){case yt.POINT:r=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case yt.LINE_STRING:r=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case yt.POLYGON:r=function(t,e){var r;e&&(r=e.rightHanded);return{type:"Polygon",coordinates:t.getCoordinates(r)}}(t,e);break;case yt.MULTI_POINT:r=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case yt.MULTI_LINE_STRING:r=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case yt.MULTI_POLYGON:r=function(t,e){var r;e&&(r=e.rightHanded);return{type:"MultiPolygon",coordinates:t.getCoordinates(r)}}(t,e);break;case yt.GEOMETRY_COLLECTION:r=function(t,e){return{type:"GeometryCo
 llection",geometries:t.getGeometriesArray().map((function(t){var r=T({},e);return delete r.featureProjection,Zg(t,r)}))}}(t,e);break;case yt.CIRCLE:r={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+n)}return r}var Kg,Hg=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this)||this).dataProjection=yr(n.dataProjection?n.dataProjection:"EPSG:4326"),n.featureProjection&&(r.defaultFeatureProjection=yr(n.featureProjection)),r.geometryName_=n.geometryName,r.extractGeometryName_=n.extractGeometryName,r}return qg(e,t),e.prototype.readFeatureFromObject=function(t,e){var r=null,n=Xg((r="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e),i=new ct;return this.geometryName_?i.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in r!==void 0&&i.setGeometryName(r.geometry_name),i.setGeometry(n),"id"in r&&i.setId(r.id),r.properties&&i.setProperties(r.properties,!0),i},e.prototype.read
 FeaturesFromObject=function(t,e){var r=null;if("FeatureCollection"===t.type){r=[];for(var n=t.features,i=0,o=n.length;i<o;++i)r.push(this.readFeatureFromObject(n[i],e))}else r=[this.readFeatureFromObject(t,e)];return r},e.prototype.readGeometryFromObject=function(t,e){return Xg(t,e)},e.prototype.readProjectionFromObject=function(t){var e,r=t.crs;return r?"name"==r.type?e=yr(r.properties.name):"EPSG"===r.type?e=yr("EPSG:"+r.properties.code):lt(!1,36):e=this.dataProjection,e},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var r={type:"Feature",geometry:null,properties:null},n=t.getId();if(void 0!==n&&(r.id=n),!t.hasProperties())return r;var i=t.getProperties(),o=t.getGeometry();return o&&(r.geometry=Zg(o,e),delete i[t.getGeometryName()]),P(i)||(r.properties=i),r},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var r=[],n=0,i=t.length;n<i;++n)r.push(this.writeFeatureObject(t[n],e));return{type:"FeatureCollection",features:r}},e.prototype.wr
 iteGeometryObject=function(t,e){return Zg(t,this.adaptOptions(e))},e}(Wg),Jg=/font-family: ?([^;]*);/,$g=/("|')/g;function Qg(t){if(!Kg){Kg={};for(var e=document.styleSheets,r=0,n=e.length;r<n;++r){var i=e[r];try{var o=i.rules||i.cssRules;if(o)for(var a=0,s=o.length;a<s;++a){var u=o[a];if(5==u.type){var l=u.cssText.match(Jg);Kg[l[1].replace($g,"")]=!0}}}catch(t){}}}return t in Kg}var ty={},ey=Dg.a.getNames();function ry(t){var e=t.toString();if(e in ty)return t;for(var r=t.map((function(t){var e=hg()(t,1).split(" ");return[e.slice(3).join(" ").replace(/"/g,""),e[1]+e[0]]})),n=0,i=r.length;n<i;++n){var o=r[n],a=o[0];if(!Qg(a)&&-1!==ey.indexOf(a)){var s="https://fonts.googleapis.com/css?family="+a.replace(/ /g,"+")+":"+o[1];if(!document.querySelector('link[href="'+s+'"]')){var u=document.createElement("link");u.href=s,u.rel="stylesheet",document.head.appendChild(u)}}}return ty[e]=!0,t}var ny=/^(.*)(\?.*)$/;function iy(t,e){return e&&0===t.indexOf(".")&&(t=e+t),t}function oy(t,e,r){var
  n=(t=iy(t,e)).match(ny);return n?n[1]+r+(n.length>2?n[2]:""):t+r}function ay(t,e,r,n,i){return new Promise((function(o,a){if("object"!=typeof e&&(e=JSON.parse(e)),8!=e.version)return a(new Error("glStyle version 8 required."));if(!(t instanceof Rd||t instanceof ug))return a(new Error("Can only apply to VectorLayer or VectorTileLayer"));var s,u,l;function h(){l||e.sprite&&!s?l?(t.setStyle(l),o()):a(new Error("Something went wrong trying to apply style.")):(l=jg(t,e,r,i,s,u,ry),t.getStyle()?o():a(new Error("Nothing to show for source ["+r+"]")))}if(e.sprite){var c=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",p=oy(e.sprite,n,c+".json");fetch(p,{credentials:"same-origin"}).then((function(t){return t.ok||""===c?t:(p=oy(e.sprite,n,".json"),fetch(p,{credentials:"same-origin"}))})).then((function(t){if(t.ok)return t.json();a(new Error("Problem fetching sprite from "+p+": "+t.statusText))})).then((function(t){if(void 0===t||0===Object.keys(t).length)return a(new Error("No sprites found.
 "));s=t,u=oy(e.sprite,n,c+".png"),h()})).catch((function(t){a(new Error("Sprites cannot be loaded: "+p+": "+t.message))}))}else h()}))}new Hg;var sy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function uy(t){return 0!==t.indexOf("mapbox://")?"":t.slice("mapbox://".length)}var ly=function(t){function e(e){var r=t.call(this,L)||this;return r.error=e,r}return sy(e,t),e}(h),hy="vector",cy=function(t){function e(e){var r=this,n=!("declutter"in e)||e.declutter,i=new ff({state:Ci,format:new ag});return(r=t.call(this,{source:i,declutter:n,className:e.className,opacity:e.opacity,visible:e.visible,zIndex:e.zIndex,minResolution:e.minResolution,maxResolution:e.maxResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,rende
 rOrder:e.renderOrder,renderBuffer:e.renderBuffer,renderMode:e.renderMode,map:e.map,updateWhileAnimating:e.updateWhileAnimating,updateWhileInteracting:e.updateWhileInteracting,preload:e.preload,useInterimTilesOnError:e.useInterimTilesOnError})||this).sourceId=e.source,r.layers=e.layers,r.accessToken=e.accessToken,r.fetchStyle(e.styleUrl),r}return sy(e,t),e.prototype.fetchStyle=function(t){var e=this,r=function(t,e){var r=uy(t);if(!r)return t;if(0!==r.indexOf("styles/"))throw new Error("unexpected style url: "+t);return"https://api.mapbox.com/styles/v1/"+r.slice("styles/".length)+"?&access_token="+e}(t,this.accessToken);fetch(r).then((function(t){if(!t.ok)throw new Error("unexpected response when fetching style: "+t.status);return t.json()})).then((function(t){e.onStyleLoad(t)})).catch((function(t){e.handleError(t)}))},e.prototype.onStyleLoad=function(t){var e,r,n=this;if(this.layers){for(var i={},o=0;o<t.layers.length;++o){var a=t.layers[o];a.source&&(i[a.id]=a.source)}var s=void 0;f
 or(o=0;o<this.layers.length;++o){var u=i[this.layers[o]];if(!u)return void this.handleError(new Error("could not find source for "+this.layers[o]));if(s){if(s!==u)return void this.handleError(new Error("layers can only use a single source, found "+s+" and "+u))}else s=u}e=s,r=this.layers}else r=e=this.sourceId;r||(r=e=Object.keys(t.sources)[0]),t.sprite&&(t.sprite=function(t,e){var r=uy(t);if(!r)return t;if(0!==r.indexOf("sprites/"))throw new Error("unexpected sprites url: "+t);return"https://api.mapbox.com/styles/v1/"+r.slice("sprites/".length)+"/sprite?access_token="+e}(t.sprite,this.accessToken)),t.glyphs&&(t.glyphs=function(t,e){var r=uy(t);if(!r)return t;if(0!==r.indexOf("fonts/"))throw new Error("unexpected fonts url: "+t);return"https://api.mapbox.com/fonts/v1/"+r.slice("fonts/".length)+"/0-255.pbf?access_token="+e}(t.glyphs,this.accessToken));var l=t.sources[e];if(l.type===hy){var h,c,p,f=this.getSource();f.setUrl((h=l.url,c=this.accessToken,(p=uy(h))?"https://{a-d}.tiles.ma
 pbox.com/v4/"+p+"/{z}/{x}/{y}.vector.pbf?access_token="+c:h)),ay(this,t,r).then((function(){f.setState(Pi)})).catch((function(t){n.handleError(t)}))}else this.handleError(new Error("only works for vector sources, found "+l.type))},e.prototype.handleError=function(t){this.dispatchEvent(new ly(t)),this.getSource().setState(Ri)},e}(ug),py=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fy=function(t){function e(e){var r=this,n=e||{},i=T({},n);return delete i.imageRatio,(r=t.call(this,i)||this).imageRatio_=void 0!==n.imageRatio?n.imageRatio:1,r}return py(e,t),e.prototype.getImageRatio=function(){return this.imageRatio_},e.prototype.createRenderer=function(){return new gd(this)},e}(xf),dy=function(){var t=functi
 on(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gy="addfeatures",yy=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.features=n,o.file=r,o.projection=i,o}return dy(e,t),e}(h),my=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{handleEvent:x})||this).formatConstructors_=n.formatConstructors?n.formatConstructors:[],r.projection_=n.projection?yr(n.projection):null,r.dropListenKeys_=null,r.source_=n.source||null,r.target=n.target?n.target:null,r}return dy(e,t),e.prototype.handleResult_=function(t,e){var r=e.target.result,n=this.getMap(),i=this.projection_;i||(i=n.getView().getProjection());for(var o=this.formatConstructors_,a=0,s=o.length;a<s;++a){var u=new o[a],l=this.tryReadFeatures_(u,r,{featur
 eProjection:i});if(l&&l.length>0){this.source_&&(this.source_.clear(),this.source_.addFeatures(l)),this.dispatchEvent(new yy(gy,t,l,i));break}}},e.prototype.registerListeners_=function(){var t=this.getMap();if(t){var e=this.target?this.target:t.getViewport();this.dropListenKeys_=[W(e,G,this.handleDrop,this),W(e,N,this.handleStop,this),W(e,j,this.handleStop,this),W(e,G,this.handleStop,this)]}},e.prototype.setActive=function(e){!this.getActive()&&e&&this.registerListeners_(),this.getActive()&&!e&&this.unregisterListeners_(),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.unregisterListeners_(),t.prototype.setMap.call(this,e),this.getActive()&&this.registerListeners_()},e.prototype.tryReadFeatures_=function(t,e,r){try{return t.readFeatures(e,r)}catch(t){return null}},e.prototype.unregisterListeners_=function(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(X),this.dropListenKeys_=null)},e.prototype.handleDrop=function(t){for(var e=t.dataTransfer.files,r=0,n
 =e.length;r<n;++r){var i=e.item(r),o=new FileReader;o.addEventListener(U,this.handleResult_.bind(this,i)),o.readAsText(i)}},e.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},e}(es),vy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_y=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).condition_=n.condition?n.condition:ms,r.lastAngle_=void 0,r.lastMagnitude_=void 0,r.lastScaleDelta_=0,r.duration_=void 0!==n.duration?n.duration:400,r}return vy(e,t),e.prototype.handleDragEvent=function(t){if(_s(t)){var e=t.map,r=e.getSize(),n=t.pixel,i=n[0]-r[0]/2,o=r[1]/2-n[1],a=Math.atan2(o,i),s=Math.sqrt(i*i+o*o),u=e.getView();if(void 0!==th
 is.lastAngle_){var l=this.lastAngle_-a;u.adjustRotationInternal(l)}this.lastAngle_=a,void 0!==this.lastMagnitude_&&u.adjustResolutionInternal(this.lastMagnitude_/s),void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/s),this.lastMagnitude_=s}},e.prototype.handleUpEvent=function(t){if(!_s(t))return!0;var e=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,r),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return!!_s(t)&&(!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0))},e}(as),by=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),xy=function(t){function e(e,r,n){var i=t.call(
 this)||this;if(void 0!==n&&void 0===r)i.setFlatCoordinates(n,e);else{var o=r||0;i.setCenterAndRadius(e,o,n)}return i}return by(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),void 0,this.layout)},e.prototype.closestPointXY=function(t,e,r,n){var i=this.flatCoordinates,o=t-i[0],a=e-i[1],s=o*o+a*a;if(s<n){if(0===s)for(var u=0;u<this.stride;++u)r[u]=i[u];else{var l=this.getRadius()/Math.sqrt(s);r[0]=i[0]+l*o,r[1]=i[1]+l*a;for(u=2;u<this.stride;++u)r[u]=i[u]}return r.length=this.stride,s}return n},e.prototype.containsXY=function(t,e){var r=this.flatCoordinates,n=t-r[0],i=e-r[1];return n*n+i*i<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,r=e[this.stride]-e[0];return Zt(e[0]-r,e[1]-r,e[0]+r,e[1]+r,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCo
 ordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return yt.CIRCLE},e.prototype.intersectsExtent=function(t){if(ye(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||ie(t,this.intersectsCoordinate.bind(this)))}return!1},e.prototype.setCenter=function(t){var e=this.stride,r=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+r;for(var i=1;i<e;++i)n[e+i]=t[i];this.setFlatCoordinates(this.layout,n),this.changed()},e.prototype.setCenterAndRadius=function(t,e,r){this.setLayout(r,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var n=this.flatCoordinates,i=$r(n,0,t,this.stride);n[i++]=n[0]+e;for(var o=1,a=this.stride;o<a;++o)n[i++]=n[o];n.length=i,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.
 stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,e){var r=this.getCenter(),n=this.getStride();this.setCenter(Dr(r,0,r.length,n,t,e,r)),this.changed()},e.prototype.translate=function(t,e){var r=this.getCenter(),n=this.getStride();this.setCenter(zr(r,0,r.length,n,t,e,r)),this.changed()},e}(qr);xy.prototype.transform;var wy=xy,Sy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ty="Point",Ey="LineString",Cy="Polygon",Py="Circle",Ry="drawstart",Oy="drawend",Iy="drawabort",Ly=function(t){function e(e,r){var n=t.call(this,e)||this;return n.feature=r,n}return Sy(e,t),e}(h);var My=function(t){function e(e){var r=this,n=e;n.stopDown||(n.stopDown=w),(r=t.call(this,n)||this).shouldHandle_
 =!1,r.downPx_=null,r.downTimeout_,r.lastDragTime_,r.freehand_=!1,r.source_=e.source?e.source:null,r.features_=e.features?e.features:null,r.snapTolerance_=e.snapTolerance?e.snapTolerance:12,r.type_=e.type,r.mode_=function(t){var e;t===yt.POINT||t===yt.MULTI_POINT?e=Ty:t===yt.LINE_STRING||t===yt.MULTI_LINE_STRING?e=Ey:t===yt.POLYGON||t===yt.MULTI_POLYGON?e=Cy:t===yt.CIRCLE&&(e=Py);return e}(r.type_),r.stopClick_=!!e.stopClick,r.minPoints_=e.minPoints?e.minPoints:r.mode_===Cy?3:2,r.maxPoints_=e.maxPoints?e.maxPoints:1/0,r.finishCondition_=e.finishCondition?e.finishCondition:x;var i,o=e.geometryFunction;if(!o)if(r.type_===yt.CIRCLE)o=function(t,e,r){var n=e||new wy([NaN,NaN]),i=Ar(t[0],r),o=sr(i,Ar(t[1],r));n.setCenterAndRadius(i,Math.sqrt(o));var a=Mr();return a&&n.transform(r,a),n};else{var a,s=r.mode_;s===Ty?a=gn:s===Ey?a=Cd:s===Cy&&(a=Ln),o=function(t,e,r){var n=e;return n?s===Cy?t[0].length?n.setCoordinates([t[0].concat([t[0][0]])]):n.setCoordinates([]):n.setCoordinates(t):n=new a(
 t),n}}return r.geometryFunction_=o,r.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,r.finishCoordinate_=null,r.sketchFeature_=null,r.sketchPoint_=null,r.sketchCoords_=null,r.sketchLine_=null,r.sketchLineCoords_=null,r.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,r.overlay_=new Rd({source:new cc({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:(i=sh(),function(t,e){return i[t.getGeometry().getType()]}),updateWhileInteracting:!0}),r.geometryName_=e.geometryName,r.condition_=e.condition?e.condition:ys,r.freehandCondition_,e.freehand?r.freehandCondition_=ps:r.freehandCondition_=e.freehandCondition?e.freehandCondition:ms,r.addEventListener(et($a),r.updateState_),r}return Sy(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(e){e.originalEvent.type===F&&e.preventDefault(),this.freehand_=this.mo
 de_!==Ty&&this.freehandCondition_(e);var r=e.type===Ho.POINTERMOVE,n=!0;!this.freehand_&&this.lastDragTime_&&e.type===Ho.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,r=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0));return this.freehand_&&e.type===Ho.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),n=!1):this.freehand_&&e.type===Ho.POINTERDOWN?n=!1:r?(n=e.type===Ho.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.preventDefault()):("mouse"==e.originalEvent.pointerType||e.type===Ho.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===Ho.DBLCLICK&&(n=!1),t.prototype.handleEvent.call(this,e)&&n},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.
 startDrawing_(t),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new Ko(Ho.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var e=!0;this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t);var r=this.mode_===Py;return this.shouldHandle_?(this.finishCoordinate_?this.freehand_||r?this.finishDrawing():this.atFinish_(t)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate):(this.startDrawing_(t),this.mode_===Ty&&this.finishDrawing()),e=!1):this.freehand_&&this.abortDrawing(),!e&&this.stopClick_&&t.stopPropagation(),e},e.prototype.handlePointerMove_=function(t){if(this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,r=t.pixel,n=e[0]-r[0],i=e[1]-r[1],o=n*n+i*i;
 if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t):this.createOrUpdateSketchPoint_(t)},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var r=!1,n=[this.finishCoordinate_];if(this.mode_===Ey)r=this.sketchCoords_.length>this.minPoints_;else if(this.mode_===Cy){var i=this.sketchCoords_;r=i[0].length>this.minPoints_,n=[i[0][0],i[0][i[0].length-2]]}if(r)for(var o=t.map,a=0,s=n.length;a<s;a++){var u=n[a],l=o.getPixelFromCoordinate(u),h=t.pixel,c=h[0]-l[0],p=h[1]-l[1],f=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(c*c+p*p)<=f){this.finishCoordinate_=u;break}}}return e},e.prototype.createOrUpdateSketchPoint_=function(t){var e=t.coordinate.slice();this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(e):(this.sketchPoint_=new ct(new gn(e)),this.updateSketchFeatures_())},e.prototype.startDrawing_=function(t){var e=t.coordinate,r=t.map.get
 View().getProjection();this.finishCoordinate_=e,this.mode_===Ty?this.sketchCoords_=e.slice():this.mode_===Cy?(this.sketchCoords_=[[e.slice(),e.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[e.slice(),e.slice()],this.sketchLineCoords_&&(this.sketchLine_=new ct(new Cd(this.sketchLineCoords_)));var n=this.geometryFunction_(this.sketchCoords_,void 0,r);this.sketchFeature_=new ct,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(n),this.updateSketchFeatures_(),this.dispatchEvent(new Ly(Ry,this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var e,r,n,i=t.coordinate,o=this.sketchFeature_.getGeometry(),a=t.map.getView().getProjection();(this.mode_===Ty?r=this.sketchCoords_:this.mode_===Cy?(r=(e=this.sketchCoords_[0])[e.length-1],this.atFinish_(t)&&(i=this.finishCoordinate_.slice())):r=(e=this.sketchCoords_)[e.length-1],r[0]=i[0],r[1]=i[1],this.geometryFunction_(this.sketchCoords_,o,a),this.sketc
 hPoint_)&&this.sketchPoint_.getGeometry().setCoordinates(i);if(o.getType()==yt.POLYGON&&this.mode_!==Cy){this.sketchLine_||(this.sketchLine_=new ct);var s=o.getLinearRing(0);(n=this.sketchLine_.getGeometry())?(n.setFlatCoordinates(s.getLayout(),s.getFlatCoordinates()),n.changed()):(n=new Cd(s.getFlatCoordinates(),s.getLayout()),this.sketchLine_.setGeometry(n))}else this.sketchLineCoords_&&(n=this.sketchLine_.getGeometry()).setCoordinates(this.sketchLineCoords_);this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var e,r,n=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection();this.mode_===Ey?(this.finishCoordinate_=t.slice(),(r=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?r.pop():e=!0),r.push(t.slice()),this.geometryFunction_(r,n,i)):this.mode_===Cy&&((r=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?r.pop():e=!0),r.push(t.slice()),e&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,n,i)),th
 is.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),r=this.getMap().getView().getProjection();this.mode_===Ey?((t=this.sketchCoords_).splice(-2,1),this.geometryFunction_(t,e,r),t.length>=2&&(this.finishCoordinate_=t[t.length-2].slice())):this.mode_===Cy&&((t=this.sketchCoords_[0]).splice(-2,1),this.sketchLine_.getGeometry().setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,r)),0===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,r=t.getGeometry(),n=this.getMap().getView().getProjection();this.mode_===Ey?(e.pop(),this.geometryFunction_(e,r,n)):this.mode_===Cy&&(e[0].pop(),this.geometryFunction_(e,r,n),e=r.getCoordinates()),this.type_===yt.MULTI_POINT?t.setGeometry(new qd([e])):this.type_===yt.MULTI_LINE_STRING?t.setGeometry(new Vd([e])):this.type_===yt.MULTI_POLYG
 ON&&t.setGeometry(new Kd([e])),this.dispatchEvent(new Ly(Oy,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new Ly(Iy,t))},e.prototype.appendCoordinates=function(t){var e=this.mode_,r=[];e===Ey?r=this.sketchCoords_:e===Cy&&(r=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]);for(var n=r.pop(),i=0;i<t.length;i++)this.addToDrawing_(t[i]);this.addToDrawing_(n)},e.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var r=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=r.slice(),this.sketchCoords_.push(r.slice()),this.updateSketchFeatures_(),this.dispatchEvent(n
 ew Ly(Ry,this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)},e}(as),Fy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ay="extentchanged",ky=function(t){function e(e){var r=t.call(this,Ay)||this;return r.extent=e,r}return Fy(e,t),e}(h);function Ny(){var t=sh();return function(e,r){return t[yt.POINT]}}function jy(t){return function(e){return Dt([t,e])}}funct
 ion Gy(t,e){return t[0]==e[0]?function(r){return Dt([t,[r[0],e[1]]])}:t[1]==e[1]?function(r){return Dt([t,[e[0],r[1]]])}:null}var Dy=function(t){function e(e){var r,n=this,i=e||{};return(n=t.call(this,i)||this).condition_=i.condition?i.condition:ps,n.extent_=null,n.pointerHandler_=null,n.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10,n.snappedToVertex_=!1,n.extentFeature_=null,n.vertexFeature_=null,e||(e={}),n.extentOverlay_=new Rd({source:new cc({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.boxStyle?e.boxStyle:(r=sh(),function(t,e){return r[yt.POLYGON]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),n.vertexOverlay_=new Rd({source:new cc({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.pointerStyle?e.pointerStyle:Ny(),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.extent&&n.setExtent(e.extent),n}return Fy(e,t),e.prototype.snapToVertex_=function(t,e){var r=e.getCoordinateFromPixelInternal(t),n=this.getExtentInternal();if(n){var i=function(t){return[[[t[0],t[
 1]],[t[0],t[3]]],[[t[0],t[3]],[t[2],t[3]]],[[t[2],t[3]],[t[2],t[1]]],[[t[2],t[1]],[t[0],t[1]]]]}(n);i.sort((function(t,e){return lr(r,t)-lr(r,e)}));var o=i[0],a=er(r,o),s=e.getPixelFromCoordinateInternal(a);if(ur(t,s)<=this.pixelTolerance_){var u=e.getPixelFromCoordinateInternal(o[0]),l=e.getPixelFromCoordinateInternal(o[1]),h=sr(s,u),c=sr(s,l),p=Math.sqrt(Math.min(h,c));return this.snappedToVertex_=p<=this.pixelTolerance_,this.snappedToVertex_&&(a=h>c?o[1]:o[0]),a}}return null},e.prototype.handlePointerMove_=function(t){var e=t.pixel,r=t.map,n=this.snapToVertex_(e,r);n||(n=r.getCoordinateFromPixelInternal(e)),this.createOrUpdatePointerFeature_(n)},e.prototype.createOrUpdateExtentFeature_=function(t){var e=this.extentFeature_;return e?t?e.setGeometry(Fn(t)):e.setGeometry(void 0):(e=new ct(t?Fn(t):{}),this.extentFeature_=e,this.extentOverlay_.getSource().addFeature(e)),e},e.prototype.createOrUpdatePointerFeature_=function(t){var e=this.vertexFeature_;e?e.getGeometry().setCoordinates(
 t):(e=new ct(new gn(t)),this.vertexFeature_=e,this.vertexOverlay_.getSource().addFeature(e));return e},e.prototype.handleEvent=function(e){return!e.originalEvent||!this.condition_(e)||(e.type!=Ho.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),t.prototype.handleEvent.call(this,e),!1)},e.prototype.handleDownEvent=function(t){var e=t.pixel,r=t.map,n=this.getExtentInternal(),i=this.snapToVertex_(e,r),o=function(t){var e=null,r=null;return t[0]==n[0]?e=n[2]:t[0]==n[2]&&(e=n[0]),t[1]==n[1]?r=n[3]:t[1]==n[3]&&(r=n[1]),null!==e&&null!==r?[e,r]:null};if(i&&n){var a=i[0]==n[0]||i[0]==n[2]?i[0]:null,s=i[1]==n[1]||i[1]==n[3]?i[1]:null;null!==a&&null!==s?this.pointerHandler_=jy(o(i)):null!==a?this.pointerHandler_=Gy(o([a,n[1]]),o([a,n[3]])):null!==s&&(this.pointerHandler_=Gy(o([n[0],s]),o([n[2],s])))}else i=r.getCoordinateFromPixelInternal(e),this.setExtent([i[0],i[1],i[0],i[1]]),this.pointerHandler_=jy(i);return!0},e.prototype.handleDragEvent=function(t){if(this.pointerHan
 dler_){var e=t.coordinate;this.setExtent(this.pointerHandler_(e)),this.createOrUpdatePointerFeature_(e)}},e.prototype.handleUpEvent=function(t){this.pointerHandler_=null;var e=this.getExtentInternal();return e&&0!==oe(e)||this.setExtent(null),!1},e.prototype.setMap=function(e){this.extentOverlay_.setMap(e),this.vertexOverlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getExtent=function(){return kr(this.getExtentInternal(),this.getMap().getView().getProjection())},e.prototype.getExtentInternal=function(){return this.extent_},e.prototype.setExtent=function(t){this.extent_=t||null,this.createOrUpdateExtentFeature_(t),this.dispatchEvent(new ky(this.extent_))},e}(as),zy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.pr
 ototype,new n)}}(),Uy=[0,0,0,0],By=[],Yy="modifystart",Vy="modifyend",Wy=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.features=r,i.mapBrowserEvent=n,i}return zy(e,t),e}(h);function qy(t,e){return t.index-e.index}function Xy(t,e,r){var n=e.geometry;if(n.getType()===yt.CIRCLE){var i=n;if(1===e.index){var o=Mr();o&&(i=i.clone().transform(o,r));var a=sr(i.getCenter(),Ar(t,r)),s=Math.sqrt(a)-i.getRadius();return s*s}}var u=Ar(t,r);return By[0]=Ar(e.segment[0],r),By[1]=Ar(e.segment[1],r),lr(u,By)}function Zy(t,e,r){var n=e.geometry;if(n.getType()===yt.CIRCLE&&1===e.index){var i=n,o=Mr();return o&&(i=i.clone().transform(o,r)),Fr(i.getClosestPoint(Ar(t,r)),r)}var a=Ar(t,r);return By[0]=Ar(e.segment[0],r),By[1]=Ar(e.segment[1],r),Fr(er(a,By),r)}var Ky=function(t){function e(e){var r,n,i=t.call(this,e)||this;if(i.boundHandleFeatureChange_=i.handleFeatureChange_.bind(i),i.condition_=e.condition?e.condition:bs,i.defaultDeleteCondition_=function(t){return us(t)&&gs(t)},i.del
 eteCondition_=e.deleteCondition?e.deleteCondition:i.defaultDeleteCondition_,i.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:ps,i.vertexFeature_=null,i.vertexSegments_=null,i.lastPixel_=[0,0],i.ignoreNextSingleClick_=!1,i.modified_=!1,i.rBush_=new ic,i.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,i.snappedToVertex_=!1,i.changingFeature_=!1,i.dragSegments_=[],i.overlay_=new Rd({source:new cc({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:(r=sh(),function(t,e){return r[yt.POINT]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),i.SEGMENT_WRITERS_={Point:i.writePointGeometry_.bind(i),LineString:i.writeLineStringGeometry_.bind(i),LinearRing:i.writeLineStringGeometry_.bind(i),Polygon:i.writePolygonGeometry_.bind(i),MultiPoint:i.writeMultiPointGeometry_.bind(i),MultiLineString:i.writeMultiLineStringGeometry_.bind(i),MultiPolygon:i.writeMultiPolygonGeometry_.bind(i),Circle:i.writeCircleGeometry_.bind(i),GeometryCollection:i.writeGeo
 metryCollectionGeometry_.bind(i)},i.source_=null,e.source?(i.source_=e.source,n=new ut(i.source_.getFeatures()),i.source_.addEventListener(oc,i.handleSourceAdd_.bind(i)),i.source_.addEventListener(uc,i.handleSourceRemove_.bind(i))):n=e.features,!n)throw new Error("The modify interaction requires features or a source");return i.features_=n,i.features_.forEach(i.addFeature_.bind(i)),i.features_.addEventListener(nt,i.handleFeatureAdd_.bind(i)),i.features_.addEventListener(it,i.handleFeatureRemove_.bind(i)),i.lastPointerEvent_=null,i}return zy(e,t),e.prototype.addFeature_=function(t){var e=t.getGeometry();if(e){var r=this.SEGMENT_WRITERS_[e.getType()];r&&r(t,e)}var n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener(I,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t){this.modified_||(this.modified_=!0,this.dispatchEvent(new Wy(Yy,this.features_,t)))},e.prototype.removeFeature_=function(t){this.r
 emoveFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(I,this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var e=this.rBush_,r=[];e.forEach((function(e){t===e.feature&&r.push(e)}));for(var n=r.length-1;n>=0;--n){for(var i=r[n],o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===i&&this.dragSegments_.splice(o,1);e.remove(i)}},e.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.overlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove
 (t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var e=t.target;this.removeFeature_(e),this.addFeature_(e)}},e.prototype.handleFeatureRemove_=function(t){var e=t.element;this.removeFeature_(e)},e.prototype.writePointGeometry_=function(t,e){var r=e.getCoordinates(),n={feature:t,geometry:e,segment:[r,r]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writeMultiPointGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n){var o=r[n],a={feature:t,geometry:e,depth:[n],index:n,segment:[o,o]};this.rBush_.insert(e.getExtent(),a)}},e.prototype.writeLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length-1;n<i;++n){var o=r.slice(n,n+2),a={feature:t,geometry:e,index:n,segment:o};this.rBush_.insert(Dt(o),a)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length-1
 ;a<s;++a){var u=o.slice(a,a+2),l={feature:t,geometry:e,depth:[n],index:a,segment:u};this.rBush_.insert(Dt(u),l)}},e.prototype.writePolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length-1;a<s;++a){var u=o.slice(a,a+2),l={feature:t,geometry:e,depth:[n],index:a,segment:u};this.rBush_.insert(Dt(u),l)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length;a<s;++a)for(var u=o[a],l=0,h=u.length-1;l<h;++l){var c=u.slice(l,l+2),p={feature:t,geometry:e,depth:[a,n],index:l,segment:c};this.rBush_.insert(Dt(c),p)}},e.prototype.writeCircleGeometry_=function(t,e){var r=e.getCenter(),n={feature:t,geometry:e,index:0,segment:[r,r]},i={feature:t,geometry:e,index:1,segment:[r,r]},o=[n,i];n.featureSegments=o,i.featureSegments=o,this.rBush_.insert(Ht(r),n);var a=e,s=Mr();if(s&&this.getMap()){var u=this.getMap().getView().getProjection();a=An(a=a.clone().transform(s,
 u)).transform(u,s)}this.rBush_.insert(a.getExtent(),i)},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var r=e.getGeometriesArray(),n=0;n<r.length;++n){var i=r[n];(0,this.SEGMENT_WRITERS_[i.getType()])(t,i)}},e.prototype.createOrUpdateVertexFeature_=function(t){var e=this.vertexFeature_;e?e.getGeometry().setCoordinates(t):(e=new ct(new gn(t)),this.vertexFeature_=e,this.overlay_.getSource().addFeature(e));return e},e.prototype.handleEvent=function(e){return!e.originalEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=Ho.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(r=!(e.type!=Ho.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==Ho.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),t.prototype.handleEvent.call(this,e)&&!r);var r},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t);for(var e=t.coordinate,r=0,n=th
 is.dragSegments_.length;r<n;++r){for(var i=this.dragSegments_[r],o=i[0],a=o.depth,s=o.geometry,u=void 0,l=o.segment,h=i[1];e.length<s.getStride();)e.push(l[h][e.length]);switch(s.getType()){case yt.POINT:u=e,l[0]=e,l[1]=e;break;case yt.MULTI_POINT:(u=s.getCoordinates())[o.index]=e,l[0]=e,l[1]=e;break;case yt.LINE_STRING:(u=s.getCoordinates())[o.index+h]=e,l[h]=e;break;case yt.MULTI_LINE_STRING:case yt.POLYGON:(u=s.getCoordinates())[a[0]][o.index+h]=e,l[h]=e;break;case yt.MULTI_POLYGON:(u=s.getCoordinates())[a[1]][a[0]][o.index+h]=e,l[h]=e;break;case yt.CIRCLE:if(l[0]=e,l[1]=e,0===o.index)this.changingFeature_=!0,s.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0;var c=t.map.getView().getProjection(),p=ur(Ar(s.getCenter(),c),Ar(e,c)),f=Mr();if(f){var d=s.clone().transform(f,c);d.setRadius(p),p=d.transform(c,f).getRadius()}s.setRadius(p),this.changingFeature_=!1}}u&&this.setGeometryCoordinates_(s,u)}this.createOrUpdateVertexFeature_(e)},e.prototype.handleDownEvent=f
 unction(t){if(!this.condition_(t))return!1;var e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.modified_=!1;var r=this.vertexFeature_;if(r){var n=t.map.getView().getProjection(),i=[],a=r.getGeometry().getCoordinates(),s=Dt([a]),u=this.rBush_.getInExtent(s),l={};u.sort(qy);for(var h=0,c=u.length;h<c;++h){var p=u[h],f=p.segment,d=o(p.geometry),g=p.depth;if(g&&(d+="-"+g.join("-")),l[d]||(l[d]=new Array(2)),p.geometry.getType()!==yt.CIRCLE||1!==p.index)if(!ir(f[0],a)||l[d][0])if(!ir(f[1],a)||l[d][1])o(f)in this.vertexSegments_&&!l[d][0]&&!l[d][1]&&this.insertVertexCondition_(t)&&i.push([p,a]);else{if((p.geometry.getType()===yt.LINE_STRING||p.geometry.getType()===yt.MULTI_LINE_STRING)&&l[d][0]&&0===l[d][0].index)continue;this.dragSegments_.push([p,1]),l[d][1]=p}else this.dragSegments_.push([p,0]),l[d][0]=p;else ir(Zy(e,p,n),a)&&!l[d][0]&&(this.dragSegments_.push([p,0]),l[d][0]=p)}i.length&&this.willModifyFeatures_(t);for(var y=i.length-1;y>=0;-
 -y)this.insertVertex_.apply(this,i[y])}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var e=this.dragSegments_.length-1;e>=0;--e){var r=this.dragSegments_[e][0],n=r.geometry;if(n.getType()===yt.CIRCLE){var i=n.getCenter(),o=r.featureSegments[0],a=r.featureSegments[1];o.segment[0]=i,o.segment[1]=i,a.segment[0]=i,a.segment[1]=i,this.rBush_.update(Ht(i),o);var s=n,u=Mr();if(u){var l=t.map.getView().getProjection();s=An(s=s.clone().transform(u,l)).transform(l,u)}this.rBush_.update(s.getExtent(),a)}else this.rBush_.update(Dt(r.segment),r)}return this.modified_&&(this.dispatchEvent(new Wy(Vy,this.features_,t)),this.modified_=!1),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,e,r){var n=r||e.getCoordinateFromPixel(t),i=e.getView().getProjection(),a=kr(zt(Nr(Ht(n,Uy),i),e.getView().getResolution()*this.pixelTolerance_,Uy),i),s=this.rBush_.getIn
 Extent(a);if(s.length>0){s.sort((function(t,e){return Xy(n,t,i)-Xy(n,e,i)}));var u=s[0],l=u.segment,h=Zy(n,u,i),c=e.getPixelFromCoordinate(h),p=ur(t,c);if(p<=this.pixelTolerance_){var f={};if(u.geometry.getType()===yt.CIRCLE&&1===u.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h);else{var d=e.getPixelFromCoordinate(l[0]),g=e.getPixelFromCoordinate(l[1]),y=sr(c,d),m=sr(c,g);p=Math.sqrt(Math.min(y,m)),this.snappedToVertex_=p<=this.pixelTolerance_,this.snappedToVertex_&&(h=y>m?l[1]:l[0]),this.createOrUpdateVertexFeature_(h);for(var v=1,_=s.length;v<_;++v){var b=s[v].segment;if(!(ir(l[0],b[0])&&ir(l[1],b[1])||ir(l[0],b[1])&&ir(l[1],b[0])))break;f[o(b)]=!0}}return f[o(l)]=!0,void(this.vertexSegments_=f)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,e){for(var r,n=t.segment,i=t.feature,o=t.geometry,a=t.depth,s=t.index;e.length<o.getStride();)e.push(0);switch(o.getType()
 ){case yt.MULTI_LINE_STRING:case yt.POLYGON:(r=o.getCoordinates())[a[0]].splice(s+1,0,e);break;case yt.MULTI_POLYGON:(r=o.getCoordinates())[a[1]][a[0]].splice(s+1,0,e);break;case yt.LINE_STRING:(r=o.getCoordinates()).splice(s+1,0,e);break;default:return}this.setGeometryCoordinates_(o,r);var u=this.rBush_;u.remove(t),this.updateSegmentIndices_(o,s,a,1);var l={segment:[n[0],e],feature:i,geometry:o,depth:a,index:s};u.insert(Dt(l.segment),l),this.dragSegments_.push([l,1]);var h={segment:[e,n[1]],feature:i,geometry:o,depth:a,index:s+1};u.insert(Dt(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Ho.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t);var e=this.removeVertex_();return this.dispatchEvent(new Wy(Vy,this.features_,t)),this.modified_=!1,e}return!1},e.prototype.removeVertex_=function(){var t,e,r,n,i,a,s,u,l,h,c,p=this.dragSegments_,f={},d=!1;f
 or(i=p.length-1;i>=0;--i)c=o((h=(r=p[i])[0]).feature),h.depth&&(c+="-"+h.depth.join("-")),c in f||(f[c]={}),0===r[1]?(f[c].right=h,f[c].index=h.index):1==r[1]&&(f[c].left=h,f[c].index=h.index+1);for(c in f){switch(l=f[c].right,s=f[c].left,(u=(a=f[c].index)-1)<0&&(u=0),t=e=(n=(h=void 0!==s?s:l).geometry).getCoordinates(),d=!1,n.getType()){case yt.MULTI_LINE_STRING:e[h.depth[0]].length>2&&(e[h.depth[0]].splice(a,1),d=!0);break;case yt.LINE_STRING:e.length>2&&(e.splice(a,1),d=!0);break;case yt.MULTI_POLYGON:t=t[h.depth[1]];case yt.POLYGON:(t=t[h.depth[0]]).length>4&&(a==t.length-1&&(a=0),t.splice(a,1),d=!0,0===a&&(t.pop(),t.push(t[0]),u=t.length-1))}if(d){this.setGeometryCoordinates_(n,e);var g=[];if(void 0!==s&&(this.rBush_.remove(s),g.push(s.segment[0])),void 0!==l&&(this.rBush_.remove(l),g.push(l.segment[1])),void 0!==s&&void 0!==l){var y={depth:h.depth,feature:h.feature,geometry:h.geometry,index:u,segment:g};this.rBush_.insert(Dt(y.segment),y)}this.updateSegmentIndices_(n,a,h.depth
 ,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),p.length=0}}return d},e.prototype.setGeometryCoordinates_=function(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,e,r,n){this.rBush_.forEachInExtent(t.getExtent(),(function(i){i.geometry===t&&(void 0===r||void 0===i.depth||_(i.depth,r))&&i.index>e&&(i.index+=n)}))},e}(as),Hy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jy="select",$y=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.selected=r,o.deselected=n,o.mapBrowserEvent=i,o}return Hy(e,t),e}(h),Qy={};var tm=function(t){function e(e){var r,n,i=t.c
 all(this)||this,o=e||{};if(i.boundAddFeature_=i.addFeature_.bind(i),i.boundRemoveFeature_=i.removeFeature_.bind(i),i.condition_=o.condition?o.condition:gs,i.addCondition_=o.addCondition?o.addCondition:ds,i.removeCondition_=o.removeCondition?o.removeCondition:ds,i.toggleCondition_=o.toggleCondition?o.toggleCondition:ms,i.multi_=!!o.multi&&o.multi,i.filter_=o.filter?o.filter:x,i.hitTolerance_=o.hitTolerance?o.hitTolerance:0,i.style_=void 0!==o.style?o.style:(m((r=sh())[yt.POLYGON],r[yt.LINE_STRING]),m(r[yt.GEOMETRY_COLLECTION],r[yt.LINE_STRING]),function(t){return t.getGeometry()?r[t.getGeometry().getType()]:null}),i.features_=o.features||new ut,o.layers)if("function"==typeof o.layers)n=o.layers;else{var a=o.layers;n=function(t){return d(a,t)}}else n=x;return i.layerFilter_=n,i.featureLayerAssociation_={},i}return Hy(e,t),e.prototype.addFeatureLayerAssociation_=function(t,e){this.featureLayerAssociation_[o(t)]=e},e.prototype.getFeatures=function(){return this.features_},e.prototype.ge
 tHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[o(t)]},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),t.prototype.setMap.call(this,e),e?(this.features_.addEventListener(nt,this.boundAddFeature_),this.features_.addEventListener(it,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(nt,this.boundAddFeature_),this.features_.removeEventListener(it,this.boundRemoveFeature_))},e.prototype.addFeature_=function(t){var e=t.element;this.style_&&this.applySelectedStyle_(e)},e.prototype.removeFeature_=function(t){var e=t.element;this.style_&&this.restorePreviousStyle_(e)},e.prototype.getStyle=function(){return this.style_},e.prototype.applySelectedStyle_=function(t){var e=o(t);e in Qy||(Qy[e]=t.getStyle())
 ,t.setStyle(this.style_)},e.prototype.restorePreviousStyle_=function(t){var r=o(t),n=this.getMap().getInteractions().getArray().filter((function(r){return r instanceof e&&r.getStyle()&&-1!==r.getFeatures().getArray().indexOf(t)}));n.length>0?t.setStyle(n[n.length-1].getStyle()):(t.setStyle(Qy[r]),delete Qy[r])},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[o(t)]},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var e=this.addCondition_(t),r=this.removeCondition_(t),n=this.toggleCondition_(t),i=!e&&!r&&!n,o=t.map,a=this.getFeatures(),s=[],u=[];if(i){E(this.featureLayerAssociation_),o.forEachFeatureAtPixel(t.pixel,function(t,e){if(this.filter_(t,e))return u.push(t),this.addFeatureLayerAssociation_(t,e),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var l=a.getLength()-1;l>=0;--l){var h=a.item(l),c=u.indexOf(h);c>-1?u.splice(c,1):(a.remove(h),s.push(h))}0!==u.length&&a.extend
 (u)}else{o.forEachFeatureAtPixel(t.pixel,function(t,i){if(this.filter_(t,i))return!e&&!n||d(a.getArray(),t)?(r||n)&&d(a.getArray(),t)&&(s.push(t),this.removeFeatureLayerAssociation_(t)):(u.push(t),this.addFeatureLayerAssociation_(t,i)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var p=s.length-1;p>=0;--p)a.remove(s[p]);a.extend(u)}return(u.length>0||s.length>0)&&this.dispatchEvent(new $y(Jy,u,s,t)),!0},e}(es),em=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function rm(t){return t.feature?t.feature:t.element?t.element:void 0}var nm=[],im=function(t){function e(e){var r=this,n=e||{},i=n;return i.handleDownEvent||(i.handleDownEvent=x),i.stopDown||(i.stopDown
 =w),(r=t.call(this,i)||this).source_=n.source?n.source:null,r.vertex_=void 0===n.vertex||n.vertex,r.edge_=void 0===n.edge||n.edge,r.features_=n.features?n.features:null,r.featuresListenerKeys_=[],r.featureChangeListenerKeys_={},r.indexedFeaturesExtents_={},r.pendingFeatures_={},r.pixelTolerance_=void 0!==n.pixelTolerance?n.pixelTolerance:10,r.rBush_=new ic,r.SEGMENT_WRITERS_={Point:r.writePointGeometry_.bind(r),LineString:r.writeLineStringGeometry_.bind(r),LinearRing:r.writeLineStringGeometry_.bind(r),Polygon:r.writePolygonGeometry_.bind(r),MultiPoint:r.writeMultiPointGeometry_.bind(r),MultiLineString:r.writeMultiLineStringGeometry_.bind(r),MultiPolygon:r.writeMultiPolygonGeometry_.bind(r),GeometryCollection:r.writeGeometryCollectionGeometry_.bind(r),Circle:r.writeCircleGeometry_.bind(r)},r}return em(e,t),e.prototype.addFeature=function(t,e){var r=void 0===e||e,n=o(t),i=t.getGeometry();if(i){var a=this.SEGMENT_WRITERS_[i.getType()];a&&(this.indexedFeaturesExtents_[n]=i.getExtent([1/
 0,1/0,-1/0,-1/0]),a(t,i))}r&&(this.featureChangeListenerKeys_[n]=W(t,I,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(e){var r=this.snapTo(e.pixel,e.coordinate,e.map);return r.snapped&&(e.coordinate=r.vertex.slice(0,2),e.pixel=r.vertexPixel),t.prototype.handleEvent.call(this,e)},e.prototype.handleFeatureAdd_=function(t){var e=rm(t);this.addFeature(e)},e.prototype.handleFeatureRemove_=function(t){var e=rm(t);this.removeFeature(e)},e.prototype.handleFeatureChange_=function(t){var e=t.target;if(this.handlingDownUpSequence){var r=o(e);r in this.pendingFeatures_||(this.pendingFeatures_[r]=e)}else this.updateFeature_(e)},e.prototype.handleUpEvent=function(t){var e=C(this.pendingFeatures_);return e.length&&(e.forE
 ach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,e){var r=void 0===e||e,n=o(t),i=this.indexedFeaturesExtents_[n];if(i){var a=this.rBush_,s=[];a.forEachInExtent(i,(function(e){t===e.feature&&s.push(e)}));for(var u=s.length-1;u>=0;--u)a.remove(s[u])}r&&(X(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])},e.prototype.setMap=function(e){var r=this.getMap(),n=this.featuresListenerKeys_,i=this.getFeatures_();r&&(n.forEach(X),n.length=0,i.forEach(this.forEachFeatureRemove_.bind(this))),t.prototype.setMap.call(this,e),e&&(this.features_?n.push(W(this.features_,nt,this.handleFeatureAdd_,this),W(this.features_,it,this.handleFeatureRemove_,this)):this.source_&&n.push(W(this.source_,oc,this.handleFeatureAdd_,this),W(this.source_,uc,this.handleFeatureRemove_,this)),i.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,e,r){var n=Dt([r.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+
 this.pixelTolerance_]),r.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_])]),i=this.rBush_.getInExtent(n);this.vertex_&&!this.edge_&&(i=i.filter((function(t){return t.feature.getGeometry().getType()!==yt.CIRCLE})));var o=!1,a=null,s=null;if(0===i.length)return{snapped:o,vertex:a,vertexPixel:s};for(var u,l=r.getView().getProjection(),h=Ar(e,l),c=1/0,p=0;p<i.length;++p){var f=i[p];nm[0]=Ar(f.segment[0],l),nm[1]=Ar(f.segment[1],l);var d=lr(h,nm);d<c&&(u=f,c=d)}var g=u.segment;if(this.vertex_&&!this.edge_){var y=r.getPixelFromCoordinate(g[0]),m=r.getPixelFromCoordinate(g[1]),v=sr(t,y),_=sr(t,m);Math.sqrt(Math.min(v,_))<=this.pixelTolerance_&&(o=!0,a=v>_?g[1]:g[0],s=r.getPixelFromCoordinate(a))}else if(this.edge_){var b=u.feature.getGeometry().getType()===yt.CIRCLE;if(b){var x=u.feature.getGeometry(),w=Mr();w&&(x=x.clone().transform(w,l)),a=Fr(function(t,e){var r=e.getRadius(),n=e.getCenter(),i=n[0],o=n[1],a=t[0]-i,s=t[1]-o;0===a&&0===s&&(a=1);var u=Math.sqrt(
 a*a+s*s);return[i+r*a/u,o+r*s/u]}(h,x),l)}else nm[0]=Ar(g[0],l),nm[1]=Ar(g[1],l),a=Fr(er(h,nm),l);if(ur(t,s=r.getPixelFromCoordinate(a))<=this.pixelTolerance_&&(o=!0,this.vertex_&&!b)){y=r.getPixelFromCoordinate(g[0]),m=r.getPixelFromCoordinate(g[1]),v=sr(s,y),_=sr(s,m);Math.sqrt(Math.min(v,_))<=this.pixelTolerance_&&(a=v>_?g[1]:g[0],s=r.getPixelFromCoordinate(a))}}return o&&(s=[Math.round(s[0]),Math.round(s[1])]),{snapped:o,vertex:a,vertexPixel:s}},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.writeCircleGeometry_=function(t,e){var r=this.getMap().getView().getProjection(),n=e,i=Mr();i&&(n=n.clone().transform(i,r));var o=An(n);i&&o.transform(r,i);for(var a=o.getCoordinates()[0],s=0,u=a.length-1;s<u;++s){var l=a.slice(s,s+2),h={feature:t,segment:l};this.rBush_.insert(Dt(l),h)}},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var r=e.getGeometriesArray(),n=0;n<r.length;++n){var i=this.SEGMENT_WRITERS_[r[n].getType()]
 ;i&&i(t,r[n])}},e.prototype.writeLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length-1;n<i;++n){var o=r.slice(n,n+2),a={feature:t,segment:o};this.rBush_.insert(Dt(o),a)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length-1;a<s;++a){var u=o.slice(a,a+2),l={feature:t,segment:u};this.rBush_.insert(Dt(u),l)}},e.prototype.writeMultiPointGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n){var o=r[n],a={feature:t,segment:[o,o]};this.rBush_.insert(e.getExtent(),a)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length;a<s;++a)for(var u=o[a],l=0,h=u.length-1;l<h;++l){var c=u.slice(l,l+2),p={feature:t,segment:c};this.rBush_.insert(Dt(c),p)}},e.prototype.writePointGeometry_=function(t,e){var r=e.getCoordinates(),n={feature:t,segment:[r,r]};this.rBush_.insert(e.getExtent(),n)},
 e.prototype.writePolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length-1;a<s;++a){var u=o.slice(a,a+2),l={feature:t,segment:u};this.rBush_.insert(Dt(u),l)}},e}(as),om=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),am="translatestart",sm="translating",um="translateend",lm=function(t){function e(e,r,n,i,o){var a=t.call(this,e)||this;return a.features=r,a.coordinate=n,a.startCoordinate=i,a.mapBrowserEvent=o,a}return om(e,t),e}(h),hm=function(t){function e(e){var r,n=this,i=e||{};if((n=t.call(this,i)||this).lastCoordinate_=null,n.startCoordinate_=null,n.features_=void 0!==i.features?i.features:null,i.layers)if("function"==typeof i.layers)r=i.layers;els
 e{var o=i.layers;r=function(t){return d(o,t)}}else r=x;return n.layerFilter_=r,n.filter_=i.filter?i.filter:x,n.hitTolerance_=i.hitTolerance?i.hitTolerance:0,n.lastFeature_=null,n.addEventListener(et($a),n.handleActiveChanged_),n}return om(e,t),e.prototype.handleDownEvent=function(t){if(this.lastFeature_=this.featuresAtPixel_(t.pixel,t.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=t.coordinate,this.lastCoordinate_=t.coordinate,this.handleMoveEvent(t);var e=this.features_||new ut([this.lastFeature_]);return this.dispatchEvent(new lm(am,e,t.coordinate,this.startCoordinate_,t)),!0}return!1},e.prototype.handleUpEvent=function(t){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(t);var e=this.features_||new ut([this.lastFeature_]);return this.dispatchEvent(new lm(um,e,t.coordinate,this.startCoordinate_,t)),this.startCoordinate_=null,!0}return!1},e.prototype.handleDragEvent=function(t){if(this.lastCoordinate_){var e=t.coordinate,r=e[0]-this.last
 Coordinate_[0],n=e[1]-this.lastCoordinate_[1],i=this.features_||new ut([this.lastFeature_]);i.forEach((function(t){var e=t.getGeometry();e.translate(r,n),t.setGeometry(e)})),this.lastCoordinate_=e,this.dispatchEvent(new lm(sm,i,e,this.startCoordinate_,t))}},e.prototype.handleMoveEvent=function(t){var e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")},e.prototype.featuresAtPixel_=function(t,e){return e.forEachFeatureAtPixel(t,function(t,e){if(this.filter_(t,e)&&(!this.features_||d(this.features_.getArray(),t)))return t}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){var r=this.getMap();t.prototype.setMap.call(this,e),th
 is.updateState_(r)},e.prototype.handleActiveChanged_=function(){this.updateState_(null)},e.prototype.updateState_=function(t){var e=this.getMap(),r=this.getActive();e&&r||(e=e||t)&&e.getViewport().classList.remove("ol-grab","ol-grabbing")},e}(as),cm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),pm={};pm[yt.POINT]=function(t){var e;e=void 0!==t.m&&void 0!==t.z?new gn([t.x,t.y,t.z,t.m],gt):void 0!==t.z?new gn([t.x,t.y,t.z],ft):void 0!==t.m?new gn([t.x,t.y,t.m],dt):new gn([t.x,t.y]);return e},pm[yt.LINE_STRING]=function(t){var e=gm(t);return new Cd(t.paths[0],e)},pm[yt.POLYGON]=function(t){var e=gm(t);return new Ln(t.rings,e)},pm[yt.MULTI_POINT]=function(t){var e=gm(t);return new qd(t.points,e)},pm[yt.MULTI_
 LINE_STRING]=function(t){var e=gm(t);return new Vd(t.paths,e)},pm[yt.MULTI_POLYGON]=function(t){var e=gm(t);return new Kd(t.rings,e)};var fm={};function dm(t,e){var r,n,i;if(!t)return null;if("number"==typeof t.x&&"number"==typeof t.y)i=yt.POINT;else if(t.points)i=yt.MULTI_POINT;else if(t.paths){i=1===t.paths.length?yt.LINE_STRING:yt.MULTI_LINE_STRING}else if(t.rings){var o=t,a=gm(o),s=function(t,e){var r,n,i=[],o=[],a=[];for(r=0,n=t.length;r<n;++r){i.length=0,Qr(i,0,t[r],e.length),En(i,0,i.length,e.length)?o.push([t[r]]):a.push(t[r])}for(;a.length;){var s=a.shift(),u=!1;for(r=o.length-1;r>=0;r--){var l=o[r][0];if(Vt(new fn(l).getExtent(),new fn(s).getExtent())){o[r].push(s),u=!0;break}}u||o.push([s.reverse()])}return o}(o.rings,a);1===s.length?(i=yt.POLYGON,t=T({},t,((r={}).rings=s[0],r))):(i=yt.MULTI_POLYGON,t=T({},t,((n={}).rings=s,n)))}return Ud((0,pm[i])(t),!1,e)}function gm(t){var e=pt;return!0===t.hasZ&&!0===t.hasM?e=gt:!0===t.hasZ?e=ft:!0===t.hasM&&(e=dt),e}function ym(t){va
 r e=t.getLayout();return{hasZ:e===ft||e===gt,hasM:e===dt||e===gt}}function mm(t,e){return(0,fm[t.getType()])(Ud(t,!0,e),e)}fm[yt.POINT]=function(t,e){var r,n=t.getCoordinates(),i=t.getLayout();i===ft?r={x:n[0],y:n[1],z:n[2]}:i===dt?r={x:n[0],y:n[1],m:n[2]}:i===gt?r={x:n[0],y:n[1],z:n[2],m:n[3]}:i===pt?r={x:n[0],y:n[1]}:lt(!1,34);return r},fm[yt.LINE_STRING]=function(t,e){var r=ym(t);return{hasZ:r.hasZ,hasM:r.hasM,paths:[t.getCoordinates()]}},fm[yt.POLYGON]=function(t,e){var r=ym(t);return{hasZ:r.hasZ,hasM:r.hasM,rings:t.getCoordinates(!1)}},fm[yt.MULTI_POINT]=function(t,e){var r=ym(t);return{hasZ:r.hasZ,hasM:r.hasM,points:t.getCoordinates()}},fm[yt.MULTI_LINE_STRING]=function(t,e){var r=ym(t);return{hasZ:r.hasZ,hasM:r.hasM,paths:t.getCoordinates()}},fm[yt.MULTI_POLYGON]=function(t,e){for(var r=ym(t),n=t.getCoordinates(!1),i=[],o=0;o<n.length;o++)for(var a=n[o].length-1;a>=0;a--)i.push(n[o][a]);return{hasZ:r.hasZ,hasM:r.hasM,rings:i}};var vm=function(t){function e(e){var r=this,n=e||
 {};return(r=t.call(this)||this).geometryName_=n.geometryName,r}return cm(e,t),e.prototype.readFeatureFromObject=function(t,e,r){var n=t,i=dm(n.geometry,e),o=new ct;if(this.geometryName_&&o.setGeometryName(this.geometryName_),o.setGeometry(i),n.attributes){o.setProperties(n.attributes,!0);var a=n.attributes[r];void 0!==a&&o.setId(a)}return o},e.prototype.readFeaturesFromObject=function(t,e){var r=e||{};if(t.features){for(var n=[],i=t.features,o=0,a=i.length;o<a;++o)n.push(this.readFeatureFromObject(i[o],r,t.objectIdFieldName));return n}return[this.readFeatureFromObject(t,r)]},e.prototype.readGeometryFromObject=function(t,e){return dm(t,e)},e.prototype.readProjectionFromObject=function(t){return t.spatialReference&&void 0!==t.spatialReference.wkid?yr("EPSG:"+t.spatialReference.wkid):null},e.prototype.writeGeometryObject=function(t,e){return mm(t,this.adaptOptions(e))},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var r={};if(!t.hasProperties())return r.attributes
 ={},r;var n=t.getProperties(),i=t.getGeometry();return i&&(r.geometry=mm(i,e),e&&e.featureProjection&&(r.geometry.spatialReference={wkid:Number(yr(e.featureProjection).getCode().split(":").pop())}),delete n[t.getGeometryName()]),P(n)?r.attributes={}:r.attributes=n,r},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var r=[],n=0,i=t.length;n<i;++n)r.push(this.writeFeatureObject(t[n],e));return{features:r}},e}(Wg),_m=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bm=function(t){function e(){var e=t.call(this)||this;return e.xmlSerializer_=(void 0===ul&&"undefined"!=typeof XMLSerializer&&(ul=new XMLSerializer),ul),e}return _m(e,t),e.prototype.getType=function(){return _u},e.prototype.r
 eadFeature=function(t,e){if(t){if("string"==typeof t){var r=qu(t);return this.readFeatureFromDocument(r,e)}return Wu(t)?this.readFeatureFromDocument(t,e):this.readFeatureFromNode(t,e)}return null},e.prototype.readFeatureFromDocument=function(t,e){var r=this.readFeaturesFromDocument(t,e);return r.length>0?r[0]:null},e.prototype.readFeatureFromNode=function(t,e){return null},e.prototype.readFeatures=function(t,e){if(t){if("string"==typeof t){var r=qu(t);return this.readFeaturesFromDocument(r,e)}return Wu(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}return[]},e.prototype.readFeaturesFromDocument=function(t,e){for(var r=[],n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&m(r,this.readFeaturesFromNode(n,e));return r},e.prototype.readFeaturesFromNode=function(t,e){return n()},e.prototype.readGeometry=function(t,e){if(t){if("string"==typeof t){var r=qu(t);return this.readGeometryFromDocument(r,e)}return Wu(t)?this.readGeometryFromDocument(t,e):this.re
 adGeometryFromNode(t,e)}return null},e.prototype.readGeometryFromDocument=function(t,e){return null},e.prototype.readGeometryFromNode=function(t,e){return null},e.prototype.readProjection=function(t){if(t){if("string"==typeof t){var e=qu(t);return this.readProjectionFromDocument(e)}return Wu(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){var r=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeFeatureNode=function(t,e){return null},e.prototype.writeFeatures=function(t,e){var r=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeFeaturesNode=function(t,e){return null},e.prototype.writeGeometry=function(t,e){var r=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeT
 oString(r)},e.prototype.writeGeometryNode=function(t,e){return null},e}(zd),xm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wm="http://www.opengis.net/gml",Sm=/^[\s\xa0]*$/,Tm=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.featureType=n.featureType,r.featureNS=n.featureNS,r.srsName=n.srsName,r.schemaLocation="",r.FEATURE_COLLECTION_PARSERS={},r.FEATURE_COLLECTION_PARSERS[r.namespace]={featureMember:Zu(r.readFeaturesInternal),featureMembers:Ku(r.readFeaturesInternal)},r}return xm(e,t),e.prototype.readFeaturesInternal=function(t,e){var r=t.localName,n=null;if("FeatureCollection"==r)n=ol([],this.FEATURE_COLLECTION_PARSERS,t,e,this);else if("featureMembers"==r||"featureMember"==r){var i=
 e[0],o=i.featureType,a=i.featureNS;if(!o&&t.childNodes){o=[],a={};for(var s=0,u=t.childNodes.length;s<u;++s){var l=t.childNodes[s];if(1===l.nodeType){var h=l.nodeName.split(":").pop();if(-1===o.indexOf(h)){var c="",p=0,f=l.namespaceURI;for(var d in a){if(a[d]===f){c=d;break}++p}c||(a[c="p"+p]=f),o.push(c+":"+h)}}}"featureMember"!=r&&(i.featureType=o,i.featureNS=a)}if("string"==typeof a){var g=a;(a={}).p0=g}var y={},m=Array.isArray(o)?o:[o];for(var v in a){var _={};for(s=0,u=m.length;s<u;++s){(-1===m[s].indexOf(":")?"p0":m[s].split(":")[0])===v&&(_[m[s].split(":").pop()]="featureMembers"==r?Zu(this.readFeatureElement,this):Ku(this.readFeatureElement,this))}y[a[v]]=_}n=ol("featureMember"==r?void 0:[],y,t,e)}return null===n&&(n=[]),n},e.prototype.readGeometryElement=function(t,e){var r=e[0];r.srsName=t.firstElementChild.getAttribute("srsName"),r.srsDimension=t.firstElementChild.getAttribute("srsDimension");var n=ol(null,this.GEOMETRY_PARSERS,t,e,this);return n?Array.isArray(n)?Bd(n,r):
 Ud(n,!1,r):void 0},e.prototype.readFeatureElementInternal=function(t,e,r){for(var n,i={},o=t.firstElementChild;o;o=o.nextElementSibling){var a=void 0,s=o.localName;0===o.childNodes.length||1===o.childNodes.length&&(3===o.firstChild.nodeType||4===o.firstChild.nodeType)?(a=Vu(o,!1),Sm.test(a)&&(a=void 0)):(r&&(a=this.readGeometryElement(o,e)),a?"boundedBy"!==s&&(n=s):a=this.readFeatureElementInternal(o,e,!1)),i[s]?(i[s]instanceof Array||(i[s]=[i[s]]),i[s].push(a)):i[s]=a;var u=o.attributes.length;if(u>0){i[s]={_content_:i[s]};for(var l=0;l<u;l++){var h=o.attributes[l].name;i[s][h]=o.attributes[l].value}}}if(r){var c=new ct(i);n&&c.setGeometryName(n);var p=t.getAttribute("fid")||function(t,e,r){return t.getAttributeNS(e,r)||""}(t,this.namespace,"id");return p&&c.setId(p),c}return i},e.prototype.readFeatureElement=function(t,e){return this.readFeatureElementInternal(t,e,!0)},e.prototype.readPoint=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);if(r)return new gn(r,ft)},e.proto
 type.readMultiPoint=function(t,e){var r=ol([],this.MULTIPOINT_PARSERS,t,e,this);return r?new qd(r):void 0},e.prototype.readMultiLineString=function(t,e){var r=ol([],this.MULTILINESTRING_PARSERS,t,e,this);if(r)return new Vd(r)},e.prototype.readMultiPolygon=function(t,e){var r=ol([],this.MULTIPOLYGON_PARSERS,t,e,this);if(r)return new Kd(r)},e.prototype.pointMemberParser=function(t,e){il(this.POINTMEMBER_PARSERS,t,e,this)},e.prototype.lineStringMemberParser=function(t,e){il(this.LINESTRINGMEMBER_PARSERS,t,e,this)},e.prototype.polygonMemberParser=function(t,e){il(this.POLYGONMEMBER_PARSERS,t,e,this)},e.prototype.readLineString=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);return r?new Cd(r,ft):void 0},e.prototype.readFlatLinearRing=function(t,e){var r=ol(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this);return r||void 0},e.prototype.readLinearRing=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);if(r)return new fn(r,ft)},e.prototype.readPolygon=function(t,e){var
  r=ol([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this);if(r&&r[0]){var n,i=r[0],o=[i.length],a=void 0;for(a=1,n=r.length;a<n;++a)m(i,r[a]),o.push(i.length);return new Ln(i,ft,o)}},e.prototype.readFlatCoordinatesFromNode=function(t,e){return ol(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.readGeometryFromNode=function(t,e){var r=this.readGeometryElement(t,[this.getReadOptions(t,e||{})]);return r||null},e.prototype.readFeaturesFromNode=function(t,e){var r={featureType:this.featureType,featureNS:this.featureNS};return e&&T(r,this.getReadOptions(t,e)),this.readFeaturesInternal(t,[r])||[]},e.prototype.readProjectionFromNode=function(t){return yr(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(bm);Tm.prototype.namespace=wm,Tm.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},Tm.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},Tm.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},Tm.p
 rototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:Zu(Tm.prototype.pointMemberParser),pointMembers:Zu(Tm.prototype.pointMemberParser)}},Tm.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:Zu(Tm.prototype.lineStringMemberParser),lineStringMembers:Zu(Tm.prototype.lineStringMemberParser)}},Tm.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:Zu(Tm.prototype.polygonMemberParser),polygonMembers:Zu(Tm.prototype.polygonMemberParser)}},Tm.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:Zu(Tm.prototype.readFlatCoordinatesFromNode)}},Tm.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Zu(Tm.prototype.readLineString)}},Tm.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Zu(Tm.prototype.readPolygon)}},Tm.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:Ku(Tm.prototype.readFlatLinearRing)}};var Em=Tm;function Cm(t){return Pm(Vu(t,!1))
 }function Pm(t){var e=/^\s*(true|1)|(false|0)\s*$/.exec(t);return e?void 0!==e[1]||!1:void 0}function Rm(t){var e=Vu(t,!1),r=Date.parse(e);return isNaN(r)?void 0:r/1e3}function Om(t){return Im(Vu(t,!1))}function Im(t){var e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(t);return e?parseFloat(e[1]):void 0}function Lm(t){return Mm(Vu(t,!1))}function Mm(t){var e=/^\s*(\d+)\s*$/.exec(t);return e?parseInt(e[1],10):void 0}function Fm(t){return Vu(t,!1).trim()}function Am(t,e){jm(t,e?"1":"0")}function km(t,e){var r=e.toPrecision();t.appendChild(hl().createTextNode(r))}function Nm(t,e){var r=e.toString();t.appendChild(hl().createTextNode(r))}function jm(t,e){t.appendChild(hl().createTextNode(e))}var Gm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(
 r):(n.prototype=r.prototype,new n)}}(),Dm={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},zm=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).surface_=void 0!==n.surface&&n.surface,r.curve_=void 0!==n.curve&&n.curve,r.multiCurve_=void 0===n.multiCurve||n.multiCurve,r.multiSurface_=void 0===n.multiSurface||n.multiSurface,r.schemaLocation=n.schemaLocation?n.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",r.hasZ=void 0!==n.hasZ&&n.hasZ,r}return Gm(e,t),e.prototype.readMultiCurve=function(t,e){var r=ol([],this.MULTICURVE_PARSERS,t,e,this);return r?new Vd(r):void 0},e.prototype.readMultiSurface=function(t,e){var r=ol([],this.MULTISURFACE_PARSERS,t,e,this);if(r)return new Kd(r)},e.prototype.curveMemberParser=function(t,e){il(this.CURVEMEMBER_PARSERS,t,e,this)},e.prototype.surfaceMemberParser=function(t,e){il(this.SURFACEM
 EMBER_PARSERS,t,e,this)},e.prototype.readPatch=function(t,e){return ol([null],this.PATCHES_PARSERS,t,e,this)},e.prototype.readSegment=function(t,e){return ol([null],this.SEGMENTS_PARSERS,t,e,this)},e.prototype.readPolygonPatch=function(t,e){return ol([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this)},e.prototype.readLineStringSegment=function(t,e){return ol([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.interiorParser=function(t,e){var r=ol(void 0,this.RING_PARSERS,t,e,this);r&&e[e.length-1].push(r)},e.prototype.exteriorParser=function(t,e){var r=ol(void 0,this.RING_PARSERS,t,e,this);r&&(e[e.length-1][0]=r)},e.prototype.readSurface=function(t,e){var r=ol([null],this.SURFACE_PARSERS,t,e,this);if(r&&r[0]){var n,i=r[0],o=[i.length],a=void 0;for(a=1,n=r.length;a<n;++a)m(i,r[a]),o.push(i.length);return new Ln(i,ft,o)}},e.prototype.readCurve=function(t,e){var r=ol([null],this.CURVE_PARSERS,t,e,this);return r?new Cd(r,ft):void 0},e.prototype.readEnvelope=function(t,e){v
 ar r=ol([null],this.ENVELOPE_PARSERS,t,e,this);return Zt(r[1][0],r[1][1],r[2][0],r[2][1])},e.prototype.readFlatPos=function(t,e){for(var r,n=Vu(t,!1),i=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[];r=i.exec(n);)o.push(parseFloat(r[1])),n=n.substr(r[0].length);if(""===n){var a=e[0].srsName,s="enu";if(a)s=yr(a).getAxisOrientation();if("neu"===s){var u,l=void 0;for(l=0,u=o.length;l<u;l+=3){var h=o[l],c=o[l+1];o[l]=c,o[l+1]=h}}var p=o.length;if(2==p&&o.push(0),0!==p)return o}},e.prototype.readFlatPosList=function(t,e){var r=Vu(t,!1).replace(/^\s*|\s*$/g,""),n=e[0],i=n.srsName,o=n.srsDimension,a="enu";i&&(a=yr(i).getAxisOrientation());var s,u,l,h=r.split(/\s+/),c=2;t.getAttribute("srsDimension")?c=Mm(t.getAttribute("srsDimension")):t.getAttribute("dimension")?c=Mm(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?c=Mm(t.parentNode.getAttribute("srsDimension")):o&&(c=Mm(o));for(var p=[],f=0,d=h.length;f<d;f+=c)s=parseFloat(h[f]),u=parseFloat(h[f+1]),l=3===c?parseF
 loat(h[f+2]):0,"en"===a.substr(0,2)?p.push(s,u,l):p.push(u,s,l);return p},e.prototype.writePos_=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);var a=n.srsName,s="enu";a&&(s=yr(a).getAxisOrientation());var u,l=e.getCoordinates();(u="en"===s.substr(0,2)?l[0]+" "+l[1]:l[1]+" "+l[0],i)&&(u+=" "+(l[2]||0));jm(t,u)},e.prototype.getCoords_=function(t,e,r){var n="enu";e&&(n=yr(e).getAxisOrientation());var i="en"===n.substr(0,2)?t[0]+" "+t[1]:t[1]+" "+t[0];r&&(i+=" "+(t[2]||0));return i},e.prototype.writePosList_=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);for(var a,s=n.srsName,u=e.getCoordinates(),l=u.length,h=new Array(l),c=0;c<l;++c)a=u[c],h[c]=this.getCoords_(a,s,i);jm(t,h.join(" "))},e.prototype.writePoint=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=Yu(t.namespaceURI,"pos");t.appendChild(i),this.writePos_(i,e,r)},e.prototype.writeEnvelope=function(t,e,r){var n=r[
 r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=[e[0]+" "+e[1],e[2]+" "+e[3]];sl({node:t},this.ENVELOPE_SERIALIZERS,el,i,r,["lowerCorner","upperCorner"],this)},e.prototype.writeLinearRing=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=Yu(t.namespaceURI,"posList");t.appendChild(i),this.writePosList_(i,e,r)},e.prototype.RING_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1],i=n.node,o=n.exteriorWritten;return void 0===o&&(n.exteriorWritten=!0),Yu(i.namespaceURI,void 0!==o?"interior":"exterior")},e.prototype.writeSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var a=e.getLinearRings();sl({node:t,hasZ:i,srsName:o},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,a,r,void 0,this)}else if("Surface"===t.nodeName){var s=Yu(t.namespaceURI,"patches");t.appendChild(s),this.writeSurfacePatches_(s,e,r)}},e.prototype.
 writeCurveOrLineString=function(t,e,r){var n=r[r.length-1].srsName;if("LineStringSegment"!==t.nodeName&&n&&t.setAttribute("srsName",n),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=Yu(t.namespaceURI,"posList");t.appendChild(i),this.writePosList_(i,e,r)}else if("Curve"===t.nodeName){var o=Yu(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,r)}},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,a=n.surface;o&&t.setAttribute("srsName",o);var s=e.getPolygons();sl({node:t,hasZ:i,srsName:o,surface:a},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,s,r,void 0,this)},e.prototype.writeMultiPoint=function(t,e,r){var n=r[r.length-1],i=n.srsName,o=n.hasZ;i&&t.setAttribute("srsName",i);var a=e.getPoints();sl({node:t,hasZ:o,srsName:i},this.POINTMEMBER_SERIALIZERS,tl("pointMember"),a,r,void 0,this)},e.prototype.writeMultiCurveOrLineString=function(t,e,r){var n=r[r.length-1],i=
 n.hasZ,o=n.srsName,a=n.curve;o&&t.setAttribute("srsName",o);var s=e.getLineStrings();sl({node:t,hasZ:i,srsName:o,curve:a},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,s,r,void 0,this)},e.prototype.writeRing=function(t,e,r){var n=Yu(t.namespaceURI,"LinearRing");t.appendChild(n),this.writeLinearRing(n,e,r)},e.prototype.writeSurfaceOrPolygonMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r))},e.prototype.writePointMember=function(t,e,r){var n=Yu(t.namespaceURI,"Point");t.appendChild(n),this.writePoint(n,e,r)},e.prototype.writeLineStringOrCurveMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeCurveOrLineString(n,e,r))},e.prototype.writeSurfacePatches_=function(t,e,r){var n=Yu(t.namespaceURI,"PolygonPatch");t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r)},e.prototype.writeCurveSegments_=function(t,e,r){var n=Yu(t.namespaceURI,"LineStringSegme
 nt");t.appendChild(n),this.writeCurveOrLineString(n,e,r)},e.prototype.writeGeometryElement=function(t,e,r){var n,i=r[r.length-1],o=T({},i);o.node=t,n=Array.isArray(e)?Bd(e,i):Ud(e,!0,i),sl(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[n],r,void 0,this)},e.prototype.writeFeatureElement=function(t,e,r){var n=e.getId();n&&t.setAttribute("fid",n);var i=r[r.length-1],o=i.featureNS,a=e.getGeometryName();i.serializers||(i.serializers={},i.serializers[o]={});var s=[],u=[];if(e.hasProperties()){var l=e.getProperties();for(var h in l){var c=l[h];null!==c&&(s.push(h),u.push(c),h==a||"function"==typeof c.getSimplifiedGeometry?h in i.serializers[o]||(i.serializers[o][h]=$u(this.writeGeometryElement,this)):h in i.serializers[o]||(i.serializers[o][h]=$u(jm)))}}var p=T({},i);p.node=t,sl(p,i.serializers,tl(void 0,o),u,r,s)},e.prototype.writeFeatureMembers_=function(t,e,r){var n=r[r.length-1],i=n.featureType,o=n.featureNS,a={};a[o]={},a[o][i]=$u(this.writeFeatureElement,this);var s=T({},n)
 ;s.node=t,sl(s,a,tl(i,o),e,r)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1].node;return Yu(this.namespace,Dm[n.nodeName])},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,r){var n,i=e[e.length-1],o=i.multiSurface,a=i.surface,s=i.curve,u=i.multiCurve;return Array.isArray(t)?n="Envelope":"MultiPolygon"===(n=t.getType())&&!0===o?n="MultiSurface":"Polygon"===n&&!0===a?n="Surface":"LineString"===n&&!0===s?n="Curve":"MultiLineString"===n&&!0===u&&(n="MultiCurve"),Yu(this.namespace,n)},e.prototype.writeGeometryNode=function(t,e){e=this.adaptOptions(e);var r=Yu(this.namespace,"geom"),n={node:r,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return e&&T(n,e),this.writeGeometryElement(r,t,[n]),r},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=Yu(this.namespace,"featureMembers");r.setAttributeNS(Bu,"xsi:schemaLocation",this.schemaLocation);var
  n={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return e&&T(n,e),this.writeFeatureMembers_(r,t,[n]),r},e}(Em);zm.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:Ku(zm.prototype.readFlatPos),posList:Ku(zm.prototype.readFlatPosList)}},zm.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:zm.prototype.interiorParser,exterior:zm.prototype.exteriorParser}},zm.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Ku(Em.prototype.readPoint),MultiPoint:Ku(Em.prototype.readMultiPoint),LineString:Ku(Em.prototype.readLineString),MultiLineString:Ku(Em.prototype.readMultiLineString),LinearRing:Ku(Em.prototype.readLinearRing),Polygon:Ku(Em.prototype.readPolygon),MultiPolygon:Ku(Em.prototype.readMultiPolygon),Surface:Ku(zm.prototype.readSurface),MultiSurface:Ku(zm.prototype.readMultiSurfa
 ce),Curve:Ku(zm.prototype.readCurve),MultiCurve:Ku(zm.prototype.readMultiCurve),Envelope:Ku(zm.prototype.readEnvelope)}},zm.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:Zu(zm.prototype.curveMemberParser),curveMembers:Zu(zm.prototype.curveMemberParser)}},zm.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:Zu(zm.prototype.surfaceMemberParser),surfaceMembers:Zu(zm.prototype.surfaceMemberParser)}},zm.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Zu(Em.prototype.readLineString),Curve:Zu(zm.prototype.readCurve)}},zm.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Zu(Em.prototype.readPolygon),Surface:Zu(zm.prototype.readSurface)}},zm.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:Ku(zm.prototype.readPatch)}},zm.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:Ku(zm.prototype.readSegment)}},zm.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerC
 orner:Zu(zm.prototype.readFlatPosList),upperCorner:Zu(zm.prototype.readFlatPosList)}},zm.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:Ku(zm.prototype.readPolygonPatch)}},zm.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:Ku(zm.prototype.readLineStringSegment)}},zm.prototype.writeFeatures,zm.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:$u(zm.prototype.writeRing),interior:$u(zm.prototype.writeRing)}},zm.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:$u(jm),upperCorner:$u(jm)}},zm.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:$u(zm.prototype.writeSurfaceOrPolygonMember),polygonMember:$u(zm.prototype.writeSurfaceOrPolygonMember)}},zm.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:$u(zm.prototype.writePointMember)}},zm.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:$u(
 zm.prototype.writeLineStringOrCurveMember),curveMember:$u(zm.prototype.writeLineStringOrCurveMember)}},zm.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:$u(zm.prototype.writeCurveOrLineString),MultiCurve:$u(zm.prototype.writeMultiCurveOrLineString),Point:$u(zm.prototype.writePoint),MultiPoint:$u(zm.prototype.writeMultiPoint),LineString:$u(zm.prototype.writeCurveOrLineString),MultiLineString:$u(zm.prototype.writeMultiCurveOrLineString),LinearRing:$u(zm.prototype.writeLinearRing),Polygon:$u(zm.prototype.writeSurfaceOrPolygon),MultiPolygon:$u(zm.prototype.writeMultiSurfaceOrPolygon),Surface:$u(zm.prototype.writeSurfaceOrPolygon),MultiSurface:$u(zm.prototype.writeMultiSurfaceOrPolygon),Envelope:$u(zm.prototype.writeEnvelope)}};var Um=zm,Bm=Um;Bm.prototype.writeFeatures,Bm.prototype.writeFeaturesNode;var Ym=Bm,Vm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.
 hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wm={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},qm=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).FEATURE_COLLECTION_PARSERS[wm].featureMember=Zu(r.readFeaturesInternal),r.schemaLocation=n.schemaLocation?n.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",r}return Vm(e,t),e.prototype.readFlatCoordinates=function(t,e){var r=Vu(t,!1).replace(/^\s*|\s*$/g,""),n=e[0].srsName,i="enu";if(n){var o=yr(n);o&&(i=o.getAxisOrientation())}for(var a=r.trim().split(/\s+/),s=[],u=0,l=a.length;u<l;u++){var h=a[u].split(/,+/),c=parseFloat(h[0]),p=parseFloat(h[1]),f=3===h.length?parseFloat(h[2]):0;"en"===i.substr(0,2)?s.push(c,p,f):s.push(p,c,f)}return s},e.prototype.readBox=function(t,e
 ){var r=ol([null],this.BOX_PARSERS_,t,e,this);return Zt(r[1][0],r[1][1],r[1][3],r[1][4])},e.prototype.innerBoundaryIsParser=function(t,e){var r=ol(void 0,this.RING_PARSERS,t,e,this);r&&e[e.length-1].push(r)},e.prototype.outerBoundaryIsParser=function(t,e){var r=ol(void 0,this.RING_PARSERS,t,e,this);r&&(e[e.length-1][0]=r)},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,r){var n,i=e[e.length-1],o=i.multiSurface,a=i.surface,s=i.multiCurve;return Array.isArray(t)?n="Envelope":"MultiPolygon"===(n=t.getType())&&!0===o?n="MultiSurface":"Polygon"===n&&!0===a?n="Surface":"MultiLineString"===n&&!0===s&&(n="MultiCurve"),Yu("http://www.opengis.net/gml",n)},e.prototype.writeFeatureElement=function(t,e,r){var n=e.getId();n&&t.setAttribute("fid",n);var i=r[r.length-1],o=i.featureNS,a=e.getGeometryName();i.serializers||(i.serializers={},i.serializers[o]={});var s=[],u=[];if(e.hasProperties()){var l=e.getProperties();for(var h in l){var c=l[h];null!==c&&(s.push(h),u.push(c),h==a||"function"==typeo
 f c.getSimplifiedGeometry?h in i.serializers[o]||(i.serializers[o][h]=$u(this.writeGeometryElement,this)):h in i.serializers[o]||(i.serializers[o][h]=$u(jm)))}}var p=T({},i);p.node=t,sl(p,i.serializers,tl(void 0,o),u,r,s)},e.prototype.writeCurveOrLineString=function(t,e,r){var n=r[r.length-1].srsName;if("LineStringSegment"!==t.nodeName&&n&&t.setAttribute("srsName",n),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(i),this.writeCoordinates_(i,e,r)}else if("Curve"===t.nodeName){var o=Yu(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,r)}},e.prototype.writeLineStringOrCurveMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeCurveOrLineString(n,e,r))},e.prototype.writeMultiCurveOrLineString=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,a=n.curve;o&&t.setAttribute("srsName",o);var s=e.getLineStrings();sl({node:t,hasZ:i,srsName:o,curve:a
 },this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,s,r,void 0,this)},e.prototype.writeGeometryElement=function(t,e,r){var n,i=r[r.length-1],o=T({},i);o.node=t,n=Array.isArray(e)?Bd(e,i):Ud(e,!0,i),sl(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[n],r,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var e=Yu(t,"coordinates");return e.setAttribute("decimal","."),e.setAttribute("cs",","),e.setAttribute("ts"," "),e},e.prototype.writeCoordinates_=function(t,e,r){for(var n=r[r.length-1],i=n.hasZ,o=n.srsName,a=e.getCoordinates(),s=a.length,u=new Array(s),l=0;l<s;++l){var h=a[l];u[l]=this.getCoords_(h,o,i)}jm(t,u.join(" "))},e.prototype.writeCurveSegments_=function(t,e,r){var n=Yu(t.namespaceURI,"LineStringSegment");t.appendChild(n),this.writeCurveOrLineString(n,e,r)},e.prototype.writeSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nod
 eName||"PolygonPatch"===t.nodeName){var a=e.getLinearRings();sl({node:t,hasZ:i,srsName:o},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,a,r,void 0,this)}else if("Surface"===t.nodeName){var s=Yu(t.namespaceURI,"patches");t.appendChild(s),this.writeSurfacePatches_(s,e,r)}},e.prototype.RING_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1],i=n.node,o=n.exteriorWritten;return void 0===o&&(n.exteriorWritten=!0),Yu(i.namespaceURI,void 0!==o?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,e,r){var n=Yu(t.namespaceURI,"PolygonPatch");t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r)},e.prototype.writeRing=function(t,e,r){var n=Yu(t.namespaceURI,"LinearRing");t.appendChild(n),this.writeLinearRing(n,e,r)},e.prototype.getCoords_=function(t,e,r){var n="enu";e&&(n=yr(e).getAxisOrientation());var i="en"===n.substr(0,2)?t[0]+","+t[1]:t[1]+","+t[0];r&&(i+=","+(t[2]||0));return i},e.prototype.writePoint=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;o&&t.
 setAttribute("srsName",o);var a=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(a);var s=e.getCoordinates();jm(a,this.getCoords_(s,o,i))},e.prototype.writeMultiPoint=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;o&&t.setAttribute("srsName",o);var a=e.getPoints();sl({node:t,hasZ:i,srsName:o},this.POINTMEMBER_SERIALIZERS,tl("pointMember"),a,r,void 0,this)},e.prototype.writePointMember=function(t,e,r){var n=Yu(t.namespaceURI,"Point");t.appendChild(n),this.writePoint(n,e,r)},e.prototype.writeLinearRing=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(i),this.writeCoordinates_(i,e,r)},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,a=n.surface;o&&t.setAttribute("srsName",o);var s=e.getPolygons();sl({node:t,hasZ:i,srsName:o,surface:a},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,s,r,void 0,this)},e
 .prototype.writeSurfaceOrPolygonMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r))},e.prototype.writeEnvelope=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=[e[0]+" "+e[1],e[2]+" "+e[3]];sl({node:t},this.ENVELOPE_SERIALIZERS,el,i,r,["lowerCorner","upperCorner"],this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1].node;return Yu("http://www.opengis.net/gml",Wm[n.nodeName])},e}(Em);qm.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:Ku(qm.prototype.readFlatCoordinates)}},qm.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:qm.prototype.innerBoundaryIsParser,outerBoundaryIs:qm.prototype.outerBoundaryIsParser}},qm.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:Zu(qm.prototype.readFlatCoordinates)}},qm.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Poin
 t:Ku(Em.prototype.readPoint),MultiPoint:Ku(Em.prototype.readMultiPoint),LineString:Ku(Em.prototype.readLineString),MultiLineString:Ku(Em.prototype.readMultiLineString),LinearRing:Ku(Em.prototype.readLinearRing),Polygon:Ku(Em.prototype.readPolygon),MultiPolygon:Ku(Em.prototype.readMultiPolygon),Box:Ku(qm.prototype.readBox)}},qm.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:$u(qm.prototype.writeCurveOrLineString),MultiCurve:$u(qm.prototype.writeMultiCurveOrLineString),Point:$u(qm.prototype.writePoint),MultiPoint:$u(qm.prototype.writeMultiPoint),LineString:$u(qm.prototype.writeCurveOrLineString),MultiLineString:$u(qm.prototype.writeMultiCurveOrLineString),LinearRing:$u(qm.prototype.writeLinearRing),Polygon:$u(qm.prototype.writeSurfaceOrPolygon),MultiPolygon:$u(qm.prototype.writeMultiSurfaceOrPolygon),Surface:$u(qm.prototype.writeSurfaceOrPolygon),MultiSurface:$u(qm.prototype.writeMultiSurfaceOrPolygon),Envelope:$u(qm.prototype.writeEnvelope)}},qm.prototype.LINESTR
 INGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:$u(qm.prototype.writeLineStringOrCurveMember),curveMember:$u(qm.prototype.writeLineStringOrCurveMember)}},qm.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:$u(qm.prototype.writeRing),innerBoundaryIs:$u(qm.prototype.writeRing)}},qm.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:$u(qm.prototype.writePointMember)}},qm.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:$u(qm.prototype.writeSurfaceOrPolygonMember),polygonMember:$u(qm.prototype.writeSurfaceOrPolygonMember)}},qm.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:$u(jm),upperCorner:$u(jm)}};var Xm=qm,Zm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){thi
 s.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Km=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).schemaLocation=n.schemaLocation?n.schemaLocation:r.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd",r}return Zm(e,t),e}(Um);Km.prototype.namespace="http://www.opengis.net/gml/3.2",Km.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:Ku(Um.prototype.readFlatPos),posList:Ku(Um.prototype.readFlatPosList)}},Km.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:Um.prototype.interiorParser,exterior:Um.prototype.exteriorParser}},Km.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Ku(Em.prototype.readPoint),MultiPoint:Ku(Em.prototype.readMultiPoint),LineString:Ku(Em.prototype.readLineString),MultiLineString:Ku(Em.prototype.readMultiLineString),LinearRing:Ku(Em.prototype.readLinearRing),Polygon:Ku(Em.prototype.readPolygon),MultiPo
 lygon:Ku(Em.prototype.readMultiPolygon),Surface:Ku(Km.prototype.readSurface),MultiSurface:Ku(Um.prototype.readMultiSurface),Curve:Ku(Km.prototype.readCurve),MultiCurve:Ku(Um.prototype.readMultiCurve),Envelope:Ku(Km.prototype.readEnvelope)}},Km.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:Zu(Um.prototype.curveMemberParser),curveMembers:Zu(Um.prototype.curveMemberParser)}},Km.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:Zu(Um.prototype.surfaceMemberParser),surfaceMembers:Zu(Um.prototype.surfaceMemberParser)}},Km.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Zu(Em.prototype.readLineString),Curve:Zu(Um.prototype.readCurve)}},Km.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Zu(Em.prototype.readPolygon),Surface:Zu(Um.prototype.readSurface)}},Km.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:Ku(Um.prototype.readPatch)}},Km.prototype.CURVE_PARSER
 S={"http://www.opengis.net/gml/3.2":{segments:Ku(Um.prototype.readSegment)}},Km.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:Zu(Um.prototype.readFlatPosList),upperCorner:Zu(Um.prototype.readFlatPosList)}},Km.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:Ku(Um.prototype.readPolygonPatch)}},Km.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:Ku(Um.prototype.readLineStringSegment)}},Km.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:Zu(Em.prototype.pointMemberParser),pointMembers:Zu(Em.prototype.pointMemberParser)}},Km.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:Zu(Em.prototype.lineStringMemberParser),lineStringMembers:Zu(Em.prototype.lineStringMemberParser)}},Km.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:Zu(Em.prototype.polygonMemberParser),polygonMembers:Zu(Em.prototype.polygonMemberParser)}}
 ,Km.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Zu(Em.prototype.readFlatCoordinatesFromNode)}},Km.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Zu(Em.prototype.readLineString)}},Km.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Zu(Em.prototype.readPolygon)}},Km.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:Ku(Em.prototype.readFlatLinearRing)}},Km.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:$u(Um.prototype.writeRing),interior:$u(Um.prototype.writeRing)}},Km.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:$u(jm),upperCorner:$u(jm)}},Km.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:$u(Um.prototype.writeSurfaceOrPolygonMember),polygonMember:$u(Um.prototype.writeSurfaceOrPolygonMember)}},Km.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:$u(
 Um.prototype.writePointMember)}},Km.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:$u(Um.prototype.writeLineStringOrCurveMember),curveMember:$u(Um.prototype.writeLineStringOrCurveMember)}},Km.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:$u(Um.prototype.writeCurveOrLineString),MultiCurve:$u(Um.prototype.writeMultiCurveOrLineString),Point:$u(Km.prototype.writePoint),MultiPoint:$u(Um.prototype.writeMultiPoint),LineString:$u(Um.prototype.writeCurveOrLineString),MultiLineString:$u(Um.prototype.writeMultiCurveOrLineString),LinearRing:$u(Um.prototype.writeLinearRing),Polygon:$u(Um.prototype.writeSurfaceOrPolygon),MultiPolygon:$u(Um.prototype.writeMultiSurfaceOrPolygon),Surface:$u(Um.prototype.writeSurfaceOrPolygon),MultiSurface:$u(Um.prototype.writeMultiSurfaceOrPolygon),Envelope:$u(Um.prototype.writeEnvelope)}};var Hm=Km,Jm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof A
 rray&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$m=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],Qm={rte:Pv,trk:Rv,wpt:Ov},tv=nl($m,{rte:Zu(Pv),trk:Zu(Rv),wpt:Zu(Ov)}),ev=nl($m,{text:Ju(Fm,"linkText"),type:Ju(Fm,"linkType")}),rv=nl($m,{rte:$u((function(t,e,r){var n=r[0],i=e.getProperties(),o={node:t};o.properties=i;var a=e.getGeometry();if(a.getType()==yt.LINE_STRING){var s=Ud(a,!0,n);o.geometryLayout=s.getLayout(),i.rtept=s.getCoordinates()}var u=r[r.length-1].node,l=pv[u.namespaceURI],h=rl(i,l);sl(o,fv,el,h,r,l)})),trk:$u((function(t,e,r){var n=r[0],i=e.getProperties(),o={node:t};o.properties=i;var a=e.getGeometry();if(a.getType()==yt.MULTI_LINE_STRING){var s=Ud(a,!0,n);i.trkseg=s.getLineStrings()}var u=r[r.length-1].node,l=gv[u.namespaceURI],h=rl(i,l);sl(o,yv
 ,el,h,r,l)})),wpt:$u((function(t,e,r){var n=r[0],i=r[r.length-1];i.properties=e.getProperties();var o=e.getGeometry();if(o.getType()==yt.POINT){var a=Ud(o,!0,n);i.geometryLayout=a.getLayout(),Lv(t,a.getCoordinates(),r)}}))}),nv=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.dataProjection=yr("EPSG:4326"),r.readExtensions_=n.readExtensions,r}return Jm(e,t),e.prototype.handleReadExtensions_=function(t){t||(t=[]);for(var e=0,r=t.length;e<r;++e){var n=t[e];if(this.readExtensions_){var i=n.get("extensionsNode_")||null;this.readExtensions_(n,i)}n.set("extensionsNode_",void 0)}},e.prototype.readFeatureFromNode=function(t,e){if(!d($m,t.namespaceURI))return null;var r=Qm[t.localName];if(!r)return null;var n=r(t,[this.getReadOptions(t,e)]);return n?(this.handleReadExtensions_([n]),n):null},e.prototype.readFeaturesFromNode=function(t,e){if(!d($m,t.namespaceURI))return[];if("gpx"==t.localName){var r=ol([],tv,t,[this.getReadOptions(t,e)]);return r?(this.handleReadExtensions_
 (r),r):[]}return[]},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=Yu("http://www.topografix.com/GPX/1/1","gpx");return r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",Bu),r.setAttributeNS(Bu,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),r.setAttribute("version","1.1"),r.setAttribute("creator","OpenLayers"),sl({node:r},rv,wv,t,[e]),r},e}(bm),iv=nl($m,{name:Ju(Fm),cmt:Ju(Fm),desc:Ju(Fm),src:Ju(Fm),link:Ev,number:Ju(Lm),extensions:Cv,type:Ju(Fm),rtept:function(t,e){var r=ol({},ov,t,e);if(r){var n=e[e.length-1],i=n.flatCoordinates,o=n.layoutOptions;Sv(i,o,t,r)}}}),ov=nl($m,{ele:Ju(Om),time:Ju(Rm)}),av=nl($m,{name:Ju(Fm),cmt:Ju(Fm),desc:Ju(Fm),src:Ju(Fm),link:Ev,number:Ju(Lm),type:Ju(Fm),extensions:Cv,trkseg:function(t,e){var r=e[e.length-1];il(sv,t,e);var n=r.flatCoordinates;r.ends.push(n.length)}}),sv=nl($m,{trkpt:function(t,e){var r=ol({},uv,t,e);if(r){var n=e[e.length-1],i=n.flatCoordinates,
 o=n.layoutOptions;Sv(i,o,t,r)}}}),uv=nl($m,{ele:Ju(Om),time:Ju(Rm)}),lv=nl($m,{ele:Ju(Om),time:Ju(Rm),magvar:Ju(Om),geoidheight:Ju(Om),name:Ju(Fm),cmt:Ju(Fm),desc:Ju(Fm),src:Ju(Fm),link:Ev,sym:Ju(Fm),type:Ju(Fm),fix:Ju(Fm),sat:Ju(Lm),hdop:Ju(Om),vdop:Ju(Om),pdop:Ju(Om),ageofdgpsdata:Ju(Om),dgpsid:Ju(Lm),extensions:Cv}),hv=["text","type"],cv=nl($m,{text:$u(jm),type:$u(jm)}),pv=nl($m,["name","cmt","desc","src","link","number","type","rtept"]),fv=nl($m,{name:$u(jm),cmt:$u(jm),desc:$u(jm),src:$u(jm),link:$u(Iv),number:$u(Nm),type:$u(jm),rtept:Qu($u(Lv))}),dv=nl($m,["ele","time"]),gv=nl($m,["name","cmt","desc","src","link","number","type","trkseg"]),yv=nl($m,{name:$u(jm),cmt:$u(jm),desc:$u(jm),src:$u(jm),link:$u(Iv),number:$u(Nm),type:$u(jm),trkseg:Qu($u((function(t,e,r){var n={node:t};n.geometryLayout=e.getLayout(),n.properties={},sl(n,vv,mv,e.getCoordinates(),r)})))}),mv=tl("trkpt"),vv=nl($m,{trkpt:$u(Lv)}),_v=nl($m,["ele","time","magvar","geoidheight","name","cmt","desc","src","link",
 "sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),bv=nl($m,{ele:$u(km),time:$u((function(t,e){var r=new Date(1e3*e),n=r.getUTCFullYear()+"-"+$e(r.getUTCMonth()+1,2)+"-"+$e(r.getUTCDate(),2)+"T"+$e(r.getUTCHours(),2)+":"+$e(r.getUTCMinutes(),2)+":"+$e(r.getUTCSeconds(),2)+"Z";t.appendChild(hl().createTextNode(n))})),magvar:$u(km),geoidheight:$u(km),name:$u(jm),cmt:$u(jm),desc:$u(jm),src:$u(jm),link:$u(Iv),sym:$u(jm),type:$u(jm),fix:$u(jm),sat:$u(Nm),hdop:$u(km),vdop:$u(km),pdop:$u(km),ageofdgpsdata:$u(km),dgpsid:$u(Nm)}),xv={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function wv(t,e,r){var n=t.getGeometry();if(n){var i=xv[n.getType()];if(i)return Yu(e[e.length-1].node.namespaceURI,i)}}function Sv(t,e,r,n){return t.push(parseFloat(r.getAttribute("lon")),parseFloat(r.getAttribute("lat"))),"ele"in n?(t.push(n.ele),delete n.ele,e.hasZ=!0):t.push(0),"time"in n?(t.push(n.time),delete n.time,e.hasM=!0):t.push(0),t}function Tv(t,e,r){var n=pt,i=2;if(t.hasZ&&t.
 hasM?(n=gt,i=4):t.hasZ?(n=ft,i=3):t.hasM&&(n=dt,i=3),4!==i){for(var o=0,a=e.length/4;o<a;o++)e[o*i]=e[4*o],e[o*i+1]=e[4*o+1],t.hasZ&&(e[o*i+2]=e[4*o+2]),t.hasM&&(e[o*i+2]=e[4*o+3]);if(e.length=e.length/4*i,r)for(o=0,a=r.length;o<a;o++)r[o]=r[o]/4*i}return n}function Ev(t,e){var r=e[e.length-1],n=t.getAttribute("href");null!==n&&(r.link=n),il(ev,t,e)}function Cv(t,e){e[e.length-1].extensionsNode_=t}function Pv(t,e){var r=e[0],n=ol({flatCoordinates:[],layoutOptions:{}},iv,t,e);if(n){var i=n.flatCoordinates;delete n.flatCoordinates;var o=n.layoutOptions;delete n.layoutOptions;var a=Tv(o,i),s=new Cd(i,a);Ud(s,!1,r);var u=new ct(s);return u.setProperties(n,!0),u}}function Rv(t,e){var r=e[0],n=ol({flatCoordinates:[],ends:[],layoutOptions:{}},av,t,e);if(n){var i=n.flatCoordinates;delete n.flatCoordinates;var o=n.ends;delete n.ends;var a=n.layoutOptions;delete n.layoutOptions;var s=Tv(a,i,o),u=new Vd(i,s,o);Ud(u,!1,r);var l=new ct(u);return l.setProperties(n,!0),l}}function Ov(t,e){var r=e[
 0],n=ol({},lv,t,e);if(n){var i={},o=Sv([],i,t,n),a=Tv(i,o),s=new gn(o,a);Ud(s,!1,r);var u=new ct(s);return u.setProperties(n,!0),u}}function Iv(t,e,r){t.setAttribute("href",e);var n=r[r.length-1].properties,i=[n.linkText,n.linkType];sl({node:t},cv,el,i,r,hv)}function Lv(t,e,r){var n=r[r.length-1],i=n.node.namespaceURI,o=n.properties;switch(t.setAttributeNS(null,"lat",String(e[1])),t.setAttributeNS(null,"lon",String(e[0])),n.geometryLayout){case gt:0!==e[3]&&(o.time=e[3]);case ft:0!==e[2]&&(o.ele=e[2]);break;case dt:0!==e[2]&&(o.time=e[2])}var a="rtept"==t.nodeName?dv[i]:_v[i],s=rl(o,a);sl({node:t,properties:o},bv,el,s,r,a)}var Mv=nv,Fv=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Av(t){return"st
 ring"==typeof t?t:""}var kv,Nv,jv,Gv,Dv,zv,Uv,Bv=function(t){function e(){return t.call(this)||this}return Fv(e,t),e.prototype.getType=function(){return vu},e.prototype.readFeature=function(t,e){return this.readFeatureFromText(Av(t),this.adaptOptions(e))},e.prototype.readFeatureFromText=function(t,e){return n()},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromText(Av(t),this.adaptOptions(e))},e.prototype.readFeaturesFromText=function(t,e){return n()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromText(Av(t),this.adaptOptions(e))},e.prototype.readGeometryFromText=function(t,e){return n()},e.prototype.readProjection=function(t){return this.readProjectionFromText(Av(t))},e.prototype.readProjectionFromText=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){return this.writeFeatureText(t,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){return n()},e.prototype.writeFeatures=function(t,e){return this.writeF
 eaturesText(t,this.adaptOptions(e))},e.prototype.writeFeaturesText=function(t,e){return n()},e.prototype.writeGeometry=function(t,e){return this.writeGeometryText(t,this.adaptOptions(e))},e.prototype.writeGeometryText=function(t,e){return n()},e}(zd),Yv=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vv="barometric",Wv="gps",qv="none",Xv=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Zv=/^H.([A-Z]{3}).*?:(.*)/,Kv=/^HFDTE(\d{2})(\d{2})(\d{2})/,Hv=/\r\n|\r|\n/,Jv=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.dataProjection=yr("EPSG:4326"),r.altitudeMode_=n.altitudeMode?n.altitudeMode:qv,r}return Yv(e,t),e.prototype.readFeatureFromText=function(t,e){
 var r,n,i=this.altitudeMode_,o=t.split(Hv),a={},s=[],u=2e3,l=0,h=1,c=-1;for(r=0,n=o.length;r<n;++r){var p=o[r],f=void 0;if("B"==p.charAt(0)){if(f=Xv.exec(p)){var d=parseInt(f[1],10),g=parseInt(f[2],10),y=parseInt(f[3],10),m=parseInt(f[4],10)+parseInt(f[5],10)/6e4;"S"==f[6]&&(m=-m);var v=parseInt(f[7],10)+parseInt(f[8],10)/6e4;if("W"==f[9]&&(v=-v),s.push(v,m),i!=qv){var _=void 0;_=i==Wv?parseInt(f[11],10):i==Vv?parseInt(f[12],10):0,s.push(_)}var b=Date.UTC(u,l,h,d,g,y);b<c&&(b=Date.UTC(u,l,h+1,d,g,y)),s.push(b/1e3),c=b}}else"H"==p.charAt(0)&&((f=Kv.exec(p))?(h=parseInt(f[1],10),l=parseInt(f[2],10)-1,u=2e3+parseInt(f[3],10)):(f=Zv.exec(p))&&(a[f[1]]=f[2].trim()))}if(0===s.length)return null;var x=new Cd(s,i==qv?dt:gt),w=new ct(Ud(x,!1,e));return w.setProperties(a,!0),w},e.prototype.readFeaturesFromText=function(t,e){var r=this.readFeatureFromText(t,e);return r?[r]:[]},e}(Bv),$v=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e)
 {t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qv=["http://www.google.com/kml/ext/2.2"],t_=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],e_={fraction:Ul,pixels:Bl,insetPixels:Bl},r_=nl(t_,{ExtendedData:K_,Region:H_,MultiGeometry:Ju(z_,"geometry"),LineString:Ju(j_,"geometry"),LinearRing:Ju(G_,"geometry"),Point:Ju(U_,"geometry"),Polygon:Ju(Y_,"geometry"),Style:Ju(W_),StyleMap:function(t,e){var r=S_.call(this,t,e);if(!r)return;var n=e[e.length-1];Array.isArray(r)?n.Style=r:"string"==typeof r?n.styleUrl=r:lt(!1,38)},address:Ju(Fm),description:Ju(Fm),name:Ju(Fm),open:Ju(Cm),phoneNumber:Ju(Fm),styleUrl:Ju(b_),visibility:Ju(Cm)},nl(Qv,{MultiTrack:Ju((function(t,e){var r=ol([],I_,t,e);if(!r)return;return new Vd(r)}),"geometry
 "),Track:Ju(M_,"geometry")})),n_=nl(t_,{ExtendedData:K_,Region:H_,Link:function(t,e){il(i_,t,e)},address:Ju(Fm),description:Ju(Fm),name:Ju(Fm),open:Ju(Cm),phoneNumber:Ju(Fm),visibility:Ju(Cm)}),i_=nl(t_,{href:Ju(b_)}),o_=nl(t_,{LatLonAltBox:function(t,e){var r=ol({},Q_,t,e);if(!r)return;var n=e[e.length-1],i=[parseFloat(r.west),parseFloat(r.south),parseFloat(r.east),parseFloat(r.north)];n.extent=i,n.altitudeMode=r.altitudeMode,n.minAltitude=parseFloat(r.minAltitude),n.maxAltitude=parseFloat(r.maxAltitude)},Lod:function(t,e){var r=ol({},tb,t,e);if(!r)return;var n=e[e.length-1];n.minLodPixels=parseFloat(r.minLodPixels),n.maxLodPixels=parseFloat(r.maxLodPixels),n.minFadeExtent=parseFloat(r.minFadeExtent),n.maxFadeExtent=parseFloat(r.maxFadeExtent)}}),a_=nl(t_,["Document","Placemark"]),s_=nl(t_,{Document:$u((function(t,e,r){sl({node:t},ob,ab,e,r,void 0,this)})),Placemark:$u(Ib)}),u_=null;var l_,h_=null;var c_,p_=null;var f_=null;var d_=null;var g_,y_=null;var m_=function(t){function e(e
 ){var r=t.call(this)||this,n=e||{};return y_||(u_=new zl({color:kv=[255,255,255,1]}),h_=new rh({anchor:Nv=[20,2],anchorOrigin:Yl,anchorXUnits:jv=Bl,anchorYUnits:Gv=Bl,crossOrigin:"anonymous",rotation:0,scale:Uv=.5,size:Dv=[64,64],src:zv="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"}),l_="NO_IMAGE",p_=new nh({color:kv,width:1}),c_=new nh({color:[51,51,51,1],width:2}),f_=new ph({font:"bold 16px Helvetica",fill:u_,stroke:c_,scale:.8}),d_=new lh({fill:u_,image:h_,text:f_,stroke:p_,zIndex:0}),y_=[d_]),r.dataProjection=yr("EPSG:4326"),r.defaultStyle_=n.defaultStyle?n.defaultStyle:y_,r.extractStyles_=void 0===n.extractStyles||n.extractStyles,r.writeStyles_=void 0===n.writeStyles||n.writeStyles,r.sharedStyles_={},r.showPointNames_=void 0===n.showPointNames||n.showPointNames,r.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",r}return $v(e,t),e.prototype.readDocumentOrFolder_=function(t,e){var r=ol([],nl(t_,{Document:Xu(this.readDocumentOrFolder_,this),Folder:Xu(
 this.readDocumentOrFolder_,this),Placemark:Zu(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),t,e,this);return r||void 0},e.prototype.readPlacemark_=function(t,e){var r=ol({geometry:null},r_,t,e,this);if(r){var n=new ct,i=t.getAttribute("id");null!==i&&n.setId(i);var o=e[0],a=r.geometry;if(a&&Ud(a,!1,o),n.setGeometry(a),delete r.geometry,this.extractStyles_){var s=function(t,e,r,n,i){return function(o,a){var s=i,u="",l=[];if(s){var h=o.getGeometry();if(h){var c=h.getType();s=c===yt.GEOMETRY_COLLECTION?(l=h.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===yt.POINT||e===yt.MULTI_POINT}))).length>0:c===yt.POINT||c===yt.MULTI_POINT}}s&&(u=o.get("name"),(s=s&&!!u)&&u.search(/&[^&]+;/)>-1&&(g_||(g_=document.createElement("textarea")),g_.innerHTML=u,u=g_.value));var p=r;if(t?p=t:e&&(p=function t(e,r,n){return Array.isArray(e)?e:"string"==typeof e?(!(e in n)&&"#"+e in n&&(e="#"+e),t(n[e],r,n)):r}(e
 ,r,n)),s){var f=function(t,e){var r=[0,0],n="start",i=t.getImage();if(i){var o=i.getImageSize();if(null===o&&(o=Dv),2==o.length){var a=i.getScaleArray();r[0]=a[0]*o[0]/2,r[1]=-a[1]*o[1]/2,n="left"}}var s=t.getText();s?((s=s.clone()).setFont(s.getFont()||f_.getFont()),s.setScale(s.getScale()||f_.getScale()),s.setFill(s.getFill()||f_.getFill()),s.setStroke(s.getStroke()||c_)):s=f_.clone();return s.setText(e),s.setOffsetX(r[0]),s.setOffsetY(r[1]),s.setTextAlign(n),new lh({image:i,text:s})}(p[0],u);return l.length>0?(f.setGeometry(new Bg(l)),[f,new lh({geometry:p[0].getGeometry(),image:null,fill:p[0].getFill(),stroke:p[0].getStroke(),text:null})].concat(p.slice(1))):f}return p}}(r.Style,r.styleUrl,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);n.setStyle(s)}return delete r.Style,n.setProperties(r,!0),n}},e.prototype.readSharedStyle_=function(t,e){var r=t.getAttribute("id");if(null!==r){var n=W_.call(this,t,e);if(n){var i=void 0,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.
 location.href),o)i=new URL("#"+r,o).href;else i="#"+r;this.sharedStyles_[i]=n}}},e.prototype.readSharedStyleMap_=function(t,e){var r=t.getAttribute("id");if(null!==r){var n=S_.call(this,t,e);if(n){var i,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)i=new URL("#"+r,o).href;else i="#"+r;this.sharedStyles_[i]=n}}},e.prototype.readFeatureFromNode=function(t,e){if(!d(t_,t.namespaceURI))return null;var r=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return r||null},e.prototype.readFeaturesFromNode=function(t,e){if(!d(t_,t.namespaceURI))return[];var r,n=t.localName;if("Document"==n||"Folder"==n)return(r=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]))||[];if("Placemark"==n){var i=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return i?[i]:[]}if("kml"==n){r=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var a=this.readFeaturesFromNode(o,e);a&&m(r,a)}return r}return[]},e.prototype.readName=function(t){if(t){if("string"==typeof t){var e=qu(t);retur
 n this.readNameFromDocument(e)}return Wu(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},e.prototype.readNameFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){var r=this.readNameFromNode(e);if(r)return r}},e.prototype.readNameFromNode=function(t){for(var e=t.firstElementChild;e;e=e.nextElementSibling)if(d(t_,e.namespaceURI)&&"name"==e.localName)return Fm(e);for(e=t.firstElementChild;e;e=e.nextElementSibling){var r=e.localName;if(d(t_,e.namespaceURI)&&("Document"==r||"Folder"==r||"Placemark"==r||"kml"==r)){var n=this.readNameFromNode(e);if(n)return n}}},e.prototype.readNetworkLinks=function(t){var e=[];if("string"==typeof t){var r=qu(t);m(e,this.readNetworkLinksFromDocument(r))}else Wu(t)?m(e,this.readNetworkLinksFromDocument(t)):m(e,this.readNetworkLinksFromNode(t));return e},e.prototype.readNetworkLinksFromDocument=function(t){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&m(e,this.readNetwor
 kLinksFromNode(r));return e},e.prototype.readNetworkLinksFromNode=function(t){for(var e=[],r=t.firstElementChild;r;r=r.nextElementSibling)if(d(t_,r.namespaceURI)&&"NetworkLink"==r.localName){var n=ol({},n_,r,[]);e.push(n)}for(r=t.firstElementChild;r;r=r.nextElementSibling){var i=r.localName;!d(t_,r.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||m(e,this.readNetworkLinksFromNode(r))}return e},e.prototype.readRegion=function(t){var e=[];if("string"==typeof t){var r=qu(t);m(e,this.readRegionFromDocument(r))}else Wu(t)?m(e,this.readRegionFromDocument(t)):m(e,this.readRegionFromNode(t));return e},e.prototype.readRegionFromDocument=function(t){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&m(e,this.readRegionFromNode(r));return e},e.prototype.readRegionFromNode=function(t){for(var e=[],r=t.firstElementChild;r;r=r.nextElementSibling)if(d(t_,r.namespaceURI)&&"Region"==r.localName){var n=ol({},o_,r,[]);e.push(n)}for(r=t.firstElementChild;r;r=r.nextElementS
 ibling){var i=r.localName;!d(t_,r.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||m(e,this.readRegionFromNode(r))}return e},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=Yu(t_[4],"kml"),n="http://www.w3.org/2000/xmlns/";r.setAttributeNS(n,"xmlns:gx",Qv[0]),r.setAttributeNS(n,"xmlns:xsi",Bu),r.setAttributeNS(Bu,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var i={node:r},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var a=a_[r.namespaceURI],s=rl(o,a);return sl(i,s_,el,s,[e],a,this),r},e}(bm);function v_(t){var e=Vu(t,!1),r=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(r){var n=r[1];return[parseInt(n.substr(6,2),16),parseInt(n.substr(4,2),16),parseInt(n.substr(2,2),16),parseInt(n.substr(0,2),16)/255]}}function __(t){for(var e,r=Vu(t,!1),n=[],i=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i;e=i.exec(r);)
 {var o=parseFloat(e[1]),a=parseFloat(e[2]),s=e[3]?parseFloat(e[3]):0;n.push(o,a,s),r=r.substr(e[0].length)}if(""===r)return n}function b_(t){var e=Vu(t,!1).trim(),r=t.baseURI;return r&&"about:blank"!=r||(r=window.location.href),r?new URL(e,r).href:e}function x_(t){return Om(t)}var w_=nl(t_,{Pair:function(t,e){var r=ol({},J_,t,e,this);if(!r)return;var n=r.key;if(n&&"normal"==n){var i=r.styleUrl;i&&(e[e.length-1]=i);var o=r.Style;o&&(e[e.length-1]=o)}}});function S_(t,e){return ol(void 0,w_,t,e,this)}var T_=nl(t_,{Icon:Ju((function(t,e){var r=ol({},F_,t,e);return r||null})),color:Ju(v_),heading:Ju(Om),hotSpot:Ju((function(t){var e,r=t.getAttribute("xunits"),n=t.getAttribute("yunits");return e="insetPixels"!==r?"insetPixels"!==n?Yl:Wl:"insetPixels"!==n?Vl:ql,{x:parseFloat(t.getAttribute("x")),xunits:e_[r],y:parseFloat(t.getAttribute("y")),yunits:e_[n],origin:e}})),scale:Ju(x_)});var E_=nl(t_,{color:Ju(v_),scale:Ju(x_)});var C_=nl(t_,{color:Ju(v_),width:Ju(Om)});var P_=nl(t_,{color:Ju(v
 _),fill:Ju(Cm),outline:Ju(Cm)});var R_=nl(t_,{coordinates:Ku(__)});function O_(t,e){return ol(null,R_,t,e)}var I_=nl(Qv,{Track:Zu(M_)});var L_=nl(t_,{when:function(t,e){var r=e[e.length-1].whens,n=Vu(t,!1),i=Date.parse(n);r.push(isNaN(i)?0:i)}},nl(Qv,{coord:function(t,e){var r=e[e.length-1].flatCoordinates,n=Vu(t,!1),i=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(n);if(i){var o=parseFloat(i[1]),a=parseFloat(i[2]),s=parseFloat(i[3]);r.push(o,a,s,0)}else r.push(0,0,0,0)}}));function M_(t,e){var r=ol({flatCoordinates:[],whens:[]},L_,t,e);if(r){for(var n=r.flatCoordinates,i=r.whens,o=0,a=Math.min(n.length,i.length);o<a;++o)n[4*o+3]=i[o];return new Cd(n,gt)}}var F_=nl(t_,{href:Ju(b_)},nl(Qv,{x:Ju(Om),y:Ju(Om),w:Ju(Om),h:Ju(Om)}));var A_=nl(t_,{coordinates:Ku(__)});function k_(t,e){return ol(null,A_,t,e)}var N_=nl(t_,{extrude:Ju(Cm),tessellate:Ju(Cm),altitudeMode:Ju(Fm)});function j_(t,e){var r=ol({},N_,
 t,e),n=k_(t,e);if(n){var i=new Cd(n,ft);return i.setProperties(r,!0),i}}function G_(t,e){var r=ol({},N_,t,e),n=k_(t,e);if(n){var i=new Ln(n,ft,[n.length]);return i.setProperties(r,!0),i}}var D_=nl(t_,{LineString:Zu(j_),LinearRing:Zu(G_),MultiGeometry:Zu(z_),Point:Zu(U_),Polygon:Zu(Y_)});function z_(t,e){var r,n=ol([],D_,t,e);if(!n)return null;if(0===n.length)return new Bg(n);for(var i=!0,o=n[0].getType(),a=1,s=n.length;a<s;++a)if(n[a].getType()!=o){i=!1;break}if(i){var u=void 0,l=void 0;if(o==yt.POINT){var h=n[0];u=h.getLayout(),l=h.getFlatCoordinates();for(a=1,s=n.length;a<s;++a)m(l,n[a].getFlatCoordinates());q_(r=new qd(l,u),n)}else o==yt.LINE_STRING?q_(r=new Vd(n),n):o==yt.POLYGON?q_(r=new Kd(n),n):o==yt.GEOMETRY_COLLECTION?r=new Bg(n):lt(!1,37)}else r=new Bg(n);return r}function U_(t,e){var r=ol({},N_,t,e),n=k_(t,e);if(n){var i=new gn(n,ft);return i.setProperties(r,!0),i}}var B_=nl(t_,{innerBoundaryIs:function(t,e){var r=ol(void 0,eb,t,e);if(r){e[e.length-1].push(r)}},outerBound
 aryIs:function(t,e){var r=ol(void 0,rb,t,e);if(r){e[e.length-1][0]=r}}});function Y_(t,e){var r=ol({},N_,t,e),n=ol([null],B_,t,e);if(n&&n[0]){for(var i=n[0],o=[i.length],a=1,s=n.length;a<s;++a)m(i,n[a]),o.push(i.length);var u=new Ln(i,ft,o);return u.setProperties(r,!0),u}}var V_=nl(t_,{IconStyle:function(t,e){var r=ol({},T_,t,e);if(r){var n,i,o,a,s=e[e.length-1],u="Icon"in r?r.Icon:{},l=!("Icon"in r)||Object.keys(u).length>0,h=u.href;h?n=h:l&&(n=zv);var c,p=Yl,f=r.hotSpot;f?(i=[f.x,f.y],o=f.xunits,a=f.yunits,p=f.origin):n===zv?(i=Nv,o=jv,a=Gv):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(n)&&(i=[.5,0],o=Ul,a=Ul);var d,g=u.x,y=u.y;void 0!==g&&void 0!==y&&(c=[g,y]);var m,v=u.w,_=u.h;void 0!==v&&void 0!==_&&(d=[v,_]);var b=r.heading;void 0!==b&&(m=Re(b));var x=r.scale,w=r.color;if(l){n==zv&&(d=Dv,void 0===x&&(x=Uv));var S=new rh({anchor:i,anchorOrigin:p,anchorXUnits:o,anchorYUnits:a,crossOrigin:this.crossOrigin_,offset:c,offsetOrigin:Yl,rotation:m,scale:x,size:d,src:n,color:w});s.i
 mageStyle=S}else s.imageStyle=l_}},LabelStyle:function(t,e){var r=ol({},E_,t,e);if(r){var n=e[e.length-1],i=new ph({fill:new zl({color:"color"in r?r.color:kv}),scale:r.scale});n.textStyle=i}},LineStyle:function(t,e){var r=ol({},C_,t,e);if(r){var n=e[e.length-1],i=new nh({color:"color"in r?r.color:kv,width:"width"in r?r.width:1});n.strokeStyle=i}},PolyStyle:function(t,e){var r=ol({},P_,t,e);if(r){var n=e[e.length-1],i=new zl({color:"color"in r?r.color:kv});n.fillStyle=i;var o=r.fill;void 0!==o&&(n.fill=o);var a=r.outline;void 0!==a&&(n.outline=a)}}});function W_(t,e){var r=ol({},V_,t,e,this);if(!r)return null;var n,i="fillStyle"in r?r.fillStyle:u_,o=r.fill;void 0===o||o||(i=null),"imageStyle"in r?r.imageStyle!=l_&&(n=r.imageStyle):n=h_;var a="textStyle"in r?r.textStyle:f_,s="strokeStyle"in r?r.strokeStyle:p_,u=r.outline;return void 0===u||u?[new lh({fill:i,image:n,stroke:s,text:a,zIndex:void 0})]:[new lh({geometry:function(t){var e=t.getGeometry(),r=e.getType();return r===yt.GEOMETRY
 _COLLECTION?new Bg(e.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e!==yt.POLYGON&&e!==yt.MULTI_POLYGON}))):r!==yt.POLYGON&&r!==yt.MULTI_POLYGON?e:void 0},fill:i,image:n,stroke:s,text:a,zIndex:void 0}),new lh({geometry:function(t){var e=t.getGeometry(),r=e.getType();return r===yt.GEOMETRY_COLLECTION?new Bg(e.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===yt.POLYGON||e===yt.MULTI_POLYGON}))):r===yt.POLYGON||r===yt.MULTI_POLYGON?e:void 0},fill:i,stroke:null,zIndex:void 0})]}function q_(t,e){var r,n,i,o=e.length,a=new Array(e.length),s=new Array(e.length),u=new Array(e.length);r=!1,n=!1,i=!1;for(var l=0;l<o;++l){var h=e[l];a[l]=h.get("extrude"),s[l]=h.get("tessellate"),u[l]=h.get("altitudeMode"),r=r||void 0!==a[l],n=n||void 0!==s[l],i=i||u[l]}r&&t.set("extrude",a),n&&t.set("tessellate",s),i&&t.set("altitudeMode",u)}var X_=nl(t_,{displayName:Ju(Fm),value:Ju(Fm)});var Z_=nl(t_,{Data:function(t,e){var r=t.getAttribute("name");il
 (X_,t,e);var n=e[e.length-1];r&&n.displayName?n[r]={value:n.value,displayName:n.displayName,toString:function(){return n.value}}:null!==r?n[r]=n.value:null!==n.displayName&&(n[n.displayName]=n.value),delete n.value},SchemaData:function(t,e){il($_,t,e)}});function K_(t,e){il(Z_,t,e)}function H_(t,e){il(o_,t,e)}var J_=nl(t_,{Style:Ju(W_),key:Ju(Fm),styleUrl:Ju(b_)});var $_=nl(t_,{SimpleData:function(t,e){var r=t.getAttribute("name");if(null!==r){var n=Fm(t);e[e.length-1][r]=n}}});var Q_=nl(t_,{altitudeMode:Ju(Fm),minAltitude:Ju(Om),maxAltitude:Ju(Om),north:Ju(Om),south:Ju(Om),east:Ju(Om),west:Ju(Om)});var tb=nl(t_,{minLodPixels:Ju(Om),maxLodPixels:Ju(Om),minFadeExtent:Ju(Om),maxFadeExtent:Ju(Om)});var eb=nl(t_,{LinearRing:Ku(O_)});var rb=nl(t_,{LinearRing:Ku(O_)});function nb(t,e){for(var r=ni(e),n=[255*(4==r.length?r[3]:1),r[2],r[1],r[0]],i=0;i<4;++i){var o=Math.floor(n[i]).toString(16);n[i]=1==o.length?"0"+o:o}jm(t,n.join(""))}var ib=nl(t_,{Data:$u((function(t,e,r){t.setAttribute("n
 ame",e.name);var n={node:t},i=e.value;"object"==typeof i?(null!==i&&i.displayName&&sl(n,ib,el,[i.displayName],r,["displayName"]),null!==i&&i.value&&sl(n,ib,el,[i.value],r,["value"])):sl(n,ib,el,[i],r,["value"])})),value:$u((function(t,e){jm(t,e)})),displayName:$u((function(t,e){!function(t,e){t.appendChild(hl().createCDATASection(e))}(t,e)}))});var ob=nl(t_,{Placemark:$u(Ib)}),ab=function(t,e,r){return Yu(e[e.length-1].node.namespaceURI,"Placemark")};var sb=tl("Data");var ub=nl(t_,["href"],nl(Qv,["x","y","w","h"])),lb=nl(t_,{href:$u(jm)},nl(Qv,{x:$u(km),y:$u(km),w:$u(km),h:$u(km)})),hb=function(t,e,r){return Yu(Qv[0],"gx:"+r)};var cb=nl(t_,["scale","heading","Icon","color","hotSpot"]),pb=nl(t_,{Icon:$u((function(t,e,r){var n={node:t},i=r[r.length-1].node,o=ub[i.namespaceURI],a=rl(e,o);sl(n,lb,el,a,r,o),a=rl(e,o=ub[Qv[0]]),sl(n,lb,hb,a,r,o)})),color:$u(nb),heading:$u(km),hotSpot:$u((function(t,e){t.setAttribute("x",String(e.x)),t.setAttribute("y",String(e.y)),t.setAttribute("xunits",
 e.xunits),t.setAttribute("yunits",e.yunits)})),scale:$u(zb)});var fb=nl(t_,["color","scale"]),db=nl(t_,{color:$u(nb),scale:$u(zb)});var gb=nl(t_,["color","width"]),yb=nl(t_,{color:$u(nb),width:$u(km)});var mb={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},vb=function(t,e,r){if(t)return Yu(e[e.length-1].node.namespaceURI,mb[t.getType()])},_b=tl("Point"),bb=tl("LineString"),xb=tl("LinearRing"),wb=tl("Polygon"),Sb=nl(t_,{LineString:$u(Fb),Point:$u(Fb),Polygon:$u(Gb),GeometryCollection:$u(Tb)});function Tb(t,e,r){var n,i={node:t},o=e.getType(),a=[];o===yt.GEOMETRY_COLLECTION?(e.getGeometriesArrayRecursive().forEach((function(t){var e=t.getType();e===yt.MULTI_POINT?a=a.concat(t.getPoints()):e===yt.MULTI_LINE_STRING?a=a.concat(t.getLineStrings()):e===yt.MULTI_POLYGON?a=a.concat(t.getPolygons()):e===yt.POINT||e===yt.LINE_STRING||e===y
 t.POLYGON?a.push(t):lt(!1,39)})),n=vb):o===yt.MULTI_POINT?(a=e.getPoints(),n=_b):o===yt.MULTI_LINE_STRING?(a=e.getLineStrings(),n=bb):o===yt.MULTI_POLYGON?(a=e.getPolygons(),n=wb):lt(!1,39),sl(i,Sb,n,a,r)}var Eb=nl(t_,{LinearRing:$u(Fb)});function Cb(t,e,r){sl({node:t},Eb,xb,[e],r)}var Pb=nl(t_,{ExtendedData:$u((function(t,e,r){for(var n={node:t},i=e.names,o=e.values,a=i.length,s=0;s<a;s++)sl(n,ib,sb,[{name:i[s],value:o[s]}],r)})),MultiGeometry:$u(Tb),LineString:$u(Fb),LinearRing:$u(Fb),Point:$u(Fb),Polygon:$u(Gb),Style:$u((function(t,e,r){var n={node:t},i={};if(e.pointStyles.length){var o=e.pointStyles[0].getText();o&&(i.LabelStyle=o);var a=e.pointStyles[0].getImage();a&&"function"==typeof a.getSrc&&(i.IconStyle=a)}if(e.lineStyles.length){(s=e.lineStyles[0].getStroke())&&(i.LineStyle=s)}if(e.polyStyles.length){var s;(s=e.polyStyles[0].getStroke())&&!i.LineStyle&&(i.LineStyle=s),i.PolyStyle=e.polyStyles[0]}var u=r[r.length-1].node,l=Ub[u.namespaceURI],h=rl(i,l);sl(n,Bb,el,h,r,l)})),
 address:$u(jm),description:$u(jm),name:$u(jm),open:$u(Am),phoneNumber:$u(jm),styleUrl:$u(jm),visibility:$u(Am)}),Rb=nl(t_,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),Ob=tl("ExtendedData");function Ib(t,e,r){var n={node:t};e.getId()&&t.setAttribute("id",e.getId());var i=e.getProperties(),o={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};o[e.getGeometryName()]=1;var a=Object.keys(i||{}).sort().filter((function(t){return!o[t]})),s=e.getStyleFunction();if(s){var u=s(e,0);if(u){var l=Array.isArray(u)?u:[u],h=l;if(e.getGeometry()&&(h=l.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r.getType();return n===yt.GEOMETRY_COLLECTION?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===yt.POINT||e===yt.MULTI_POINT})).length:n===yt.POINT||n===yt.MULTI_POINT}}))),this.writeStyles_){var c=l,p=l;e.getGeometry()&&(c=l.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r
 .getType();return n===yt.GEOMETRY_COLLECTION?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===yt.LINE_STRING||e===yt.MULTI_LINE_STRING})).length:n===yt.LINE_STRING||n===yt.MULTI_LINE_STRING}})),p=l.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r.getType();return n===yt.GEOMETRY_COLLECTION?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===yt.POLYGON||e===yt.MULTI_POLYGON})).length:n===yt.POLYGON||n===yt.MULTI_POLYGON}}))),i.Style={pointStyles:h,lineStyles:c,polyStyles:p}}if(h.length&&void 0===i.name){var f=h[0].getText();f&&(i.name=f.getText())}}}var d=r[r.length-1].node,g=Rb[d.namespaceURI],y=rl(i,g);if(sl(n,Pb,el,y,r,g),a.length>0){var m=rl(i,a);sl(n,Pb,Ob,[{names:a,values:m}],r)}var v=r[0],_=e.getGeometry();_&&(_=Ud(_,!0,v)),sl(n,Pb,vb,[_],r)}var Lb=nl(t_,["extrude","tessellate","altitudeMode","coordinates"]),Mb=nl(t_,{extrude:$u(Am),tessellate:$u(Am),altitudeMode:$u(jm),coordinates:$u((function(t,e,
 r){var n,i=r[r.length-1],o=i.layout,a=i.stride;o==pt||o==dt?n=2:o==ft||o==gt?n=3:lt(!1,34);var s=e.length,u="";if(s>0){u+=e[0];for(var l=1;l<n;++l)u+=","+e[l];for(var h=a;h<s;h+=a){u+=" "+e[h];for(l=1;l<n;++l)u+=","+e[h+l]}}jm(t,u)}))});function Fb(t,e,r){var n=e.getFlatCoordinates(),i={node:t};i.layout=e.getLayout(),i.stride=e.getStride();var o=e.getProperties();o.coordinates=n;var a=r[r.length-1].node,s=Lb[a.namespaceURI],u=rl(o,s);sl(i,Mb,el,u,r,s)}var Ab=nl(t_,["color","fill","outline"]),kb=nl(t_,{outerBoundaryIs:$u(Cb),innerBoundaryIs:$u(Cb)}),Nb=tl("innerBoundaryIs"),jb=tl("outerBoundaryIs");function Gb(t,e,r){var n=e.getLinearRings(),i=n.shift(),o={node:t};sl(o,kb,Nb,n,r),sl(o,kb,jb,[i],r)}var Db=nl(t_,{color:$u(nb),fill:$u(Am),outline:$u(Am)});function zb(t,e){km(t,Math.round(1e6*e)/1e6)}var Ub=nl(t_,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),Bb=nl(t_,{IconStyle:$u((function(t,e,r){var n={node:t},i={},o=e.getSrc(),a=e.getSize(),s=e.getImageSize(),u={href:o};if(a){u.
 w=a[0],u.h=a[1];var l=e.getAnchor(),h=e.getOrigin();if(h&&s&&0!==h[0]&&h[1]!==a[1]&&(u.x=h[0],u.y=s[1]-(h[1]+a[1])),l&&(l[0]!==a[0]/2||l[1]!==a[1]/2)){var c={x:l[0],xunits:Bl,y:a[1]-l[1],yunits:Bl};i.hotSpot=c}}i.Icon=u;var p=e.getScale();1!==p&&(i.scale=p);var f=e.getRotation();0!==f&&(i.heading=f);var d=e.getColor();d&&(i.color=d);var g=r[r.length-1].node,y=cb[g.namespaceURI],m=rl(i,y);sl(n,pb,el,m,r,y)})),LabelStyle:$u((function(t,e,r){var n={node:t},i={},o=e.getFill();o&&(i.color=o.getColor());var a=e.getScale();a&&1!==a&&(i.scale=a);var s=r[r.length-1].node,u=fb[s.namespaceURI],l=rl(i,u);sl(n,db,el,l,r,u)})),LineStyle:$u((function(t,e,r){var n={node:t},i={color:e.getColor(),width:Number(e.getWidth())||1},o=r[r.length-1].node,a=gb[o.namespaceURI],s=rl(i,a);sl(n,yb,el,s,r,a)})),PolyStyle:$u((function(t,e,r){var n={node:t},i=e.getFill(),o=e.getStroke(),a={color:i?i.getColor():void 0,fill:!!i&&void 0,outline:!!o&&void 0},s=r[r.length-1].node,u=Ab[s.namespaceURI],l=rl(a,u);sl(n,Db,e
 l,l,r,u)}))});var Yb=m_,Vb=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wb=[null],qb=nl(Wb,{nd:function(t,e){e[e.length-1].ndrefs.push(t.getAttribute("ref"))},tag:Hb}),Xb=nl(Wb,{node:function(t,e){var r=e[0],n=e[e.length-1],i=t.getAttribute("id"),o=[parseFloat(t.getAttribute("lon")),parseFloat(t.getAttribute("lat"))];n.nodes[i]=o;var a=ol({tags:{}},Kb,t,e);if(!P(a.tags)){var s=new gn(o);Ud(s,!1,r);var u=new ct(s);u.setId(i),u.setProperties(a.tags,!0),n.features.push(u)}},way:function(t,e){var r=ol({id:t.getAttribute("id"),ndrefs:[],tags:{}},qb,t,e);e[e.length-1].ways.push(r)}}),Zb=function(t){function e(){var e=t.call(this)||this;return e.dataProjection=yr("EPSG:4326"),e}return Vb(e,t),e.prototype.readFe
 aturesFromNode=function(t,e){var r=this.getReadOptions(t,e);if("osm"==t.localName){for(var n=ol({nodes:{},ways:[],features:[]},Xb,t,[r]),i=0;i<n.ways.length;i++){for(var o=n.ways[i],a=[],s=0,u=o.ndrefs.length;s<u;s++){m(a,n.nodes[o.ndrefs[s]])}var l=void 0;Ud(l=o.ndrefs[0]==o.ndrefs[o.ndrefs.length-1]?new Ln(a,pt,[a.length]):new Cd(a,pt),!1,r);var h=new ct(l);h.setId(o.id),h.setProperties(o.tags,!0),n.features.push(h)}if(n.features)return n.features}return[]},e}(bm),Kb=nl(Wb,{tag:Hb});function Hb(t,e){e[e.length-1].tags[t.getAttribute("k")]=t.getAttribute("v")}var Jb=Zb;function $b(t,e,r,n,i,o){var a,s;void 0!==i?(a=i,s=void 0!==o?o:0):(a=[],s=0);for(var u=e;u<r;){var l=t[u++];a[s++]=t[u++],a[s++]=l;for(var h=2;h<n;++h)a[s++]=t[u++]}return a.length=s,a}var Qb=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(
 ){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function tx(t,e,r){var n,i=r||1e5,o=new Array(e);for(n=0;n<e;++n)o[n]=0;for(var a=0,s=t.length;a<s;)for(n=0;n<e;++n,++a){var u=t[a],l=u-o[n];o[n]=u,t[a]=l}return rx(t,i)}function ex(t,e,r){var n,i=r||1e5,o=new Array(e);for(n=0;n<e;++n)o[n]=0;for(var a=nx(t,i),s=0,u=a.length;s<u;)for(n=0;n<e;++n,++s)o[n]+=a[s],a[s]=o[n];return a}function rx(t,e){for(var r=e||1e5,n=0,i=t.length;n<i;++n)t[n]=Math.round(t[n]*r);return function(t){for(var e=0,r=t.length;e<r;++e){var n=t[e];t[e]=n<0?~(n<<1):n<<1}return function(t){for(var e="",r=0,n=t.length;r<n;++r)e+=ix(t[r]);return e}(t)}(t)}function nx(t,e){for(var r=e||1e5,n=function(t){for(var e=function(t){for(var e=[],r=0,n=0,i=0,o=t.length;i<o;++i){var a=t.charCodeAt(i)-63;r|=(31&a)<<n,a<32?(e.push(r),r=0,n=0):n+=5}return e}(t),r=0,n=e.length;r<n;++r){var i=e[r];e[r]=1&i?~(i>>1):i>>1}return e}(t),i=0,o=n.length;i<o;++i)n[i]/=r;return n}function i
 x(t){for(var e,r="";t>=32;)e=63+(32|31&t),r+=String.fromCharCode(e),t>>=5;return e=t+63,r+=String.fromCharCode(e)}var ox=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.dataProjection=yr("EPSG:4326"),r.factor_=n.factor?n.factor:1e5,r.geometryLayout_=n.geometryLayout?n.geometryLayout:pt,r}return Qb(e,t),e.prototype.readFeatureFromText=function(t,e){var r=this.readGeometryFromText(t,e);return new ct(r)},e.prototype.readFeaturesFromText=function(t,e){return[this.readFeatureFromText(t,e)]},e.prototype.readGeometryFromText=function(t,e){var r=Wr(this.geometryLayout_),n=ex(t,r,this.factor_);$b(n,0,n.length,r,n);var i=sn(n,0,n.length,r);return Ud(new Cd(i,this.geometryLayout_),!1,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){var r=t.getGeometry();return r?this.writeGeometryText(r,e):(lt(!1,40),"")},e.prototype.writeFeaturesText=function(t,e){return this.writeFeatureText(t[0],e)},e.prototype.writeGeometryText=function(t,e){var r=(t=Ud(t,!0,this.adaptO
 ptions(e))).getFlatCoordinates(),n=t.getStride();return $b(r,0,r.length,n,r),tx(r,n,this.factor_)},e}(Bv),ax=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),sx=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.layerName_=n.layerName,r.layers_=n.layers?n.layers:null,r.dataProjection=yr(n.dataProjection?n.dataProjection:"EPSG:4326"),r}return ax(e,t),e.prototype.readFeaturesFromObject=function(t,e){if("Topology"==t.type){var r=t,n=void 0,i=null,o=null;r.transform&&(i=(n=r.transform).scale,o=n.translate);var a=r.arcs;n&&function(t,e,r){for(var n=0,i=t.length;n<i;++n)px(t[n],e,r)}(a,i,o);var s=[],u=r.objects,l=this.layerName_,h=void 0;for(var c in u)this.layers_&&-1==this.layers_.indexOf(c)||("
 GeometryCollection"===u[c].type?(h=u[c],s.push.apply(s,hx(h,a,i,o,l,c,e))):(h=u[c],s.push(cx(h,a,i,o,l,c,e))));return s}return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(Wg),ux={Point:function(t,e,r){var n=t.coordinates;e&&r&&fx(n,e,r);return new gn(n)},LineString:function(t,e){var r=lx(t.arcs,e);return new Cd(r)},Polygon:function(t,e){for(var r=[],n=0,i=t.arcs.length;n<i;++n)r[n]=lx(t.arcs[n],e);return new Ln(r)},MultiPoint:function(t,e,r){var n=t.coordinates;if(e&&r)for(var i=0,o=n.length;i<o;++i)fx(n[i],e,r);return new qd(n)},MultiLineString:function(t,e){for(var r=[],n=0,i=t.arcs.length;n<i;++n)r[n]=lx(t.arcs[n],e);return new Vd(r)},MultiPolygon:function(t,e){for(var r=[],n=0,i=t.arcs.length;n<i;++n){for(var o=t.arcs[n],a=[],s=0,u=o.length;s<u;++s)a[s]=lx(o[s],e);r[n]=a}return new Kd(r)}};function lx(t,e){for(var r,n,i=[],o=0,a=t.length;o<a;++o)r=t[o],o>0&&i.pop(),n=r>=0?e[r]:e[~r].slice().reverse(),i.push.apply(i,n);for(var s=0,u=i.length
 ;s<u;++s)i[s]=i[s].slice();return i}function hx(t,e,r,n,i,o,a){for(var s=t.geometries,u=[],l=0,h=s.length;l<h;++l)u[l]=cx(s[l],e,r,n,i,o,a);return u}function cx(t,e,r,n,i,o,a){var s,u=t.type,l=ux[u];s="Point"===u||"MultiPoint"===u?l(t,r,n):l(t,e);var h=new ct;h.setGeometry(Ud(s,!1,a)),void 0!==t.id&&h.setId(t.id);var c=t.properties;return i&&(c||(c={}),c[i]=o),c&&h.setProperties(c,!0),h}function px(t,e,r){for(var n=0,i=0,o=0,a=t.length;o<a;++o){var s=t[o];n+=s[0],i+=s[1],s[0]=n,s[1]=i,fx(s,e,r)}}function fx(t,e,r){t[0]=t[0]*e[0]+r[0],t[1]=t[1]*e[1]+r[1]}var dx=sx,gx=function(){function t(t){this.tagName_=t}return t.prototype.getTagName=function(){return this.tagName_},t}(),yx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prot
 otype,new n)}}(),mx=function(t){function e(e,r){var n=t.call(this,e)||this;return n.conditions=r,lt(n.conditions.length>=2,57),n}return yx(e,t),e}(gx),vx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_x=function(t){function e(e){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return vx(e,t),e}(mx),bx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),xx=function(t){function e(e,r,n){var i=t.call(this,"BBOX")||t
 his;if(i.geometryName=e,i.extent=r,4!==r.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return i.srsName=n,i}return bx(e,t),e}(gx),wx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sx=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.geometryName=r||"the_geom",o.geometry=n,o.srsName=i,o}return wx(e,t),e}(gx),Tx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ex=function(t
 ){function e(e,r,n){return t.call(this,"Contains",e,r,n)||this}return Tx(e,t),e}(Sx),Cx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Px=function(t){function e(e,r){var n=t.call(this,e)||this;return n.propertyName=r,n}return Cx(e,t),e}(gx),Rx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ox=function(t){function e(e,r,n){var i=t.call(this,"During",e)||this;return i.begin=r,i.end=n,i}return Rx(e,t),e}(Px),Ix=function(){var t=func
 tion(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Lx=function(t){function e(e,r,n,i){var o=t.call(this,e,r)||this;return o.expression=n,o.matchCase=i,o}return Ix(e,t),e}(Px),Mx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fx=function(t){function e(e,r,n){return t.call(this,"PropertyIsEqualTo",e,r,n)||this}return Mx(e,t),e}(Lx),Ax=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}
 ||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),kx=function(t){function e(e,r){return t.call(this,"PropertyIsGreaterThan",e,r)||this}return Ax(e,t),e}(Lx),Nx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jx=function(t){function e(e,r){return t.call(this,"PropertyIsGreaterThanOrEqualTo",e,r)||this}return Nx(e,t),e}(Lx),Gx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this
 .constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Dx=function(t){function e(e,r,n){return t.call(this,"Intersects",e,r,n)||this}return Gx(e,t),e}(Sx),zx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ux=function(t){function e(e,r,n){var i=t.call(this,"PropertyIsBetween",e)||this;return i.lowerBoundary=r,i.upperBoundary=n,i}return zx(e,t),e}(Px),Bx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,n
 ew n)}}(),Yx=function(t){function e(e,r,n,i,o,a){var s=t.call(this,"PropertyIsLike",e)||this;return s.pattern=r,s.wildCard=void 0!==n?n:"*",s.singleChar=void 0!==i?i:".",s.escapeChar=void 0!==o?o:"!",s.matchCase=a,s}return Bx(e,t),e}(Px),Vx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wx=function(t){function e(e){return t.call(this,"PropertyIsNull",e)||this}return Vx(e,t),e}(Px),qx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}()
 ,Xx=function(t){function e(e,r){return t.call(this,"PropertyIsLessThan",e,r)||this}return qx(e,t),e}(Lx),Zx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Kx=function(t){function e(e,r){return t.call(this,"PropertyIsLessThanOrEqualTo",e,r)||this}return Zx(e,t),e}(Lx),Hx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jx=function(t){function e(e){var r=t.call(this,"Not")||this;return r.condition=e,r}return Hx(e,t),e}(gx),$x=functio
 n(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qx=function(t){function e(e,r,n){return t.call(this,"PropertyIsNotEqualTo",e,r,n)||this}return $x(e,t),e}(Lx),tw=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ew=function(t){function e(e){return t.call(this,"Or",Array.prototype.slice.call(arguments))||this}return tw(e,t),e}(mx),rw=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t
 .__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nw=function(t){function e(e,r,n){return t.call(this,"Within",e,r,n)||this}return rw(e,t),e}(Sx);function iw(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(_x,e))}function ow(t,e,r){return new xx(t,e,r)}var aw=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),sw={"http://www.opengis.net/gml":{boundedBy:Ju(Em.prototype.readGeometryElement,"bounds")}},uw={"http://www.opengis.net/wfs":{totalInserted:Ju(Lm),totalUpdated:Ju(Lm),totalDeleted:Ju(L
 m)}},lw={"http://www.opengis.net/wfs":{TransactionSummary:Ju((function(t,e){return ol({},uw,t,e)}),"transactionSummary"),InsertResults:Ju((function(t,e){return ol([],vw,t,e)}),"insertIds")}},hw={"http://www.opengis.net/wfs":{PropertyName:$u(jm)}},cw={"http://www.opengis.net/wfs":{Insert:$u((function(t,e,r){var n=r[r.length-1],i=n.featureType,o=n.featureNS,a=n.gmlVersion,s=Yu(o,i);t.appendChild(s),2===a?Xm.prototype.writeFeatureElement(s,e,r):Um.prototype.writeFeatureElement(s,e,r)})),Update:$u((function(t,e,r){var n=r[r.length-1];lt(void 0!==e.getId(),27);var i=n.featureType,o=n.featurePrefix,a=n.featureNS,s=bw(o,i),u=e.getGeometryName();t.setAttribute("typeName",s),t.setAttributeNS(pw,"xmlns:"+o,a);var l=e.getId();if(void 0!==l){for(var h=e.getKeys(),c=[],p=0,f=h.length;p<f;p++){var d=e.get(h[p]);if(void 0!==d){var g=h[p];d&&"function"==typeof d.getSimplifiedGeometry&&(g=u),c.push({name:g,value:d})}}sl({gmlVersion:n.gmlVersion,node:t,hasZ:n.hasZ,srsName:n.srsName},cw,tl("Property")
 ,c,r),_w(t,l,r)}})),Delete:$u((function(t,e,r){var n=r[r.length-1];lt(void 0!==e.getId(),26);var i=n.featureType,o=n.featurePrefix,a=n.featureNS,s=bw(o,i);t.setAttribute("typeName",s),t.setAttributeNS(pw,"xmlns:"+o,a);var u=e.getId();void 0!==u&&_w(t,u,r)})),Property:$u((function(t,e,r){var n=Yu(dw,"Name"),i=r[r.length-1].gmlVersion;if(t.appendChild(n),jm(n,e.name),void 0!==e.value&&null!==e.value){var o=Yu(dw,"Value");t.appendChild(o),e.value&&"function"==typeof e.value.getSimplifiedGeometry?2===i?Xm.prototype.writeGeometryElement(o,e.value,r):Um.prototype.writeGeometryElement(o,e.value,r):jm(o,e.value)}})),Native:$u((function(t,e,r){e.vendorId&&t.setAttribute("vendorId",e.vendorId);void 0!==e.safeToIgnore&&t.setAttribute("safeToIgnore",String(e.safeToIgnore));void 0!==e.value&&jm(t,e.value)}))}},pw="http://www.w3.org/2000/xmlns/",fw="http://www.opengis.net/ogc",dw="http://www.opengis.net/wfs",gw={"1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.
 0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},yw=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.featureType_=n.featureType,r.featureNS_=n.featureNS,r.gmlFormat_=n.gmlFormat?n.gmlFormat:new Um,r.schemaLocation_=n.schemaLocation?n.schemaLocation:gw["1.1.0"],r}return aw(e,t),e.prototype.getFeatureType=function(){return this.featureType_},e.prototype.setFeatureType=function(t){this.featureType_=t},e.prototype.readFeaturesFromNode=function(t,e){var r={node:t};T(r,{featureType:this.featureType_,featureNS:this.featureNS_}),T(r,this.getReadOptions(t,e||{}));var n=[r];this.gmlFormat_.FEATURE_COLLECTION_PARSERS[wm].featureMember=Zu(Em.prototype.readFeaturesInternal);var i=ol([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,n,this.gmlFormat_);return i||(i=[]),i},e.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var e=qu(t);return this.readTransactionResponseFromDocument(e)}return Wu(t)?this.readTransactionResponse
 FromDocument(t):this.readTransactionResponseFromNode(t)}},e.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var e=qu(t);return this.readFeatureCollectionMetadataFromDocument(e)}return Wu(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},e.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(e)},e.prototype.readFeatureCollectionMetadataFromNode=function(t){var e={},r=Mm(t.getAttribute("numberOfFeatures"));return e.numberOfFeatures=r,ol(e,sw,t,[],this.gmlFormat_)},e.prototype.readTransactionResponseFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(e)},e.prototype.readTransactionResponseFromNode=function(t){return ol({},lw,t,[])},e.prototype.writeGetFeature=function(t){var e,r=Yu
 (dw,"GetFeature");if(r.setAttribute("service","WFS"),r.setAttribute("version","1.1.0"),t&&(t.handle&&r.setAttribute("handle",t.handle),t.outputFormat&&r.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&r.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&r.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&r.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&r.setAttribute("count",String(t.count)),void 0!==t.viewParams&&r.setAttribute("viewParams",t.viewParams),e=t.filter,t.bbox)){lt(t.geometryName,12);var n=ow(t.geometryName,t.bbox,t.srsName);e=e?iw(e,n):n}r.setAttributeNS(Bu,"xsi:schemaLocation",this.schemaLocation_);var i={node:r};return T(i,{srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,geometryName:t.geometryName,filter:e,propertyNames:t.propertyNames?t.propertyNames:[]}),lt(Array.isArray(t.featureTypes),11),function(t,e,r){var n=r[r.length-1],i=T({},n);i.node=t,sl(i,x
 w,tl("Query"),e,r)}(r,t.featureTypes,[i]),r},e.prototype.writeTransaction=function(t,e,r,n){var i,o,a=[],s=Yu(dw,"Transaction"),u=n.version?n.version:"1.1.0",l="1.0.0"===u?2:3;s.setAttribute("service","WFS"),s.setAttribute("version",u),n&&(i=n.gmlOptions?n.gmlOptions:{},n.handle&&s.setAttribute("handle",n.handle));var h=gw[u];s.setAttributeNS(Bu,"xsi:schemaLocation",h);var c=n.featurePrefix?n.featurePrefix:"feature";return t&&(o=T({node:s},{featureNS:n.featureNS,featureType:n.featureType,featurePrefix:c,gmlVersion:l,hasZ:n.hasZ,srsName:n.srsName}),T(o,i),sl(o,cw,tl("Insert"),t,a)),e&&(o=T({node:s},{featureNS:n.featureNS,featureType:n.featureType,featurePrefix:c,gmlVersion:l,hasZ:n.hasZ,srsName:n.srsName}),T(o,i),sl(o,cw,tl("Update"),e,a)),r&&sl({node:s,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:c,gmlVersion:l,srsName:n.srsName},cw,tl("Delete"),r,a),n.nativeElements&&sl({node:s,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:c,gmlVersion:l,srsName:n.s
 rsName},cw,tl("Native"),n.nativeElements,a),s},e.prototype.readProjectionFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null},e.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var e=(t=t.firstElementChild.firstElementChild).firstElementChild;e;e=e.nextElementSibling)if(0!==e.childNodes.length&&(1!==e.childNodes.length||3!==e.firstChild.nodeType)){var r=[{}];return this.gmlFormat_.readGeometryElement(e,r),yr(r.pop().srsName)}return null},e}(bm);var mw={"http://www.opengis.net/ogc":{FeatureId:Zu((function(t,e){return t.getAttribute("fid")}))}};var vw={"http://www.opengis.net/wfs":{Feature:function(t,e){il(mw,t,e)}}};function _w(t,e,r){var n=Yu(fw,"Filter"),i=Yu(fw,"FeatureId");n.appendChild(i),i.setAttribute("fid",e),t.appendChild(n)}function bw(t,e){var r=(t=t||"feature")+":";return 0===e.indexOf(r)?e:r+e}var xw={"http://www.o
 pengis.net/wfs":{Query:$u((function(t,e,r){var n,i=r[r.length-1],o=i.featurePrefix,a=i.featureNS,s=i.propertyNames,u=i.srsName;n=o?bw(o,e):e;t.setAttribute("typeName",n),u&&t.setAttribute("srsName",u);a&&t.setAttributeNS(pw,"xmlns:"+o,a);var l=T({},i);l.node=t,sl(l,hw,tl("PropertyName"),s,r);var h=i.filter;if(h){var c=Yu(fw,"Filter");t.appendChild(c),ww(c,h,r)}}))},"http://www.opengis.net/ogc":{During:$u((function(t,e,r){var n=Yu("http://www.opengis.net/fes","ValueReference");jm(n,e.propertyName),t.appendChild(n);var i=Yu(wm,"TimePeriod");t.appendChild(i);var o=Yu(wm,"begin");i.appendChild(o),Rw(o,e.begin);var a=Yu(wm,"end");i.appendChild(a),Rw(a,e.end)})),And:$u(Sw),Or:$u(Sw),Not:$u((function(t,e,r){var n={node:t},i=e.condition;sl(n,xw,tl(i.getTagName()),[i],r)})),BBOX:$u((function(t,e,r){r[r.length-1].srsName=e.srsName,Cw(t,e.geometryName),Um.prototype.writeGeometryElement(t,e.extent,r)})),Contains:$u((function(t,e,r){r[r.length-1].srsName=e.srsName,Cw(t,e.geometryName),Um.prototy
 pe.writeGeometryElement(t,e.geometry,r)})),Intersects:$u((function(t,e,r){r[r.length-1].srsName=e.srsName,Cw(t,e.geometryName),Um.prototype.writeGeometryElement(t,e.geometry,r)})),Within:$u((function(t,e,r){r[r.length-1].srsName=e.srsName,Cw(t,e.geometryName),Um.prototype.writeGeometryElement(t,e.geometry,r)})),PropertyIsEqualTo:$u(Tw),PropertyIsNotEqualTo:$u(Tw),PropertyIsLessThan:$u(Tw),PropertyIsLessThanOrEqualTo:$u(Tw),PropertyIsGreaterThan:$u(Tw),PropertyIsGreaterThanOrEqualTo:$u(Tw),PropertyIsNull:$u((function(t,e,r){Cw(t,e.propertyName)})),PropertyIsBetween:$u((function(t,e,r){Cw(t,e.propertyName);var n=Yu(fw,"LowerBoundary");t.appendChild(n),Pw(n,""+e.lowerBoundary);var i=Yu(fw,"UpperBoundary");t.appendChild(i),Pw(i,""+e.upperBoundary)})),PropertyIsLike:$u((function(t,e,r){t.setAttribute("wildCard",e.wildCard),t.setAttribute("singleChar",e.singleChar),t.setAttribute("escapeChar",e.escapeChar),void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString());Cw(t,e.pro
 pertyName),Pw(t,""+e.pattern)}))}};function ww(t,e,r){sl({node:t},xw,tl(e.getTagName()),[e],r)}function Sw(t,e,r){for(var n={node:t},i=e.conditions,o=0,a=i.length;o<a;++o){var s=i[o];sl(n,xw,tl(s.getTagName()),[s],r)}}function Tw(t,e,r){void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),Cw(t,e.propertyName),Pw(t,""+e.expression)}function Ew(t,e,r){var n=Yu(fw,t);jm(n,r),e.appendChild(n)}function Cw(t,e){Ew("PropertyName",t,e)}function Pw(t,e){Ew("Literal",t,e)}function Rw(t,e){var r=Yu(wm,"TimeInstant");t.appendChild(r);var n=Yu(wm,"timePosition");r.appendChild(n),jm(n,e)}var Ow=yw,Iw=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Lw={POINT:gn,LINESTRING:Cd,POLYGON:Ln,MULTIPOINT:qd,MU
 LTILINESTRING:Vd,MULTIPOLYGON:Kd},Mw=1,Fw=2,Aw=3,kw=4,Nw=5,jw=6,Gw={};for(var Dw in yt)Gw[Dw]=yt[Dw].toUpperCase();var zw=function(){function t(t){this.wkt=t,this.index_=-1}return t.prototype.isAlpha_=function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.isNumeric_=function(t,e){return t>="0"&&t<="9"||"."==t&&!(void 0!==e&&e)},t.prototype.isWhiteSpace_=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.nextChar_=function(){return this.wkt.charAt(++this.index_)},t.prototype.nextToken=function(){var t,e=this.nextChar_(),r=this.index_,n=e;if("("==e)t=Fw;else if(","==e)t=Nw;else if(")"==e)t=Aw;else if(this.isNumeric_(e)||"-"==e)t=kw,n=this.readNumber_();else if(this.isAlpha_(e))t=Mw,n=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(""!==e)throw new Error("Unexpected character: "+e);t=jw}return{position:r,value:n,type:t}},t.prototype.readNumber_=function(){var t,e=this.index_,r=!1,n=!1;do{"."==t?r=!0:"e"!=t&&"E"!=t||(n=!0),t=this.nextChar_
 ()}while(this.isNumeric_(t,r)||!n&&("e"==t||"E"==t)||n&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(e,this.index_--))},t.prototype.readText_=function(){var t,e=this.index_;do{t=this.nextChar_()}while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()},t}(),Uw=function(){function t(t){this.lexer_=t,this.token_,this.layout_=pt}return t.prototype.consume_=function(){this.token_=this.lexer_.nextToken()},t.prototype.isTokenType=function(t){return this.token_.type==t},t.prototype.match=function(t){var e=this.isTokenType(t);return e&&this.consume_(),e},t.prototype.parse=function(){return this.consume_(),this.parseGeometry_()},t.prototype.parseGeometryLayout_=function(){var t=pt,e=this.token_;if(this.isTokenType(Mw)){var r=e.value;"Z"===r?t=ft:"M"===r?t=dt:"ZM"===r&&(t=gt),t!==pt&&this.consume_()}return t},t.prototype.parseGeometryCollectionText_=function(){if(this.match(Fw)){var t=[];do{t.push(this.parseGeometry_())}while(this.match(Nw));if(this.match(Aw)
 )return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parsePointText_=function(){if(this.match(Fw)){var t=this.parsePoint_();if(this.match(Aw))return t}else if(this.isEmptyGeometry_())return null;throw new Error(this.formatErrorMessage_())},t.prototype.parseLineStringText_=function(){if(this.match(Fw)){var t=this.parsePointList_();if(this.match(Aw))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parsePolygonText_=function(){if(this.match(Fw)){var t=this.parseLineStringTextList_();if(this.match(Aw))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPointText_=function(){if(this.match(Fw)){var t=void 0;if(t=this.token_.type==Fw?this.parsePointTextList_():this.parsePointList_(),this.match(Aw))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiLi
 neStringText_=function(){if(this.match(Fw)){var t=this.parseLineStringTextList_();if(this.match(Aw))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPolygonText_=function(){if(this.match(Fw)){var t=this.parsePolygonTextList_();if(this.match(Aw))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parsePoint_=function(){for(var t=[],e=this.layout_.length,r=0;r<e;++r){var n=this.token_;if(!this.match(kw))break;t.push(n.value)}if(t.length==e)return t;throw new Error(this.formatErrorMessage_())},t.prototype.parsePointList_=function(){for(var t=[this.parsePoint_()];this.match(Nw);)t.push(this.parsePoint_());return t},t.prototype.parsePointTextList_=function(){for(var t=[this.parsePointText_()];this.match(Nw);)t.push(this.parsePointText_());return t},t.prototype.parseLineStringTextList_=function(){for(var t=[this.parseLineStringText_()];this.match(Nw);)t.push(this.pars
 eLineStringText_());return t},t.prototype.parsePolygonTextList_=function(){for(var t=[this.parsePolygonText_()];this.match(Nw);)t.push(this.parsePolygonText_());return t},t.prototype.isEmptyGeometry_=function(){var t=this.isTokenType(Mw)&&"EMPTY"==this.token_.value;return t&&this.consume_(),t},t.prototype.formatErrorMessage_=function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"},t.prototype.parseGeometry_=function(){var t=this.token_;if(this.match(Mw)){var e=t.value;if(this.layout_=this.parseGeometryLayout_(),"GEOMETRYCOLLECTION"==e){var r=this.parseGeometryCollectionText_();return new Bg(r)}var n=Lw[e];if(!n)throw new Error("Invalid geometry type: "+e);var i=void 0;switch(e){case"POINT":i=this.parsePointText_();break;case"LINESTRING":i=this.parseLineStringText_();break;case"POLYGON":i=this.parsePolygonText_();break;case"MULTIPOINT":i=this.parseMultiPointText_();break;case"MULTILINESTRING":i=this.parseMultiLineStringText_
 ();break;case"MULTIPOLYGON":i=this.parseMultiPolygonText_();break;default:throw new Error("Invalid geometry type: "+e)}return i||(i=n===Lw.POINT?[NaN,NaN]:[]),new n(i,this.layout_)}throw new Error(this.formatErrorMessage_())},t}(),Bw=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.splitCollection_=void 0!==n.splitCollection&&n.splitCollection,r}return Iw(e,t),e.prototype.parse_=function(t){var e=new zw(t);return new Uw(e).parse()},e.prototype.readFeatureFromText=function(t,e){var r=this.readGeometryFromText(t,e);if(r){var n=new ct;return n.setGeometry(r),n}return null},e.prototype.readFeaturesFromText=function(t,e){for(var r=[],n=this.readGeometryFromText(t,e),i=[],o=0,a=(r=this.splitCollection_&&n.getType()==yt.GEOMETRY_COLLECTION?n.getGeometriesArray():[n]).length;o<a;++o){var s=new ct;s.setGeometry(r[o]),i.push(s)}return i},e.prototype.readGeometryFromText=function(t,e){var r=this.parse_(t);return r?Ud(r,!1,e):null},e.prototype.writeFeatureText=function(t,e){v
 ar r=t.getGeometry();return r?this.writeGeometryText(r,e):""},e.prototype.writeFeaturesText=function(t,e){if(1==t.length)return this.writeFeatureText(t[0],e);for(var r=[],n=0,i=t.length;n<i;++n)r.push(t[n].getGeometry());var o=new Bg(r);return this.writeGeometryText(o,e)},e.prototype.writeGeometryText=function(t,e){return Xw(Ud(t,!0,e))},e}(Bv);function Yw(t){var e=t.getCoordinates();return 0===e.length?"":e.join(" ")}function Vw(t){for(var e=t.getCoordinates(),r=[],n=0,i=e.length;n<i;++n)r.push(e[n].join(" "));return r.join(",")}function Ww(t){for(var e=[],r=t.getLinearRings(),n=0,i=r.length;n<i;++n)e.push("("+Vw(r[n])+")");return e.join(",")}var qw={Point:Yw,LineString:Vw,Polygon:Ww,MultiPoint:function(t){for(var e=[],r=t.getPoints(),n=0,i=r.length;n<i;++n)e.push("("+Yw(r[n])+")");return e.join(",")},MultiLineString:function(t){for(var e=[],r=t.getLineStrings(),n=0,i=r.length;n<i;++n)e.push("("+Vw(r[n])+")");return e.join(",")},MultiPolygon:function(t){for(var e=[],r=t.getPolygons
 (),n=0,i=r.length;n<i;++n)e.push("("+Ww(r[n])+")");return e.join(",")},GeometryCollection:function(t){for(var e=[],r=t.getGeometries(),n=0,i=r.length;n<i;++n)e.push(Xw(r[n]));return e.join(",")}};function Xw(t){var e=t.getType(),r=(0,qw[e])(t);if(e=e.toUpperCase(),"function"==typeof t.getFlatCoordinates){var n=function(t){var e=t.getLayout(),r="";return e!==ft&&e!==gt||(r+="Z"),e!==dt&&e!==gt||(r+="M"),r}(t);n.length>0&&(e+=" "+n)}return 0===r.length?e+" EMPTY":e+"("+r+")"}var Zw=Bw,Kw=function(){function t(){}return t.prototype.read=function(t){if(t){if("string"==typeof t){var e=qu(t);return this.readFromDocument(e)}return Wu(t)?this.readFromDocument(t):this.readFromNode(t)}return null},t.prototype.readFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFromNode(e);return null},t.prototype.readFromNode=function(t){},t}();function Hw(t){return t.getAttributeNS("http://www.w3.org/1999/xlink","href")}var Jw=function(){var 
 t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$w=[null,"http://www.opengis.net/wms"],Qw=nl($w,{Service:Ju((function(t,e){return ol({},rS,t,e)})),Capability:Ju((function(t,e){return ol({},tS,t,e)}))}),tS=nl($w,{Request:Ju((function(t,e){return ol({},hS,t,e)})),Exception:Ju((function(t,e){return ol([],aS,t,e)})),Layer:Ju((function(t,e){return ol({},sS,t,e)}))}),eS=function(t){function e(){var e=t.call(this)||this;return e.version=void 0,e}return Jw(e,t),e.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var e=ol({version:this.version},Qw,t,[]);return e||null},e}(Kw),rS=nl($w,{Name:Ju(Fm),Title:Ju(Fm),Abstract:Ju(Fm),KeywordList:Ju(bS),OnlineResource:Ju(Hw),ContactInformation:Ju((function(t,
 e){return ol({},nS,t,e)})),Fees:Ju(Fm),AccessConstraints:Ju(Fm),LayerLimit:Ju(Lm),MaxWidth:Ju(Lm),MaxHeight:Ju(Lm)}),nS=nl($w,{ContactPersonPrimary:Ju((function(t,e){return ol({},iS,t,e)})),ContactPosition:Ju(Fm),ContactAddress:Ju((function(t,e){return ol({},oS,t,e)})),ContactVoiceTelephone:Ju(Fm),ContactFacsimileTelephone:Ju(Fm),ContactElectronicMailAddress:Ju(Fm)}),iS=nl($w,{ContactPerson:Ju(Fm),ContactOrganization:Ju(Fm)}),oS=nl($w,{AddressType:Ju(Fm),Address:Ju(Fm),City:Ju(Fm),StateOrProvince:Ju(Fm),PostCode:Ju(Fm),Country:Ju(Fm)}),aS=nl($w,{Format:Zu(Fm)}),sS=nl($w,{Name:Ju(Fm),Title:Ju(Fm),Abstract:Ju(Fm),KeywordList:Ju(bS),CRS:Hu(Fm),EX_GeographicBoundingBox:Ju((function(t,e){var r=ol({},lS,t,e);if(!r)return;var n=r.westBoundLongitude,i=r.southBoundLatitude,o=r.eastBoundLongitude,a=r.northBoundLatitude;if(void 0===n||void 0===i||void 0===o||void 0===a)return;return[n,i,o,a]})),BoundingBox:Hu((function(t,e){var r=[Im(t.getAttribute("minx")),Im(t.getAttribute("miny")),Im(t.getA
 ttribute("maxx")),Im(t.getAttribute("maxy"))],n=[Im(t.getAttribute("resx")),Im(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:r,res:n}})),Dimension:Hu((function(t,e){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:Pm(t.getAttribute("multipleValues")),nearestValue:Pm(t.getAttribute("nearestValue")),current:Pm(t.getAttribute("current")),values:Fm(t)}})),Attribution:Ju((function(t,e){return ol({},uS,t,e)})),AuthorityURL:Hu((function(t,e){var r=mS(t,e);if(r)return r.name=t.getAttribute("name"),r;return})),Identifier:Hu(Fm),MetadataURL:Hu((function(t,e){var r=mS(t,e);if(r)return r.type=t.getAttribute("type"),r;return})),DataURL:Hu(mS),FeatureListURL:Hu(mS),Style:Hu((function(t,e){return ol({},dS,t,e)})),MinScaleDenominator:Ju(Om),MaxScaleDenominator:Ju(Om),Layer:Hu((function(t,e){var r=e[e.length-1],n=ol({},sS,t,e);if(!n)return;var i=Pm(t.getAttribute("queryable"));
 void 0===i&&(i=r.queryable);n.queryable=void 0!==i&&i;var o=Mm(t.getAttribute("cascaded"));void 0===o&&(o=r.cascaded);n.cascaded=o;var a=Pm(t.getAttribute("opaque"));void 0===a&&(a=r.opaque);n.opaque=void 0!==a&&a;var s=Pm(t.getAttribute("noSubsets"));void 0===s&&(s=r.noSubsets);n.noSubsets=void 0!==s&&s;var u=Im(t.getAttribute("fixedWidth"));u||(u=r.fixedWidth);n.fixedWidth=u;var l=Im(t.getAttribute("fixedHeight"));l||(l=r.fixedHeight);n.fixedHeight=l,["Style","CRS","AuthorityURL"].forEach((function(t){if(t in r){var e=n[t]||[];n[t]=e.concat(r[t])}}));return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach((function(t){if(!(t in n)){var e=r[t];n[t]=e}})),n}))}),uS=nl($w,{Title:Ju(Fm),OnlineResource:Ju(Hw),LogoURL:Ju(_S)}),lS=nl($w,{westBoundLongitude:Ju(Om),eastBoundLongitude:Ju(Om),southBoundLatitude:Ju(Om),northBoundLatitude:Ju(Om)}),hS=nl($w,{GetCapabilities:Ju(vS),GetMap:Ju(vS),GetFeatureInfo:Ju(vS)}),cS=nl(
 $w,{Format:Hu(Fm),DCPType:Hu((function(t,e){return ol({},pS,t,e)}))}),pS=nl($w,{HTTP:Ju((function(t,e){return ol({},fS,t,e)}))}),fS=nl($w,{Get:Ju(mS),Post:Ju(mS)}),dS=nl($w,{Name:Ju(Fm),Title:Ju(Fm),Abstract:Ju(Fm),LegendURL:Hu(_S),StyleSheetURL:Ju(mS),StyleURL:Ju(mS)}),gS=nl($w,{Format:Ju(Fm),OnlineResource:Ju(Hw)}),yS=nl($w,{Keyword:Zu(Fm)});function mS(t,e){return ol({},gS,t,e)}function vS(t,e){return ol({},cS,t,e)}function _S(t,e){var r=mS(t,e);if(r){var n=[Mm(t.getAttribute("width")),Mm(t.getAttribute("height"))];return r.size=n,r}}function bS(t,e){return ol([],yS,t,e)}var xS=eS,wS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),SS=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.fea
 tureNS_="http://mapserver.gis.umn.edu/mapserver",r.gmlFormat_=new Xm,r.layers_=n.layers?n.layers:null,r}return wS(e,t),e.prototype.getLayers=function(){return this.layers_},e.prototype.setLayers=function(t){this.layers_=t},e.prototype.readFeatures_=function(t,e){t.setAttribute("namespaceURI",this.featureNS_);var r=t.localName,n=[];if(0===t.childNodes.length)return n;if("msGMLOutput"==r)for(var i=0,o=t.childNodes.length;i<o;i++){var a=t.childNodes[i];if(a.nodeType===Node.ELEMENT_NODE){var s=a,u=e[0],l=s.localName.replace("_layer","");if(!this.layers_||d(this.layers_,l)){var h=l+"_feature";u.featureType=h,u.featureNS=this.featureNS_;var c={};c[h]=Zu(this.gmlFormat_.readFeatureElement,this.gmlFormat_);var p=nl([u.featureNS,null],c);s.setAttribute("namespaceURI",this.featureNS_);var f=ol([],p,s,e,this.gmlFormat_);f&&m(n,f)}}}if("FeatureCollection"==r){var g=ol([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,[{}],this.gmlFormat_);g&&(n=g)}return n},e.prototype.readFeaturesFromNode=functi
 on(t,e){var r={};return e&&T(r,this.getReadOptions(t,e)),this.readFeatures_(t,[r])},e}(bm),TS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ES=[null,"http://www.opengis.net/ows/1.1"],CS=nl(ES,{ServiceIdentification:Ju((function(t,e){return ol({},DS,t,e)})),ServiceProvider:Ju((function(t,e){return ol({},zS,t,e)})),OperationsMetadata:Ju((function(t,e){return ol({},kS,t,e)}))}),PS=function(t){function e(){return t.call(this)||this}return TS(e,t),e.prototype.readFromNode=function(t){var e=ol({},CS,t,[]);return e||null},e}(Kw),RS=nl(ES,{DeliveryPoint:Ju(Fm),City:Ju(Fm),AdministrativeArea:Ju(Fm),PostalCode:Ju(Fm),Country:Ju(Fm),ElectronicMailAddress:Ju(Fm)}),OS=nl(ES,{Value:Hu((function(t,e){return Fm(t)}))}),I
 S=nl(ES,{AllowedValues:Ju((function(t,e){return ol({},OS,t,e)}))}),LS=nl(ES,{Phone:Ju((function(t,e){return ol({},NS,t,e)})),Address:Ju((function(t,e){return ol({},RS,t,e)}))}),MS=nl(ES,{HTTP:Ju((function(t,e){return ol({},FS,t,e)}))}),FS=nl(ES,{Get:Hu((function(t,e){var r=Hw(t);if(!r)return;return ol({href:r},jS,t,e)})),Post:void 0}),AS=nl(ES,{DCP:Ju((function(t,e){return ol({},MS,t,e)}))}),kS=nl(ES,{Operation:function(t,e){var r=t.getAttribute("name"),n=ol({},AS,t,e);if(!n)return;e[e.length-1][r]=n}}),NS=nl(ES,{Voice:Ju(Fm),Facsimile:Ju(Fm)}),jS=nl(ES,{Constraint:Hu((function(t,e){var r=t.getAttribute("name");if(!r)return;return ol({name:r},IS,t,e)}))}),GS=nl(ES,{IndividualName:Ju(Fm),PositionName:Ju(Fm),ContactInfo:Ju((function(t,e){return ol({},LS,t,e)}))}),DS=nl(ES,{Abstract:Ju(Fm),AccessConstraints:Ju(Fm),Fees:Ju(Fm),Title:Ju(Fm),ServiceTypeVersion:Ju(Fm),ServiceType:Ju(Fm)}),zS=nl(ES,{ProviderName:Ju(Fm),ProviderSite:Ju(Hw),ServiceContact:Ju((function(t,e){return ol({},GS,t,e
 )}))});var US=PS,BS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),YS=[null,"http://www.opengis.net/wmts/1.0"],VS=[null,"http://www.opengis.net/ows/1.1"],WS=nl(YS,{Contents:Ju((function(t,e){return ol({},XS,t,e)}))}),qS=function(t){function e(){var e=t.call(this)||this;return e.owsParser_=new US,e}return BS(e,t),e.prototype.readFromNode=function(t){var e=t.getAttribute("version");e&&(e=e.trim());var r=this.owsParser_.readFromNode(t);return r?(r.version=e,(r=ol(r,WS,t,[]))||null):null},e}(Kw),XS=nl(YS,{Layer:Hu((function(t,e){return ol({},ZS,t,e)})),TileMatrixSet:Hu((function(t,e){return ol({},eT,t,e)}))}),ZS=nl(YS,{Style:Hu((function(t,e){var r=ol({},KS,t,e);if(!r)return;var n="true"===t.getAttribute("isDe
 fault");return r.isDefault=n,r})),Format:Hu(Fm),TileMatrixSetLink:Hu((function(t,e){return ol({},HS,t,e)})),Dimension:Hu((function(t,e){return ol({},QS,t,e)})),ResourceURL:Hu((function(t,e){var r=t.getAttribute("format"),n=t.getAttribute("template"),i=t.getAttribute("resourceType"),o={};r&&(o.format=r);n&&(o.template=n);i&&(o.resourceType=i);return o}))},nl(VS,{Title:Ju(Fm),Abstract:Ju(Fm),WGS84BoundingBox:Ju((function(t,e){var r=ol([],tT,t,e);if(2!=r.length)return;return Dt(r)})),Identifier:Ju(Fm)})),KS=nl(YS,{LegendURL:Hu((function(t,e){var r={};return r.format=t.getAttribute("format"),r.href=Hw(t),r}))},nl(VS,{Title:Ju(Fm),Identifier:Ju(Fm)})),HS=nl(YS,{TileMatrixSet:Ju(Fm),TileMatrixSetLimits:Ju((function(t,e){return ol([],JS,t,e)}))}),JS=nl(YS,{TileMatrixLimits:Zu((function(t,e){return ol({},$S,t,e)}))}),$S=nl(YS,{TileMatrix:Ju(Fm),MinTileRow:Ju(Lm),MaxTileRow:Ju(Lm),MinTileCol:Ju(Lm),MaxTileCol:Ju(Lm)}),QS=nl(YS,{Default:Ju(Fm),Value:Hu(Fm)},nl(VS,{Identifier:Ju(Fm)})),tT=nl(V
 S,{LowerCorner:Zu(nT),UpperCorner:Zu(nT)}),eT=nl(YS,{WellKnownScaleSet:Ju(Fm),TileMatrix:Hu((function(t,e){return ol({},rT,t,e)}))},nl(VS,{SupportedCRS:Ju(Fm),Identifier:Ju(Fm)})),rT=nl(YS,{TopLeftCorner:Ju(nT),ScaleDenominator:Ju(Om),TileWidth:Ju(Lm),TileHeight:Ju(Lm),MatrixWidth:Ju(Lm),MatrixHeight:Ju(Lm)},nl(VS,{Identifier:Ju(Fm)}));function nT(t,e){var r=Fm(t).split(/\s+/);if(r&&2==r.length){var n=+r[0],i=+r[1];if(!isNaN(n)&&!isNaN(i))return[n,i]}}var iT=qS,oT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),aT=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],sT="enterfullscreen",uT="leavefullscreen";function lT(){var t=document.body;return!!(t.webkitRequestFullscreen||t.msRequestFullsc
 reen&&document.msFullscreenEnabled||t.requestFullscreen&&document.fullscreenEnabled)}function hT(){return!!(document.webkitIsFullScreen||document.msFullscreenElement||document.fullscreenElement)}function cT(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}var pT=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{element:document.createElement("div"),target:n.target})||this).cssClassName_=void 0!==n.className?n.className:"ol-full-screen";var i=void 0!==n.label?n.label:"⤢";r.labelNode_="string"==typeof i?document.createTextNode(i):i;var o=void 0!==n.labelActive?n.labelActive:"×";r.labelActiveNode_="string"==typeof o?document.createTextNode(o):o,r.button_=document.createElement("button");var a=n.tipLabel?n.tipLabel:"Toggle full-screen";r.setClassName_(r.button_,hT()),r.button_.setAttribute("type","button"),r.button_.title=a,r.button_.appendChild(r.labelNode_),r.button_.addEvent
 Listener(A,r.handleClick_.bind(r),!1);var s=r.cssClassName_+" ol-unselectable ol-control "+(lT()?"":"ol-unsupported"),u=r.element;return u.className=s,u.appendChild(r.button_),r.keys_=void 0!==n.keys&&n.keys,r.source_=n.source,r}return oT(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),this.handleFullScreen_()},e.prototype.handleFullScreen_=function(){if(lT()){var t=this.getMap();if(t)if(hT())document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen();else{var e=void 0;e=this.source_?"string"==typeof this.source_?document.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():cT(t)}(e):cT(e)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();hT()?(this.setClassName_(this.button_,!0),Wi(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(sT)):(this.setClassN
 ame_(this.button_,!1),Wi(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(uT)),t&&t.updateSize()},e.prototype.setClassName_=function(t,e){var r=this.cssClassName_+"-true",n=this.cssClassName_+"-false",i=e?r:n;t.classList.remove(r),t.classList.remove(n),t.classList.add(i)},e.prototype.setMap=function(e){if(t.prototype.setMap.call(this,e),e)for(var r=0,n=aT.length;r<n;++r)this.listenerKeys.push(W(document,aT[r],this.handleFullScreenChange_,this))},e}(Va),fT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),dT=function(t){function e(e){var r=this,n=e||{},i=document.createElement("div");return i.className=void 0!==n.className?n.className:"ol-mouse-position",(r=t.call(this,{element:i,render:n.render,targe
 t:n.target})||this).addEventListener(et("projection"),r.handleProjectionChanged_),n.coordinateFormat&&r.setCoordinateFormat(n.coordinateFormat),n.projection&&r.setProjection(n.projection),r.undefinedHTML_=void 0!==n.undefinedHTML?n.undefinedHTML:" ",r.renderOnMouseOut_=!!r.undefinedHTML_,r.renderedHTML_=i.innerHTML,r.mapProjection_=null,r.transform_=null,r}return fT(e,t),e.prototype.handleProjectionChanged_=function(){this.transform_=null},e.prototype.getCoordinateFormat=function(){return this.get("coordinateFormat")},e.prototype.getProjection=function(){return this.get("projection")},e.prototype.handleMouseMove=function(t){var e=this.getMap();this.updateHTML_(e.getEventPixel(t))},e.prototype.handleMouseOut=function(t){this.updateHTML_(null)},e.prototype.setMap=function(e){if(t.prototype.setMap.call(this,e),e){var r=e.getViewport();this.listenerKeys.push(W(r,Jo,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(W(r,ta,this.handleMouseOut,this))}},e.proto
 type.setCoordinateFormat=function(t){this.set("coordinateFormat",t)},e.prototype.setProjection=function(t){this.set("projection",yr(t))},e.prototype.updateHTML_=function(t){var e=this.undefinedHTML_;if(t&&this.mapProjection_){if(!this.transform_){var r=this.getProjection();this.transform_=r?Tr(this.mapProjection_,r):dr}var n=this.getMap().getCoordinateFromPixelInternal(t);if(n){var i=Mr();i&&(this.transform_=Tr(this.mapProjection_,i)),this.transform_(n,n);var o=this.getCoordinateFormat();e=o?o(n):n.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)},e.prototype.render=function(t){var e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null},e}(Va),gT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(
 e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),yT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return gT(e,t),e.prototype.createRenderer=function(){return new Bo(this)},e}(Ba),mT=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).boundHandleRotationChanged_=r.handleRotationChanged_.bind(r),r.collapsed_=void 0===n.collapsed||n.collapsed,r.collapsible_=void 0===n.collapsible||n.collapsible,r.collapsible_||(r.collapsed_=!1),r.rotateWithView_=void 0!==n.rotateWithView&&n.rotateWithView,r.viewExtent_=void 0;var i=void 0!==n.className?n.className:"ol-overviewmap",o=void 0!==n.tipLabel?n.tipLabel:"Overview map",a=void 0!==n.collapseLabel?n.collapseLabel:"«";"string"==typeof a?(r.collapseLabel_=document.createElement("span"),r.collapseLabel_.textContent=a):r.collapseLabel_=a;var s=voi
 d 0!==n.label?n.label:"»";"string"==typeof s?(r.label_=document.createElement("span"),r.label_.textContent=s):r.label_=s;var u=r.collapsible_&&!r.collapsed_?r.collapseLabel_:r.label_,l=document.createElement("button");l.setAttribute("type","button"),l.title=o,l.appendChild(u),l.addEventListener(A,r.handleClick_.bind(r),!1),r.ovmapDiv_=document.createElement("div"),r.ovmapDiv_.className="ol-overviewmap-map",r.view_=n.view,r.ovmap_=new yT({view:n.view});var h=r.ovmap_;n.layers&&n.layers.forEach((function(t){h.addLayer(t)}));var c=document.createElement("div");c.className="ol-overviewmap-box",c.style.boxSizing="border-box",r.boxOverlay_=new gu({position:[0,0],positioning:iu,element:c}),r.ovmap_.addOverlay(r.boxOverlay_);var p=i+" ol-unselectable ol-control"+(r.collapsed_&&r.collapsible_?" ol-collapsed":"")+(r.collapsible_?"":" ol-uncollapsible"),f=r.element;f.className=p,f.appendChild(r.ovmapDiv_),f.appendChild(l);var d=r,g=r.boxOverlay_,y=r.boxOverlay_.getElement(),m=function(t){var 
 e,r={clientX:(e=t).clientX,clientY:e.clientY},n=h.getEventCoordinateInternal(r);g.setPosition(n)},v=function(t){var e=h.getEventCoordinateInternal(t);d.getMap().getView().setCenterInternal(e),window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",v)};return y.addEventListener("mousedown",(function(){window.addEventListener("mousemove",m),window.addEventListener("mouseup",v)})),r}return gT(e,t),e.prototype.setMap=function(e){var r=this.getMap();if(e!==r){if(r){var n=r.getView();n&&this.unbindView_(n),this.ovmap_.setTarget(null)}if(t.prototype.setMap.call(this,e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(W(e,c,this.handleMapPropertyChange_,this));var i=e.getView();i&&(this.bindView_(i),i.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_()))}}},e.prototype.handleMapPropertyChange_=function(t){if(t.key===la){var e=t.oldValue;e&&this.unbindView_(e);var r=this.getMap().getView();this.bindView_(r)}},e.prototype.bindView_=function(t){if(!this
 .view_){var e=new ja({projection:t.getProjection()});this.ovmap_.setView(e)}t.addEventListener(et(wa),this.boundHandleRotationChanged_),this.handleRotationChanged_()},e.prototype.unbindView_=function(t){t.removeEventListener(et(wa),this.boundHandleRotationChanged_)},e.prototype.handleRotationChanged_=function(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())},e.prototype.validateExtent_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var r=t.getSize(),n=t.getView().calculateExtentInternal(r);if(!this.viewExtent_||!$t(n,this.viewExtent_)){this.viewExtent_=n;var i=e.getSize(),o=e.getView().calculateExtentInternal(i),a=e.getPixelFromCoordinateInternal(fe(n)),s=e.getPixelFromCoordinateInternal(se(n)),u=Math.abs(a[0]-s[0]),l=Math.abs(a[1]-s[1]),h=i[0],c=i[1];u<.1*h||l<.1*c||u>.75*h||l>.75*c?this.resetExtent_():Vt(o,n)||this.recenter_()}}},e.prototype.resetExtent_=function(){var t=this.getMap(),e=this.ovmap_,r=
 t.getSize(),n=t.getView().calculateExtentInternal(r),i=e.getView(),o=Math.log(7.5)/Math.LN2;ve(n,1/(.1*Math.pow(2,o/2))),i.fitInternal(Fn(n))},e.prototype.recenter_=function(){var t=this.getMap(),e=this.ovmap_,r=t.getView();e.getView().setCenterInternal(r.getCenterInternal())},e.prototype.updateBox_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var r=t.getSize(),n=t.getView(),i=e.getView(),o=this.rotateWithView_?0:-n.getRotation(),a=this.boxOverlay_,s=this.boxOverlay_.getElement(),u=n.getCenterInternal(),l=n.getResolution(),h=i.getResolution(),c=r[0]*l/h,p=r[1]*l/h;if(a.setPosition(u),s){s.style.width=c+"px",s.style.height=p+"px";var f="rotate("+o+"rad)";s.style.transform=f}}},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?Wi(this.collapseLabel_,this.label_):Wi(this.label_,this.collapseLabel_),this.collapsed_=!this.collap
 sed_;var t=this.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),q(t,na,(function(t){this.updateBox_()}),this)}},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.getRotateWithView=function(){return this.rotateWithView_},e.prototype.setRotateWithView=function(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))},e.prototype.getOverviewMap=function(){retur
 n this.ovmap_},e.prototype.render=function(t){this.validateExtent_(),this.updateBox_()},e}(Va),vT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_T="degrees",bT="imperial",xT="nautical",wT="metric",ST="us",TT=[1,2,5],ET=function(t){function e(e){var r=this,n=e||{},i=void 0!==n.className?n.className:n.bar?"ol-scale-bar":"ol-scale-line";return(r=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).innerElement_=document.createElement("div"),r.innerElement_.className=i+"-inner",r.element.className=i+" ol-unselectable",r.element.appendChild(r.innerElement_),r.viewState_=null,r.minWidth_=void 0!==n.minWidth?n.minWidth:64,r.renderedVisible_=!1,r.renderedWidth_=void 0,r.rend
 eredHTML_="",r.addEventListener(et("units"),r.handleUnitsChanged_),r.setUnits(n.units||wT),r.scaleBar_=n.bar||!1,r.scaleBarSteps_=n.steps||4,r.scaleBarText_=n.text||!1,r.dpi_=n.dpi||void 0,r}return vT(e,t),e.prototype.getUnits=function(){return this.get("units")},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set("units",t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,r=t.projection,n=this.getUnits(),i=n==_T?_t.DEGREES:_t.METERS,o=mr(r,t.resolution,e,i),a=this.minWidth_*(this.dpi_||25.4/.28)/(25.4/.28),s=a*o,u="";if(n==_T){var l=vt[_t.DEGREES];(s*=l)<l/60?(u="″",o*=3600):s<l?(u="′",o*=60):u="°"}else n==bT?s<.9144?(u="in",o/=.0254):s<1609.344?(u="ft",o/=.3048):(u="mi",o/=1609.344):n==xT?(o/=1852,u="nm"):n==wT?s<.001?(u="μm",o*=1e6):s<1?(u="mm",o*=1e3):s<1e3?u="m":(u="km",o/=1e3):n==ST?s<.9144?(u="in",o*=39.37):s<1609.344?(u="ft",o/=.30480061)
 :(u="mi",o/=1609.3472):lt(!1,33);for(var h,c,p,f,d=3*Math.floor(Math.log(a*o)/Math.log(10));;){p=Math.floor(d/3);var g=Math.pow(10,p);if(h=TT[(d%3+3)%3]*g,c=Math.round(h/o),isNaN(c))return this.element.style.display="none",void(this.renderedVisible_=!1);if(c>=a)break;++d}f=this.scaleBar_?this.createScaleBar(c,h,u):h.toFixed(p<0?-p:0)+" "+u,this.renderedHTML_!=f&&(this.innerElement_.innerHTML=f,this.renderedHTML_=f),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.createScaleBar=function(t,e,r){for(var n="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),i=[],o=t/this.scaleBarSteps_,a="#ffffff",s=0;s<this.scaleBarSteps_;s++)0===s&&i.push(this.createMarker("absolute",s)),i.push('<div><div class="ol-scale-singlebar" style="width: '+o+"px;background-color: "
 +a+';"></div>'+this.createMarker("relative",s)+(s%2==0||2===this.scaleBarSteps_?this.createStepText(s,t,!1,e,r):"")+"</div>"),s===this.scaleBarSteps_-1&&i.push(this.createStepText(s+1,t,!0,e,r)),a="#ffffff"===a?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+t+'px;">'+n+"</div>":"")+i.join("")+"</div>"},e.prototype.createMarker=function(t,e){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},e.prototype.createStepText=function(t,e,r,n,i){var o=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+i);return'<div class="ol-scale-step-text" style="margin-left: '+(0===t?-3:e/this.scaleBarSteps_*-1)+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+(0===t?0:e/this.scaleBarSteps_*2)+"px;left: "+(r?e+"px":"unset")+';">'+o+"</div>"},e.prototype.getScaleForResolution=function(){var t=mr(this.viewState_.projection,this.viewState_.resolution,t
 his.viewState_.center),e=this.dpi_||25.4/.28,r=this.viewState_.projection.getMetersPerUnit();return parseFloat(t.toString())*r*39.37*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(Va),CT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),PT=0,RT=1,OT=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{element:document.createElement("div"),render:n.render})||this).dragListenerKeys_=[],r.currentResolution_=void 0,r.direction_=PT,r.dragging_,r.heightLimit_=0,r.widthLimit_=0,r.startX_,r.startY_,r.thumbSize_=null,r.sliderInitialized_=!1,r.duration_=void 0!==n.duration?n.duration:200;var i=void 0!==n.className?n.className:"ol-zoomslider",o=d
 ocument.createElement("button");o.setAttribute("type","button"),o.className=i+"-thumb ol-unselectable";var a=r.element;return a.className=i+" ol-unselectable ol-control",a.appendChild(o),a.addEventListener($o,r.handleDraggerStart_.bind(r),!1),a.addEventListener(Jo,r.handleDraggerDrag_.bind(r),!1),a.addEventListener(Qo,r.handleDraggerEnd_.bind(r),!1),a.addEventListener(A,r.handleContainerClick_.bind(r),!1),o.addEventListener(A,l,!1),r}return CT(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e&&e.render()},e.prototype.initSlider_=function(){var t=this.element,e=t.offsetWidth,r=t.offsetHeight;if(0===e&&0===r)return this.sliderInitialized_=!1;var n=t.firstElementChild,i=getComputedStyle(n),o=n.offsetWidth+parseFloat(i.marginRight)+parseFloat(i.marginLeft),a=n.offsetHeight+parseFloat(i.marginTop)+parseFloat(i.marginBottom);return this.thumbSize_=[o,a],e>r?(this.direction_=RT,this.widthLimit_=e-o):(this.direction_=PT,this.heightLimit_=r-a),this.sliderInitialized_=!0},
 e.prototype.handleContainerClick_=function(t){var e=this.getMap().getView(),r=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),n=this.getResolutionForPosition_(r),i=e.getConstrainedZoom(e.getZoomForResolution(n));e.animateInternal({zoom:i,duration:this.duration_,easing:La})},e.prototype.handleDraggerStart_=function(t){if(!this.dragging_&&t.target===this.element.firstElementChild){var e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){var r=this.handleDraggerDrag_,n=this.handleDraggerEnd_;this.dragListenerKeys_.push(W(document,Jo,r,this),W(document,Qo,n,this))}}},e.prototype.handleDraggerDrag_=function(t){if(this.dragging_){var e=t.clientX-this.startX_,r=t.clientY-this.startY_,n=this.getRelativePosition_(e,r);this.currentResolution_=this.getResolutionForPosition_(n),this.
 getMap().getView().setResolution(this.currentResolution_)}},e.prototype.handleDraggerEnd_=function(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(X),this.dragListenerKeys_.length=0)},e.prototype.setThumbPosition_=function(t){var e=this.getPositionForResolution_(t),r=this.element.firstElementChild;this.direction_==RT?r.style.left=this.widthLimit_*e+"px":r.style.top=this.heightLimit_*e+"px"},e.prototype.getRelativePosition_=function(t,e){return we(this.direction_===RT?t/this.widthLimit_:e/this.heightLimit_,0,1)},e.prototype.getResolutionForPosition_=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},e.prototype.getPositionForResolution_=function(t){return we(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)},e.prototype.render=function(t){if(t.frameState&&(this.sliderInitialized_||this.initSlider_())){var e=t.frameState.viewState.resoluti
 on;this.currentResolution_=e,this.setThumbPosition_(e)}},e}(Va),IT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),LT=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{element:document.createElement("div"),target:n.target})||this).extent=n.extent?n.extent:null;var i=void 0!==n.className?n.className:"ol-zoom-extent",o=void 0!==n.label?n.label:"E",a=void 0!==n.tipLabel?n.tipLabel:"Fit to extent",s=document.createElement("button");s.setAttribute("type","button"),s.title=a,s.appendChild("string"==typeof o?document.createTextNode(o):o),s.addEventListener(A,r.handleClick_.bind(r),!1);var u=i+" ol-unselectable ol-control",l=r.element;return l.className=u,l.appendChild(s),r}return IT(e,t),e.prototype.han
 dleClick_=function(t){t.preventDefault(),this.handleZoomToExtent()},e.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(Fn(e))},e}(Va),MT={array:{},color:{},colorlike:{},control:{},coordinate:{},easing:{},events:{}};MT.events.condition={},MT.extent={},MT.featureloader={},MT.format={},MT.format.filter={},MT.geom={},MT.has={},MT.interaction={},MT.layer={},MT.loadingstrategy={},MT.proj={},MT.proj.Units={},MT.proj.proj4={},MT.render={},MT.render.canvas={},MT.renderer={},MT.renderer.canvas={},MT.renderer.webgl={},MT.size={},MT.source={},MT.sphere={},MT.style={},MT.style.IconImageCache={},MT.tilegrid={},MT.transform={},MT.util={},MT.webgl={},MT.xml={},MT.Collection=ut,MT.Feature=ct,MT.Geolocation=Zn,MT.Kinetic=Kn,MT.Map=Qs,MT.Object=rt,MT.Observable=H,MT.Observable.unByKey=K,MT.Overlay=gu,MT.PluggableMap=Ba,MT.View=ja,MT.array.stableSort=function(t,e){var r,n=t.length,i=Array(t.length);for(r=0;r<n;r+
 +)i[r]={index:r,value:t[r]};for(i.sort((function(t,r){return e(t.value,r.value)||t.index-r.index})),r=0;r<t.length;r++)t[r]=i[r].value},MT.color.asArray=ni,MT.color.asString=$n,MT.colorlike.asColorLike=Fi,MT.control.Attribution=qa,MT.control.Control=Va,MT.control.FullScreen=pT,MT.control.MousePosition=dT,MT.control.OverviewMap=mT,MT.control.Rotate=Za,MT.control.ScaleLine=ET,MT.control.Zoom=Ha,MT.control.ZoomSlider=OT,MT.control.ZoomToExtent=LT,MT.control.defaults=Ja,MT.coordinate.add=tr,MT.coordinate.createStringXY=function(t){return function(e){return hr(e,t)}},MT.coordinate.format=nr,MT.coordinate.rotate=or,MT.coordinate.toStringHDMS=function(t,e){return t?rr("NS",t[1],e)+" "+rr("EW",t[0],e):""},MT.coordinate.toStringXY=hr,MT.easing.easeIn=Ia,MT.easing.easeOut=La,MT.easing.inAndOut=Ma,MT.easing.linear=Fa,MT.easing.upAndDown=function(t){return t<.5?Ma(2*t):1-Ma(2*(t-.5))},MT.events.condition.altKeyOnly=us,MT.events.condition.altShiftKeysOnly=ls,MT.events.condition.always=ps,MT.even
 ts.condition.click=function(t){return t.type==Ho.CLICK},MT.events.condition.doubleClick=function(t){return t.type==Ho.DBLCLICK},MT.events.condition.focus=hs,MT.events.condition.mouseOnly=_s,MT.events.condition.never=ds,MT.events.condition.noModifierKeys=ys,MT.events.condition.penOnly=function(t){var e=t.originalEvent;return lt(void 0!==e,56),"pen"===e.pointerType},MT.events.condition.platformModifierKeyOnly=function(t){var e=t.originalEvent;return!e.altKey&&(ji?e.metaKey:e.ctrlKey)&&!e.shiftKey},MT.events.condition.pointerMove=function(t){return"pointermove"==t.type},MT.events.condition.primaryAction=bs,MT.events.condition.shiftKeyOnly=ms,MT.events.condition.singleClick=gs,MT.events.condition.targetNotEditable=vs,MT.events.condition.touchOnly=function(t){var e=t.originalEvent;return lt(void 0!==e,56),"touch"===e.pointerType},MT.extent.applyTransform=_e,MT.extent.boundingExtent=Dt,MT.extent.buffer=zt,MT.extent.containsCoordinate=Yt,MT.extent.containsExtent=Vt,MT.extent.containsXY=Wt,
 MT.extent.createEmpty=Xt,MT.extent.equals=$t,MT.extent.extend=Qt,MT.extent.getArea=oe,MT.extent.getBottomLeft=ae,MT.extent.getBottomRight=se,MT.extent.getCenter=ue,MT.extent.getHeight=ce,MT.extent.getIntersection=pe,MT.extent.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]},MT.extent.getTopLeft=fe,MT.extent.getTopRight=de,MT.extent.getWidth=ge,MT.extent.intersects=ye,MT.extent.isEmpty=me,MT.featureloader.setWithCredentials=function(t){bu=t},MT.featureloader.xhr=wu,MT.format.EsriJSON=vm,MT.format.Feature=zd,MT.format.GML=Ym,MT.format.GML2=Xm,MT.format.GML3=Um,MT.format.GML32=Hm,MT.format.GPX=Mv,MT.format.GeoJSON=Hg,MT.format.IGC=Jv,MT.format.IIIFInfo=Rc,MT.format.KML=Yb,MT.format.MVT=ag,MT.format.OSMXML=Jb,MT.format.Polyline=ox,MT.format.Polyline.decodeDeltas=ex,MT.format.Polyline.decodeFloats=nx,MT.format.Polyline.encodeDeltas=tx,MT.format.Polyline.encodeFloats=rx,MT.format.TopoJSON=dx,MT.format.WFS=Ow,MT.format.WFS.writeFilter=function(t){var e=Yu(fw,"Filter");return ww(e,t,[]),e},
 MT.format.WKT=Zw,MT.format.WMSCapabilities=xS,MT.format.WMSGetFeatureInfo=SS,MT.format.WMTSCapabilities=iT,MT.format.filter.Bbox=xx,MT.format.filter.Contains=Ex,MT.format.filter.During=Ox,MT.format.filter.EqualTo=Fx,MT.format.filter.GreaterThan=kx,MT.format.filter.GreaterThanOrEqualTo=jx,MT.format.filter.Intersects=Dx,MT.format.filter.IsBetween=Ux,MT.format.filter.IsLike=Yx,MT.format.filter.IsNull=Wx,MT.format.filter.LessThan=Xx,MT.format.filter.LessThanOrEqualTo=Kx,MT.format.filter.Not=Jx,MT.format.filter.NotEqualTo=Qx,MT.format.filter.Or=ew,MT.format.filter.Within=nw,MT.format.filter.and=iw,MT.format.filter.bbox=ow,MT.format.filter.between=function(t,e,r){return new Ux(t,e,r)},MT.format.filter.contains=function(t,e,r){return new Ex(t,e,r)},MT.format.filter.during=function(t,e,r){return new Ox(t,e,r)},MT.format.filter.equalTo=function(t,e,r){return new Fx(t,e,r)},MT.format.filter.greaterThan=function(t,e){return new kx(t,e)},MT.format.filter.greaterThanOrEqualTo=function(t,e){retur
 n new jx(t,e)},MT.format.filter.intersects=function(t,e,r){return new Dx(t,e,r)},MT.format.filter.isNull=function(t){return new Wx(t)},MT.format.filter.lessThan=function(t,e){return new Xx(t,e)},MT.format.filter.lessThanOrEqualTo=function(t,e){return new Kx(t,e)},MT.format.filter.like=function(t,e,r,n,i,o){return new Yx(t,e,r,n,i,o)},MT.format.filter.not=function(t){return new Jx(t)},MT.format.filter.notEqualTo=function(t,e,r){return new Qx(t,e,r)},MT.format.filter.or=function(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(ew,e))},MT.format.filter.within=function(t,e,r){return new nw(t,e,r)},MT.geom.Circle=wy,MT.geom.Geometry=Yr,MT.geom.GeometryCollection=Bg,MT.geom.LineString=Cd,MT.geom.LinearRing=fn,MT.geom.MultiLineString=Vd,MT.geom.MultiPoint=qd,MT.geom.MultiPolygon=Kd,MT.geom.Point=gn,MT.geom.Polygon=Ln,MT.geom.Polygon.circular=Mn,MT.geom.Polygon.fromCircle=An,MT.geom.Polygon.fromExtent=Fn,MT.geom.SimpleGeometry=qr,MT.has.
 DEVICE_PIXEL_RATIO=Gi,MT.interaction.DoubleClickZoom=ns,MT.interaction.DragAndDrop=my,MT.interaction.DragBox=Ms,MT.interaction.DragPan=ws,MT.interaction.DragRotate=Ts,MT.interaction.DragRotateAndZoom=_y,MT.interaction.DragZoom=As,MT.interaction.Draw=My,MT.interaction.Draw.createBox=function(){return function(t,e,r){var n=Dt(t.map((function(t){return Ar(t,r)}))),i=[[ae(n),se(n),de(n),fe(n),ae(n)]],o=e;o?o.setCoordinates(i):o=new Ln(i);var a=Mr();return a&&o.transform(r,a),o}},MT.interaction.Draw.createRegularPolygon=function(t,e){return function(r,n,i){var o=Ar(r[0],i),a=Ar(r[1],i),s=Math.sqrt(sr(o,a)),u=n||An(new wy(o),t),l=e;if(!e){var h=a[0]-o[0],c=a[1]-o[1];l=Math.atan(c/h)-(h<0?Math.PI:0)}kn(u,o,s,l);var p=Mr();return p&&u.transform(i,p),u}},MT.interaction.Extent=Dy,MT.interaction.Interaction=es,MT.interaction.KeyboardPan=zs,MT.interaction.KeyboardZoom=Bs,MT.interaction.Modify=Ky,MT.interaction.MouseWheelZoom=qs,MT.interaction.PinchRotate=Zs,MT.interaction.PinchZoom=Hs,MT.intera
 ction.Pointer=as,MT.interaction.Select=tm,MT.interaction.Snap=im,MT.interaction.Translate=hm,MT.interaction.defaults=Js,MT.layer.Base=_i,MT.layer.BaseImage=lp,MT.layer.BaseTile=xp,MT.layer.BaseVector=xf,MT.layer.Graticule=Fd,MT.layer.Group=Wo,MT.layer.Heatmap=Dd,MT.layer.Image=mp,MT.layer.Layer=Li,MT.layer.MapboxVector=cy,MT.layer.Tile=Cp,MT.layer.Vector=Rd,MT.layer.VectorImage=fy,MT.layer.VectorTile=ug,MT.loadingstrategy.all=Su,MT.loadingstrategy.bbox=function(t,e){return[t]},MT.loadingstrategy.tile=function(t){return function(e,r){var n=t.getZForResolution(r),i=t.getTileRangeForExtentAndZ(e,n),o=[],a=[n,0,0];for(a[1]=i.minX;a[1]<=i.maxX;++a[1])for(a[2]=i.minY;a[2]<=i.maxY;++a[2])o.push(t.getTileCoordExtent(a));return o}},MT.proj.Projection=xe,MT.proj.Units.METERS_PER_UNIT=vt,MT.proj.addCoordinateTransforms=xr,MT.proj.addEquivalentProjections=vr,MT.proj.addProjection=gr,MT.proj.equivalent=Sr,MT.proj.fromLonLat=wr,MT.proj.get=yr,MT.proj.getPointResolution=mr,MT.proj.getTransform=Er,
 MT.proj.proj4.register=function(t){var e,r,n=Object.keys(t.defs),i=n.length;for(e=0;e<i;++e){var o=n[e];if(!yr(o)){var a=t.defs(o);gr(new xe({code:o,axisOrientation:a.axis,metersPerUnit:a.to_meter,units:a.units}))}}for(e=0;e<i;++e){var s=n[e],u=yr(s);for(r=0;r<i;++r){var l=n[r],h=yr(l);if(!Xe(s,l)){var c=t.defs(s),p=t.defs(l);if(c===p)vr([u,h]);else{var f=t(T({},c,{axis:void 0}),T({},p,{axis:void 0}));xr(u,h,jr(u,h,f.forward),jr(h,u,f.inverse))}}}}},MT.proj.toLonLat=function(t,e){var r=Cr(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=r[0];return(n<-180||n>180)&&(r[0]=Oe(n+180,360)-180),r},MT.proj.transform=Cr,MT.proj.transformExtent=Pr,MT.render.VectorContext=Mi,MT.render.canvas.labelCache=to,MT.render.getRenderPixel=function(t,e){var r=e.slice(0);return Tt(t.inversePixelTransform.slice(),r),r},MT.render.getVectorContext=Ao,MT.render.toContext=function(t,e){var r=t.canvas,n=e||{},i=n.pixelRatio||Gi,o=n.size;o&&(r.width=o[0]*i,r.height=o[1]*i,r.style.width=o[0]+"px",r.style.height=o[1]+"
 px");var a=[0,0,r.width,r.height],s=Et([1,0,0,1,0,0],i,i);return new mo(t,i,a,s,0)},MT.renderer.Composite=Bo,MT.renderer.canvas.ImageLayer=gp,MT.renderer.canvas.TileLayer=Tp,MT.renderer.canvas.VectorImageLayer=gd,MT.renderer.canvas.VectorLayer=fd,MT.renderer.canvas.VectorTileLayer=wd,MT.renderer.webgl.PointsLayer=Of,MT.size.toSize=za,MT.source.BingMaps=Jh,MT.source.CartoDB=ec,MT.source.Cluster=fc,MT.source.IIIF=Lc,MT.source.Image=zc,MT.source.ImageArcGISRest=Yc,MT.source.ImageCanvas=Xc,MT.source.ImageMapGuide=Kc,MT.source.ImageStatic=Jc,MT.source.ImageWMS=ip,MT.source.OSM=sp,MT.source.OSM.ATTRIBUTION=ap,MT.source.Raster=Bp,MT.source.Source=Ah,MT.source.Stamen=Xp,MT.source.Tile=Gh,MT.source.TileArcGISRest=Kp,MT.source.TileDebug=$p,MT.source.TileImage=Zh,MT.source.TileJSON=tf,MT.source.TileWMS=rf,MT.source.UTFGrid=af,MT.source.Vector=cc,MT.source.VectorTile=ff,MT.source.WMTS=vf,MT.source.WMTS.optionsFromCapabilities=function(t,e){var r=v(t.Contents.Layer,(function(t,r,n){return t.Iden
 tifier==e.layer}));if(null===r)return null;var n,i=t.Contents.TileMatrixSet;(n=r.TileMatrixSetLink.length>1?b(r.TileMatrixSetLink,"projection"in e?function(t,r,n){var o=v(i,(function(e){return e.Identifier==t.TileMatrixSet})).SupportedCRS,a=yr(o.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||yr(o),s=yr(e.projection);return a&&s?Sr(a,s):o==e.projection}:function(t,r,n){return t.TileMatrixSet==e.matrixSet}):0)<0&&(n=0);var o=r.TileMatrixSetLink[n].TileMatrixSet,a=r.TileMatrixSetLink[n].TileMatrixSetLimits,s=r.Format[0];"format"in e&&(s=e.format),(n=b(r.Style,(function(t,r,n){return"style"in e?t.Title==e.style:t.isDefault})))<0&&(n=0);var u=r.Style[n].Identifier,l={};"Dimension"in r&&r.Dimension.forEach((function(t,e,r){var n=t.Identifier,i=t.Default;void 0===i&&(i=t.Value[0]),l[n]=i}));var h,c=v(t.Contents.TileMatrixSet,(function(t,e,r){return t.Identifier==o})),p=c.SupportedCRS;if(p&&(h=yr(p.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||yr(p)),"projection"in e){var
  f=yr(e.projection);f&&(h&&!Sr(f,h)||(h=f))}var g="ne"==h.getAxisOrientation().substr(0,2),y=c.TileMatrix[0],m={MinTileCol:0,MinTileRow:0,MaxTileCol:y.MatrixWidth-1,MaxTileRow:y.MatrixHeight-1};a&&(m=a[a.length-1],y=v(c.TileMatrix,(function(t){return t.Identifier===m.TileMatrix})));var _=28e-5*y.ScaleDenominator/h.getMetersPerUnit(),x=g?[y.TopLeftCorner[1],y.TopLeftCorner[0]]:y.TopLeftCorner,w=y.TileWidth*_,S=y.TileHeight*_,T=[x[0]+w*m.MinTileCol,x[1]-S*(1+m.MaxTileRow),x[0]+w*(1+m.MaxTileCol),x[1]-S*m.MinTileRow];null===h.getExtent()&&h.setExtent(T);var E=Al(c,T,a),C=[],P=e.requestEncoding;if(P=void 0!==P?P:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(var R=t.OperationsMetadata.GetTile.DCP.HTTP.Get,O=0,I=R.length;O<I;++O)if(R[O].Constraint){var L=v(R[O].Constraint,(function(t){return"GetEncoding"==t.name})).AllowedValues.Value;if(""===P&&(P=L[0]),P!==gf)break;d(L,gf)&&C.push(R[O].href)}else R[O].href&&(P=gf,C.push(R[O].href));return 0===C.length&&(P=yf,r.Resour
 ceURL.forEach((function(t){"tile"===t.resourceType&&(s=t.format,C.push(t.template))}))),{urls:C,layer:e.layer,matrixSet:o,format:s,projection:h,requestEncoding:P,tileGrid:E,style:u,dimensions:l,wrapX:!1,crossOrigin:e.crossOrigin}},MT.source.XYZ=Qh,MT.source.Zoomify=vc,MT.sphere.getArea=function t(e,r){var n=r||{},i=n.radius||6371008.8,o=n.projection||"EPSG:3857",a=e.getType();a!==yt.GEOMETRY_COLLECTION&&(e=e.clone().transform(o,"EPSG:4326"));var s,u,l,h,c,p,f=0;switch(a){case yt.POINT:case yt.MULTI_POINT:case yt.LINE_STRING:case yt.MULTI_LINE_STRING:case yt.LINEAR_RING:break;case yt.POLYGON:for(s=e.getCoordinates(),f=Math.abs(He(s[0],i)),l=1,h=s.length;l<h;++l)f-=Math.abs(He(s[l],i));break;case yt.MULTI_POLYGON:for(l=0,h=(s=e.getCoordinates()).length;l<h;++l)for(u=s[l],f+=Math.abs(He(u[0],i)),c=1,p=u.length;c<p;++c)f-=Math.abs(He(u[c],i));break;case yt.GEOMETRY_COLLECTION:var d=e.getGeometries();for(l=0,h=d.length;l<h;++l)f+=t(d[l],r);break;default:throw new Error("Unsupported geome
 try type: "+a)}return f},MT.sphere.getDistance=Ze,MT.sphere.getLength=function t(e,r){var n=r||{},i=n.radius||6371008.8,o=n.projection||"EPSG:3857",a=e.getType();a!==yt.GEOMETRY_COLLECTION&&(e=e.clone().transform(o,"EPSG:4326"));var s,u,l,h,c,p,f=0;switch(a){case yt.POINT:case yt.MULTI_POINT:break;case yt.LINE_STRING:case yt.LINEAR_RING:f=Ke(s=e.getCoordinates(),i);break;case yt.MULTI_LINE_STRING:case yt.POLYGON:for(l=0,h=(s=e.getCoordinates()).length;l<h;++l)f+=Ke(s[l],i);break;case yt.MULTI_POLYGON:for(l=0,h=(s=e.getCoordinates()).length;l<h;++l)for(c=0,p=(u=s[l]).length;c<p;++c)f+=Ke(u[c],i);break;case yt.GEOMETRY_COLLECTION:var d=e.getGeometries();for(l=0,h=d.length;l<h;++l)f+=t(d[l],r);break;default:throw new Error("Unsupported geometry type: "+a)}return f},MT.style.Circle=Dl,MT.style.Fill=zl,MT.style.Icon=rh,MT.style.IconImageCache.shared=ui,MT.style.Image=kl,MT.style.RegularShape=jl,MT.style.Stroke=nh,MT.style.Style=lh,MT.style.Text=ph,MT.tilegrid.TileGrid=Fu,MT.tilegrid.WMTS
 =Fl,MT.tilegrid.WMTS.createFromCapabilitiesMatrixSet=Al,MT.tilegrid.createXYZ=ku,MT.transform.composeCssTransform=function(t,e,r,n,i,o,a){return Rt(Ct([1,0,0,1,0,0],t,e,r,n,i,o,a))},MT.util.getUid=o,MT.webgl.ARRAY_BUFFER=34962,MT.webgl.Buffer=fl,MT.webgl.DYNAMIC_DRAW=35048,MT.webgl.ELEMENT_ARRAY_BUFFER=34963,MT.webgl.Helper=Rl,MT.webgl.Helper.computeAttributesStride=Cl,MT.webgl.PostProcessingPass=yl,MT.webgl.RenderTarget=Il,MT.webgl.STATIC_DRAW=35044,MT.webgl.STREAM_DRAW=35040,MT.xml.getAllTextContent=Vu,MT.xml.parse=qu,MT.xml.registerDocument=function(t){ll=t},MT.xml.registerXMLSerializer=function(t){ul=t};e.default=MT}]).default}));
+//# sourceMappingURL=ol.js.map
\ No newline at end of file

Copied: trunk/MgDev/Web/src/viewerfiles/ol.js.map (from rev 9698, sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.js.map)
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ol.js.map	                        (rev 0)
+++ trunk/MgDev/Web/src/viewerfiles/ol.js.map	2020-08-04 12:00:10 UTC (rev 9699)
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack://ol/webpack/universalModuleDefinition","webpack://ol/webpack/bootstrap","webpack://ol/./node_modules/@mapbox/mapbox-gl-style-spec/dist/index.es.js","webpack://ol/./node_modules/rbush/rbush.js","webpack://ol/./node_modules/mapbox-to-css-font/index.js","webpack://ol/./node_modules/ieee754/index.js","webpack://ol/(webpack)/buildin/global.js","webpack://ol/./node_modules/pbf/index.js","webpack://ol/./node_modules/webfont-matcher/lib/fonts/google.js","webpack://ol/./node_modules/buffer/index.js","webpack://ol/./node_modules/base64-js/index.js","webpack://ol/./node_modules/isarray/index.js","webpack://ol/./build/ol/util.js","webpack://ol/./build/ol/AssertionError.js","webpack://ol/./build/ol/events/Event.js","webpack://ol/./build/ol/ObjectEventType.js","webpack://ol/./build/ol/Disposable.js","webpack://ol/./build/ol/array.js","webpack://ol/./build/ol/functions.js","webpack://ol/./build/ol/obj.js","webpack://ol/./build/ol/events/Target.js","webpack://ol/./
 build/ol/events/EventType.js","webpack://ol/./build/ol/events.js","webpack://ol/./build/ol/Observable.js","webpack://ol/./build/ol/Object.js","webpack://ol/./build/ol/CollectionEventType.js","webpack://ol/./build/ol/Collection.js","webpack://ol/./build/ol/asserts.js","webpack://ol/./build/ol/Feature.js","webpack://ol/./build/ol/geom/GeometryLayout.js","webpack://ol/./build/ol/geom/GeometryType.js","webpack://ol/./build/ol/proj/Units.js","webpack://ol/./build/ol/transform.js","webpack://ol/./build/ol/extent/Corner.js","webpack://ol/./build/ol/extent/Relationship.js","webpack://ol/./build/ol/extent.js","webpack://ol/./build/ol/proj/Projection.js","webpack://ol/./build/ol/math.js","webpack://ol/./build/ol/proj/epsg3857.js","webpack://ol/./build/ol/proj/epsg4326.js","webpack://ol/./build/ol/proj/projections.js","webpack://ol/./build/ol/proj/transforms.js","webpack://ol/./build/ol/sphere.js","webpack://ol/./build/ol/string.js","webpack://ol/./build/ol/coordinate.js","webpack://ol/./build
 /ol/proj.js","webpack://ol/./build/ol/geom/flat/transform.js","webpack://ol/./build/ol/geom/Geometry.js","webpack://ol/./build/ol/geom/SimpleGeometry.js","webpack://ol/./build/ol/geom/flat/closest.js","webpack://ol/./build/ol/geom/flat/deflate.js","webpack://ol/./build/ol/geom/flat/simplify.js","webpack://ol/./build/ol/geom/flat/inflate.js","webpack://ol/./build/ol/geom/flat/area.js","webpack://ol/./build/ol/geom/LinearRing.js","webpack://ol/./build/ol/geom/Point.js","webpack://ol/./build/ol/geom/flat/contains.js","webpack://ol/./build/ol/geom/flat/interiorpoint.js","webpack://ol/./build/ol/geom/flat/segments.js","webpack://ol/./build/ol/geom/flat/intersectsextent.js","webpack://ol/./build/ol/geom/flat/reverse.js","webpack://ol/./build/ol/geom/flat/orient.js","webpack://ol/./build/ol/geom/Polygon.js","webpack://ol/./build/ol/Geolocation.js","webpack://ol/./build/ol/Kinetic.js","webpack://ol/./build/ol/color.js","webpack://ol/./build/ol/style/IconImageCache.js","webpack://ol/./build/
 ol/layer/Property.js","webpack://ol/./build/ol/layer/Base.js","webpack://ol/./build/ol/render/EventType.js","webpack://ol/./build/ol/source/State.js","webpack://ol/./build/ol/layer/Layer.js","webpack://ol/./build/ol/render/VectorContext.js","webpack://ol/./build/ol/colorlike.js","webpack://ol/./build/ol/has.js","webpack://ol/./build/ol/dom.js","webpack://ol/./build/ol/css.js","webpack://ol/./build/ol/render/canvas.js","webpack://ol/./build/ol/render/canvas/Immediate.js","webpack://ol/./build/ol/render/canvas/BuilderType.js","webpack://ol/./build/ol/ImageState.js","webpack://ol/./build/ol/renderer/vector.js","webpack://ol/./build/ol/render.js","webpack://ol/./build/ol/renderer/Map.js","webpack://ol/./build/ol/render/Event.js","webpack://ol/./build/ol/renderer/Composite.js","webpack://ol/./build/ol/layer/Group.js","webpack://ol/./build/ol/MapEvent.js","webpack://ol/./build/ol/MapBrowserEvent.js","webpack://ol/./build/ol/MapBrowserEventType.js","webpack://ol/./build/ol/pointer/EventTyp
 e.js","webpack://ol/./build/ol/MapBrowserEventHandler.js","webpack://ol/./build/ol/MapEventType.js","webpack://ol/./build/ol/MapProperty.js","webpack://ol/./build/ol/structs/PriorityQueue.js","webpack://ol/./build/ol/TileState.js","webpack://ol/./build/ol/TileQueue.js","webpack://ol/./build/ol/ViewHint.js","webpack://ol/./build/ol/ViewProperty.js","webpack://ol/./build/ol/centerconstraint.js","webpack://ol/./build/ol/resolutionconstraint.js","webpack://ol/./build/ol/rotationconstraint.js","webpack://ol/./build/ol/easing.js","webpack://ol/./build/ol/View.js","webpack://ol/./build/ol/tilegrid/common.js","webpack://ol/./build/ol/size.js","webpack://ol/./build/ol/PluggableMap.js","webpack://ol/./build/ol/control/Control.js","webpack://ol/./build/ol/control/Attribution.js","webpack://ol/./build/ol/control/Rotate.js","webpack://ol/./build/ol/control/Zoom.js","webpack://ol/./build/ol/control.js","webpack://ol/./build/ol/interaction/Property.js","webpack://ol/./build/ol/interaction/Interact
 ion.js","webpack://ol/./build/ol/interaction/DoubleClickZoom.js","webpack://ol/./build/ol/interaction/Pointer.js","webpack://ol/./build/ol/events/condition.js","webpack://ol/./build/ol/interaction/DragPan.js","webpack://ol/./build/ol/interaction/DragRotate.js","webpack://ol/./build/ol/render/Box.js","webpack://ol/./build/ol/interaction/DragBox.js","webpack://ol/./build/ol/interaction/DragZoom.js","webpack://ol/./build/ol/events/KeyCode.js","webpack://ol/./build/ol/interaction/KeyboardPan.js","webpack://ol/./build/ol/interaction/KeyboardZoom.js","webpack://ol/./build/ol/interaction/MouseWheelZoom.js","webpack://ol/./build/ol/interaction/PinchRotate.js","webpack://ol/./build/ol/interaction/PinchZoom.js","webpack://ol/./build/ol/interaction.js","webpack://ol/./build/ol/Map.js","webpack://ol/./build/ol/OverlayPositioning.js","webpack://ol/./build/ol/Overlay.js","webpack://ol/./build/ol/format/FormatType.js","webpack://ol/./build/ol/featureloader.js","webpack://ol/./build/ol/loadingstrat
 egy.js","webpack://ol/./build/ol/TileRange.js","webpack://ol/./build/ol/tilecoord.js","webpack://ol/./build/ol/tilegrid/TileGrid.js","webpack://ol/./build/ol/tilegrid.js","webpack://ol/./build/ol/webgl.js","webpack://ol/./build/ol/xml.js","webpack://ol/./build/ol/webgl/Buffer.js","webpack://ol/./build/ol/webgl/ContextEventType.js","webpack://ol/./build/ol/webgl/PostProcessingPass.js","webpack://ol/./build/ol/vec/mat4.js","webpack://ol/./build/ol/webgl/Helper.js","webpack://ol/./build/ol/webgl/RenderTarget.js","webpack://ol/./build/ol/tilegrid/WMTS.js","webpack://ol/./build/ol/style/Image.js","webpack://ol/./build/ol/style/RegularShape.js","webpack://ol/./build/ol/style/Circle.js","webpack://ol/./build/ol/style/Fill.js","webpack://ol/./build/ol/style/IconAnchorUnits.js","webpack://ol/./build/ol/style/IconOrigin.js","webpack://ol/./build/ol/ImageBase.js","webpack://ol/./build/ol/Image.js","webpack://ol/./build/ol/style/IconImage.js","webpack://ol/./build/ol/style/Icon.js","webpack://o
 l/./build/ol/style/Stroke.js","webpack://ol/./build/ol/style/Style.js","webpack://ol/./build/ol/style/TextPlacement.js","webpack://ol/./build/ol/style/Text.js","webpack://ol/./build/ol/Tile.js","webpack://ol/./build/ol/ImageTile.js","webpack://ol/./build/ol/reproj.js","webpack://ol/./build/ol/reproj/Triangulation.js","webpack://ol/./build/ol/source/common.js","webpack://ol/./build/ol/reproj/Tile.js","webpack://ol/./build/ol/reproj/common.js","webpack://ol/./build/ol/structs/LRUCache.js","webpack://ol/./build/ol/TileCache.js","webpack://ol/./build/ol/source/TileEventType.js","webpack://ol/./build/ol/source/Source.js","webpack://ol/./build/ol/source/Tile.js","webpack://ol/./build/ol/tileurlfunction.js","webpack://ol/./build/ol/source/UrlTile.js","webpack://ol/./build/ol/source/TileImage.js","webpack://ol/./build/ol/net.js","webpack://ol/./build/ol/source/BingMaps.js","webpack://ol/./build/ol/source/XYZ.js","webpack://ol/./build/ol/source/CartoDB.js","webpack://ol/./build/ol/structs/RB
 ush.js","webpack://ol/./build/ol/source/VectorEventType.js","webpack://ol/./build/ol/source/Vector.js","webpack://ol/./build/ol/source/Cluster.js","webpack://ol/./build/ol/source/Zoomify.js","webpack://ol/./build/ol/format/IIIFInfo.js","webpack://ol/./build/ol/source/IIIF.js","webpack://ol/./build/ol/reproj/Image.js","webpack://ol/./build/ol/source/Image.js","webpack://ol/./build/ol/uri.js","webpack://ol/./build/ol/source/ImageArcGISRest.js","webpack://ol/./build/ol/ImageCanvas.js","webpack://ol/./build/ol/source/ImageCanvas.js","webpack://ol/./build/ol/source/ImageMapGuide.js","webpack://ol/./build/ol/source/ImageStatic.js","webpack://ol/./build/ol/source/WMSServerType.js","webpack://ol/./build/ol/source/ImageWMS.js","webpack://ol/./build/ol/source/OSM.js","webpack://ol/./build/ol/layer/BaseImage.js","webpack://ol/./build/ol/renderer/Layer.js","webpack://ol/./build/ol/renderer/canvas/Layer.js","webpack://ol/./build/ol/renderer/canvas/ImageLayer.js","webpack://ol/./build/ol/layer/Im
 age.js","webpack://ol/./build/ol/layer/TileProperty.js","webpack://ol/./build/ol/layer/BaseTile.js","webpack://ol/./build/ol/renderer/canvas/TileLayer.js","webpack://ol/./build/ol/layer/Tile.js","webpack://ol/./build/ol/source/Raster.js","webpack://ol/./build/ol/source/Stamen.js","webpack://ol/./build/ol/source/TileArcGISRest.js","webpack://ol/./build/ol/source/TileDebug.js","webpack://ol/./build/ol/source/TileJSON.js","webpack://ol/./build/ol/source/TileWMS.js","webpack://ol/./build/ol/source/UTFGrid.js","webpack://ol/./build/ol/VectorTile.js","webpack://ol/./build/ol/VectorRenderTile.js","webpack://ol/./build/ol/source/VectorTile.js","webpack://ol/./build/ol/source/WMTSRequestEncoding.js","webpack://ol/./build/ol/source/WMTS.js","webpack://ol/./build/ol/layer/BaseVector.js","webpack://ol/./build/ol/renderer/webgl/Layer.js","webpack://ol/./build/ol/worker/webgl.js","webpack://ol/./build/ol/renderer/webgl/PointsLayer.js","webpack://ol/./build/ol/render/canvas/Instruction.js","webpac
 k://ol/./build/ol/render/canvas/Builder.js","webpack://ol/./build/ol/render/canvas/ImageBuilder.js","webpack://ol/./build/ol/render/canvas/LineStringBuilder.js","webpack://ol/./build/ol/render/canvas/PolygonBuilder.js","webpack://ol/./build/ol/geom/flat/straightchunk.js","webpack://ol/./build/ol/render/canvas/TextBuilder.js","webpack://ol/./build/ol/render/canvas/BuilderGroup.js","webpack://ol/./build/ol/geom/flat/textpath.js","webpack://ol/./build/ol/geom/flat/length.js","webpack://ol/./build/ol/render/canvas/Executor.js","webpack://ol/./build/ol/render/canvas/ExecutorGroup.js","webpack://ol/./build/ol/render/canvas/hitdetect.js","webpack://ol/./build/ol/renderer/canvas/VectorLayer.js","webpack://ol/./build/ol/renderer/canvas/VectorImageLayer.js","webpack://ol/./build/ol/layer/VectorTileRenderType.js","webpack://ol/./build/ol/renderer/canvas/VectorTileLayer.js","webpack://ol/./build/ol/geom/flat/interpolate.js","webpack://ol/./build/ol/geom/LineString.js","webpack://ol/./build/ol/l
 ayer/Vector.js","webpack://ol/./build/ol/geom/flat/geodesic.js","webpack://ol/./build/ol/layer/Graticule.js","webpack://ol/./build/ol/layer/Heatmap.js","webpack://ol/./build/ol/format/Feature.js","webpack://ol/./build/ol/geom/MultiLineString.js","webpack://ol/./build/ol/geom/MultiPoint.js","webpack://ol/./build/ol/geom/flat/center.js","webpack://ol/./build/ol/geom/MultiPolygon.js","webpack://ol/./build/ol/render/Feature.js","webpack://ol/./build/ol/format/MVT.js","webpack://ol/./build/ol/layer/VectorTile.js","webpack://ol/./node_modules/ol-mapbox-style/dist/util.js","webpack://ol/./node_modules/ol-mapbox-style/dist/stylefunction.js","webpack://ol/./build/ol/geom/GeometryCollection.js","webpack://ol/./build/ol/format/JSONFeature.js","webpack://ol/./build/ol/format/GeoJSON.js","webpack://ol/./node_modules/ol-mapbox-style/dist/index.js","webpack://ol/./build/ol/layer/MapboxVector.js","webpack://ol/./build/ol/layer/VectorImage.js","webpack://ol/./build/ol/interaction/DragAndDrop.js","we
 bpack://ol/./build/ol/interaction/DragRotateAndZoom.js","webpack://ol/./build/ol/geom/Circle.js","webpack://ol/./build/ol/interaction/Draw.js","webpack://ol/./build/ol/interaction/Extent.js","webpack://ol/./build/ol/interaction/Modify.js","webpack://ol/./build/ol/interaction/Select.js","webpack://ol/./build/ol/interaction/Snap.js","webpack://ol/./build/ol/interaction/Translate.js","webpack://ol/./build/ol/format/EsriJSON.js","webpack://ol/./build/ol/format/XMLFeature.js","webpack://ol/./build/ol/format/GMLBase.js","webpack://ol/./build/ol/format/xsd.js","webpack://ol/./build/ol/format/GML3.js","webpack://ol/./build/ol/format/GML.js","webpack://ol/./build/ol/format/GML2.js","webpack://ol/./build/ol/format/GML32.js","webpack://ol/./build/ol/format/GPX.js","webpack://ol/./build/ol/format/TextFeature.js","webpack://ol/./build/ol/format/KML.js","webpack://ol/./build/ol/format/IGC.js","webpack://ol/./build/ol/format/OSMXML.js","webpack://ol/./build/ol/geom/flat/flip.js","webpack://ol/./bu
 ild/ol/format/Polyline.js","webpack://ol/./build/ol/format/TopoJSON.js","webpack://ol/./build/ol/format/filter/Filter.js","webpack://ol/./build/ol/format/filter/LogicalNary.js","webpack://ol/./build/ol/format/filter/And.js","webpack://ol/./build/ol/format/filter/Bbox.js","webpack://ol/./build/ol/format/filter/Spatial.js","webpack://ol/./build/ol/format/filter/Contains.js","webpack://ol/./build/ol/format/filter/Comparison.js","webpack://ol/./build/ol/format/filter/During.js","webpack://ol/./build/ol/format/filter/ComparisonBinary.js","webpack://ol/./build/ol/format/filter/EqualTo.js","webpack://ol/./build/ol/format/filter/GreaterThan.js","webpack://ol/./build/ol/format/filter/GreaterThanOrEqualTo.js","webpack://ol/./build/ol/format/filter/Intersects.js","webpack://ol/./build/ol/format/filter/IsBetween.js","webpack://ol/./build/ol/format/filter/IsLike.js","webpack://ol/./build/ol/format/filter/IsNull.js","webpack://ol/./build/ol/format/filter/LessThan.js","webpack://ol/./build/ol/form
 at/filter/LessThanOrEqualTo.js","webpack://ol/./build/ol/format/filter/Not.js","webpack://ol/./build/ol/format/filter/NotEqualTo.js","webpack://ol/./build/ol/format/filter/Or.js","webpack://ol/./build/ol/format/filter/Within.js","webpack://ol/./build/ol/format/filter.js","webpack://ol/./build/ol/format/WFS.js","webpack://ol/./build/ol/format/WKT.js","webpack://ol/./build/ol/format/XML.js","webpack://ol/./build/ol/format/XLink.js","webpack://ol/./build/ol/format/WMSCapabilities.js","webpack://ol/./build/ol/format/WMSGetFeatureInfo.js","webpack://ol/./build/ol/format/OWS.js","webpack://ol/./build/ol/format/WMTSCapabilities.js","webpack://ol/./build/ol/control/FullScreen.js","webpack://ol/./build/ol/control/MousePosition.js","webpack://ol/./build/ol/control/OverviewMap.js","webpack://ol/./build/ol/control/ScaleLine.js","webpack://ol/./build/ol/control/ZoomSlider.js","webpack://ol/./build/ol/control/ZoomToExtent.js","webpack://ol/./build/index.js","webpack://ol/./build/ol/proj/proj4.js"
 ],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","v8","$version","$root","version","required","type","values","doc","example","metadata","center","zoom","bearing","period","units","pitch","light","anchor","color","intensity","sources","url","sprite","glyphs","transition","duration","delay","layers","id","source","paint","source_vector","vector","tiles","bounds","length","scheme","xyz","tms","minzoom","maxzoom","attribution","promoteId","source_raster","raster","tileSize","source_raster_dem","encoding","terrarium","mapbox","source_geojson","geojson","data","buffer","maximum","minimum","tolerance","cluster","clusterRadius","clusterMaxZoom","clusterProperties","lineMet
 rics","generateId","source_video","video","urls","coordinates","source_image","image","layer","fill","js","android","ios","macos","line","symbol","circle","heatmap","hillshade","background","filter","layout","layout_background","visibility","visible","none","layout_fill","expression","interpolated","parameters","layout_circle","layout_heatmap","layout_line","butt","round","square","bevel","miter","requires","layout_symbol","point","auto","map","viewport","width","height","both","tokens","left","right","top","bottom","horizontal","vertical","uppercase","lowercase","layout_raster","layout_hillshade","filter_operator","all","any","has","within","geometry_type","Point","LineString","Polygon","stops","base","identity","exponential","interval","categorical","colorSpace","rgb","lab","hcl","function_stop","expression_name","group","literal","array","at","slice","match","coalesce","step","interpolate","ln2","pi","e","string","number","boolean","collator","format","rgba","properties","accumul
 ated","sqrt","log10","ln","log2","sin","cos","tan","asin","acos","atan","min","max","abs","ceil","floor","distance","upcase","downcase","concat","position","paint_fill","paint_line","paint_circle","paint_heatmap","paint_symbol","overridable","paint_raster","linear","nearest","paint_hillshade","paint_background","constant","commonjsGlobal","globalThis","global","self","commonjsRequire","Error","createCommonjsModule","fn","punycode","freeExports","nodeType","freeModule","freeGlobal","maxInt","regexPunycode","regexNonASCII","regexSeparators","errors","Math","stringFromCharCode","String","fromCharCode","error","RangeError","result","mapDomain","parts","split","replace","join","ucs2decode","extra","output","counter","charCodeAt","push","ucs2encode","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","baseMinusTMin","decode","input","out","basic","j","index","oldi","w","baseMinusT","codePoint","inputLength","bias","lastIndexOf","splice","encode","handledCPCount","bas
 icLength","q","currentValue","handledCPCountPlusOne","qMinusT","test","toLowerCase","util","arg","obj","prop","qs","sep","eq","options","regexp","maxKeys","len","kstr","vstr","v","x","idx","indexOf","substr","decodeURIComponent","Array","isArray","stringifyPrimitive","isFinite","undefined","keys","ks","encodeURIComponent","querystring","parse","stringify","Url","this","protocol","slashes","auth","host","port","hostname","hash","search","query","pathname","path","href","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","hostlessProtocol","slashedProtocol","urlParse","parseQueryString","slashesDenoteHost","u","TypeError","queryIndex","splitter","uSplit","rest","trim","simplePath","exec","proto","lowerProto","atSign","hostEnd","hec","parseHost","ipv6Hostname","hostparts","part","newpart","validParts","notHost","bit","unshift","toASCII","h","ae","esc","escape","qm","charAt"
 ,"resolve","relative","resolveObject","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","shift","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","pop","authInHost","last","hasTrailingSlash","up","isAbsolute","extend","inputs","arguments","list","ParsingError","message","__proto__","constructor","Scope","parent","bindings","ref","NullType","kind","NumberType","StringType","BooleanType","ColorType","ObjectType","ValueType","CollatorType","FormattedType","ResolvedImageType","itemType","N","toString","valueMemberTypes","checkSubtype","expected","isValidType","provided","allowedTypes","some","isValidNativeType","csscolorparser_1","kCSSColorTable","clamp_css_byte","clamp_css_float","f","parse_css_int","str","parseFloat","parseInt","parse_css_float","css_hue_to_rgb","m1","m2","parseCSSColor","css_str","iv","op","ep","fname","params","alpha","Color","g","b","a","toArray","black","white","transparent","red","Collator","caseSensitive","diacriticSensitive","loc
 ale","sensitivity","Intl","usage","compare","lhs","rhs","resolvedLocale","resolvedOptions","FormattedSection","text","scale","fontStack","textColor","Formatted","sections","fromString","unformatted","isEmpty","section","serialize","serialized","ResolvedImage","available","validateRGBA","isValue","mixed","typeOf","toString$1","JSON","Literal","args","context","expectedType","evaluate","eachChild","outputDefined","RuntimeError","toJSON","types","Assertion","type$1","parsed","ctx","forEach","every","FormatExpression","firstArg","nextTokenMayBeObject","font","lastExpression","content","evaluatedContent","ImageExpression","evaluatedImageName","availableImages","types$1","Coercion","Boolean","parseColor","i$1","list$1","num","Number","isNaN","child","geometryTypes","EvaluationContext","globals","feature","featureState","formattedSection","_parseColorCache","canonical","geometryType","geometry","canonicalID","cached","CompoundExpression","_evaluate","ref$1","definition","definitions","avai
 lableOverloads","overloads","signature","signatureContext","i$3","ParsingContext","registry","scope","parsedArgs","argParseFailed","arg$1","apply","signatures","actualTypes","i$2","parsed$1","register","CollatorExpression","updateBBox","bbox","coord","boxWithinBox","bbox1","bbox2","getTileCoordinates","lat","y","PI","log","tilesAtZoom","pow","z","rayIntersect","p1","p2","pointWithinPolygon","rings","x1","y1","x2","y2","inside","ring","len2","pointWithinPolygons","polygons","twoSided","q1","q2","x3","y3","det1","det2","lineIntersectPolygon","polygon","v1","v2","vectorP","vectorQ","lineStringWithinPolygon","lineStringWithinPolygons","getTilePolygon","getTilePolygons","updatePoint","polyBBox","worldSize","halfWorldSize","getTilePoints","pointBBox","shifts","tilePoints","getTileLines","lineBBox","tileLines","tileLine","Infinity","list$3","list$2","Within","geometries","isFeatureConstant","isStateConstant","isGlobalPropertyConstant","features","polygonGeometry","tilePolygon","tilePolygon
 s","tilePoints$1","pointsWithinPolygons","tileLines$1","linesWithinPolygons","Var","boundExpression","findStopLessThanOrEqualTo","nextValue","lastIndex","lowerIndex","upperIndex","currentIndex","expr","_parse","annotate","typeAnnotation","Expr","actual","isConstant","isTypeAnnotation","childrenConstant","ec","error$1","Step","labels","outputs","label","outputType","labelKey","valueKey","stopCount","unitbezier","UnitBezier","p1x","p1y","p2x","p2y","cx","bx","ax","cy","by","ay","sampleCurveX","sampleCurveY","sampleCurveDerivativeX","solveCurveX","epsilon","t0","t1","t2","d2","solve","freeze","from","to","deg2rad","rad2deg","xyz2lab","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","labToRgb","labColor","interpolateHue","forward","reverse","atan2","hclColor","colorSpaces","Interpolate","operator","interpolation","exponentialInterpolation","lowerValue","upperValue","difference","progress","interpolationFactor","lower","upper","controlPoints","outputLower","outputUpper","Coalesce","ne
 edsAnnotation","requestedImageName","argCount","Let","At","In","needle","haystack","IndexOf","fromIndex","Match","inputType","cases","otherwise","labelContext","MAX_SAFE_INTEGER","this$1","groupedByOutput","outputLookup","sort","outputIndex","coerceLabel","outputIndex$1","Case","branches","Slice","beginIndex","endIndex","isComparableType","eqCollate","makeComparison","compareBasic","compareWithCollator","isOrderComparison","Comparison","hasUntypedArgument","lt","rt","lt$1","rt$1","Equals","NotEquals","LessThan","GreaterThan","LessThanOrEqual","GreaterThanOrEqual","NumberFormat","currency","minFractionDigits","maxFractionDigits","style","minimumFractionDigits","maximumFractionDigits","Length","expressions","varargs","success","supportsPropertyExpression","spec","supportsZoomExpression","supportsInterpolation","getType","val","isFunction$1","identityFunction","createFunction","propertySpec","innerFun","hashedStops","categoricalKeyType","isColor","zoomAndFeatureDependent","featureDepen
 dent","zoomDependent","stop","default","evaluateExponentialFunction","evaluateIntervalFunction","evaluateCategoricalFunction","evaluateIdentityFunction","featureFunctions","zoomStops","stop$1","featureFunctionStops","interpolationType","interpolationType$1","_","keyType","interp","colorspace","evaluatedLower","evaluatedUpper","heatmapDensity","lineProgress","LN2","E","LN10","binarySearch","isSupportedScript","toUpperCase","StyleExpression","_warningHistory","_evaluator","_defaultValue","_enumValues","isExpression","createExpression","parser","enum","formatted","resolvedImage","getExpectedType","evaluateWithoutErrorHandling","console","warn","ZoomConstantExpression","_styleExpression","isStateDependent","ZoomDependentExpression","createPropertyExpression","isFeatureConstant$1","isZoomConstant","zoomCurve","findZoomCurve","childResult","StylePropertyFunction","specification","_parameters","_specification","convertLiteral","convertFunction","convertIdentityFunction","convertTokenString
 ","featureFunctionParameters","getFunctionType","getInterpolateOperator","convertPropertyFunction","appendStopPair","expression$1","z$1","output$1","fixupDegenerateStepCurve","convertZoomAndPropertyFunction","isStep","convertZoomFunction","coalesce$1","expression$2","stop$2","expression$3","stop$3","curve","re","pos","isExpressionFilter","deserialize","filterSpec","createFilter","needGeometry","convertFilter","compiled","err","globalProperties","geometryNeeded","filters","convertComparisonOp","convertNegation","convertInOp","convertHasOp","refProperties","deref","derefLayers","ValidationError","identifier","__line__","ParsingError$1","validateConstants","constants","unbundle","valueOf","deepUnbundle","unbundledValue","validateObject","elementSpecs","valueSpec","elementValidators","objectElementValidators","styleSpec","objectKey","elementSpecKey","elementSpec","validateElement","validate","elementSpecKey$1","validateArray","arraySpec","validateArrayElement","arrayElementValidator","a
 rrayElementSpec","function","arrayIndex","validateNumber","validateFunction","stopKeyType","previousStopDomainValue","previousStopDomainZoom","functionValueSpec","functionType","stopDomainValues","isZoomFunction","isPropertyFunction","isZoomAndPropertyFunction","validateFunctionStop","validateStopDomainValue","reportValue","validateExpression","expressionContext","expressionObj","propertyKey","propertyType","validateEnum","validateFilter","validateNonExpressionFilter","validateProperty","layerSpec","layerType","transitionMatch","tokenMatch","validatePaintProperty","validateLayoutProperty","validateLayer","layerId","otherLayer","sourceType","validateString","validateSource","mapExpr","reduceExpr","validateLight","lightSpec","rootType","VALIDATORS","validateGlyphsURL","validateStyleMin","sortErrors","wrapCleanErrors","inner","paintProperty","layoutProperty","jsonlint","$V0","$V1","$V2","$V3","$V4","$V5","$V6","$V7","$V8","$V9","trace","yy","symbols_","terminals_","2","4","6","8","10",
 "11","14","17","18","21","22","23","24","productions_","performAction","yytext","yyleng","yylineno","yystate","$$","_$","$0","$","first_line","table","3","5","7","9","12","13","15","16","1","19","20","25","defaultActions","parseError","recoverable","stack","vstack","lstack","TERROR","EOF","lexer","sharedState","setInput","yylloc","yyloc","ranges","lex","token","getPrototypeOf","state","action","newState","yyval","errStr","showPosition","loc","last_line","first_column","last_column","range","_input","_more","_backtrack","done","matched","conditionStack","offset","ch","unput","lines","oldLines","more","reject","backtrack_lexer","less","pastInput","past","upcomingInput","next","pre","test_match","indexed_rule","backup","matches","tempMatch","rules","_currentRules","flex","begin","condition","popState","conditions","topState","pushState","stateStackSize","yy_","$avoiding_name_collisions","YY_START","Parser","readStyle","Buffer","validateStyle","normalizePropertyExpression","styleFunctio
 n","isFunction","latest","quickselect","arr","quickselectStep","exp","sd","newLeft","newRight","swap","defaultCompare","tmp","RBush","maxEntries","_maxEntries","_minEntries","clear","findItem","item","items","equalsFn","calcBBox","node","toBBox","distBBox","children","destNode","createNode","minX","minY","maxX","maxY","leaf","compareNodeMinX","compareNodeMinY","bboxArea","bboxMargin","contains","intersects","multiSelect","mid","_all","nodesToSearch","childBBox","collides","load","insert","_build","_splitRoot","tmpNode","_insert","remove","goingUp","indexes","_condense","compareMinX","compareMinY","fromJSON","M","N2","N1","right2","right3","_chooseSubtree","level","minArea","minEnlargement","targetNode","area","enlargement","isNode","insertPath","_split","_adjustParentBBoxes","_chooseSplitAxis","splitIndex","_chooseSplitIndex","newNode","minOverlap","overlap","_allDistMargin","leftBBox","rightBBox","margin","child$1","siblings","fontWeights","thin","hairline","book","regular","normal
 ","plain","roman","standard","medium","bold","heavy","fat","poster","italicRE","fontCache","fonts","size","lineHeight","cssData","weight","fontFamilies","ii","maybeWeight","fontFamily","read","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","write","Function","Pbf","ieee754","buf","ArrayBuffer","isView","Uint8Array","Varint","Fixed64","Bytes","Fixed32","utf8TextDecoder","TextDecoder","readPackedEnd","pbf","readVarint","toNum","low","high","isSigned","makeRoomForExtraLength","startPos","extraLen","realloc","writePackedVarint","writeVarint","writePackedSVarint","writeSVarint","writePackedFloat","writeFloat","writePackedDouble","writeDouble","writePackedBoolean","writeBoolean","writePackedFixed32","writeFixed32","writePackedSFixed32","writeSFixed32","writePackedFixed64","writeFixed64","writePackedSFixed64","writeSFixed64","readUInt32","writeInt32","readInt32","destroy","readFields","readField","end","tag","skip","readMessage","readFixed32","readSFixed32","readFixed64","readSF
 ixed64","readFloat","readDouble","readVarintRemainder","readVarint64","readSVarint","readBoolean","readString","subarray","readUtf8TextDecoder","b1","b2","b3","b0","bytesPerSequence","readUtf8","readBytes","readPackedVarint","readPackedSVarint","readPackedBoolean","readPackedFloat","readPackedDouble","readPackedFixed32","readPackedSFixed32","readPackedFixed64","readPackedSFixed64","writeTag","set","finish","writeBigVarintLow","lsb","writeBigVarintHigh","writeBigVarint","writeString","lead","writeUtf8","writeBytes","writeRawMessage","writeMessage","writeBytesField","writeFixed32Field","writeSFixed32Field","writeFixed64Field","writeSFixed64Field","writeVarintField","writeSVarintField","writeStringField","writeFloatField","writeDoubleField","writeBooleanField","families","icon","title","link","getNames","getLink","normalizeName","base64","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","that","encodingOrOffset","allocUnsafe","byteOffset","byteLength","fromArrayLike","fromArrayBuffer",
 "isEncoding","isBuffer","checked","copy","fromObject","assertSize","loweredCase","utf8ToBytes","base64ToBytes","slowToString","start","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","bidirectionalIndexOf","dir","arrayIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","found","hexWrite","remaining","strLen","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","hi","lo","utf16leToBytes","fromByteArray","res","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoints","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","foo","typedArraySupport","poolSize","_augment","species","configurable","allocUnsafeSlow","_isBuffer","swap16","swap32","swap64","equals","inspect","target","thisStart","thisEnd","thisCopy","targetCopy","includes","_arr","ret","toHex","bytes","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIE
 EE754","noAssert","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","code","INVALID_BASE64_RE","leadSurrogate","toByteArray","stringtrim","base64clean","src","dst","b64","lens","getLens","validLen","placeHoldersLen","Arr","_byteLength","curByte","revLookup","uint8","extraBytes","encodeChunk","lookup","uidCounter_","getUid","ol_uid","extendStatics","__extends","setPrototypeOf","__","_super","AssertionError","_this","stopPropagation","evt","BaseEvent","propagationStopped","preventDefault","Dis
 posable","disposed","dispose","disposeInternal","numberSafeCompareFunction","linearFindNearest","direction","reverseSubArray","extension","find","func","arr1","arr2","len1","findIndex","el","TRUE","FALSE","VOID","assign","var_sources","getValues","Target","opt_target","eventTarget_","pendingRemovals_","dispatching_","listeners_","addEventListener","listener","listeners","listenersForType","dispatchEvent","event","Event","propagate","dispatching","pendingRemovals","handleEvent","pr","removeEventListener","getListeners","hasListener","opt_type","listen","opt_this","opt_once","originalListener_1","eventsKey","listenOnce","unlistenByKey","unByKey","Observable","revision_","changed","EventType","getRevision","on","once","ol_key","un","ObjectEvent","oldValue","BaseObject","opt_values","values_","setProperties","getKeys","getProperties","hasProperties","notify","eventType","getChangeEventType","ObjectEventType","opt_silent","unset","changeEventTypeCache","Property","CollectionEvent","opt_e
 lement","opt_index","element","Collection","opt_array","opt_options","unique_","unique","array_","assertUnique_","updateLength_","getLength","getArray","insertAt","elem","CollectionEventType","removeAt","prev","setAt","opt_except","assert","assertion","errorCode","Feature","opt_geometryOrProperties","id_","geometryName_","style_","styleFunction_","geometryChangeKey_","handleGeometryChanged_","setGeometry","clone","setGeometryName","getGeometryName","getGeometry","getStyle","setStyle","getId","getStyleFunction","handleGeometryChange_","opt_style","styles_1","createStyleFunction","setId","POINT","LINE_STRING","LINEAR_RING","POLYGON","MULTI_POINT","MULTI_LINE_STRING","MULTI_POLYGON","GEOMETRY_COLLECTION","CIRCLE","Units","DEGREES","FEET","METERS","PIXELS","TILE_PIXELS","USFEET","METERS_PER_UNIT","tmp_","transform","multiply","transform1","transform2","a1","c1","d1","e1","f1","a2","c2","e2","f2","coordinate","compose","dx1","dy1","sx","sy","angle","dx2","dy2","makeInverse","mat","det","
 boundingExtent","extent","createEmpty","extendCoordinate","opt_extent","closestSquaredDistanceXY","dx","dy","containsCoordinate","containsXY","containsExtent","extent1","extent2","coordinateRelationship","relationship","Relationship","createOrUpdate","createOrUpdateEmpty","createOrUpdateFromCoordinate","createOrUpdateFromFlatCoordinates","flatCoordinates","stride","extendFlatCoordinates","extendCoordinates","extendXY","forEachCorner","callback","getBottomLeft","getBottomRight","getTopRight","getTopLeft","getArea","getWidth","getHeight","getCenter","getCorner","corner","Corner","getForViewAndSize","resolution","rotation","cosRotation","sinRotation","xCos","xSin","yCos","ySin","x0","y0","getIntersection","intersection","scaleFromCenter","deltaX","deltaY","applyTransform","transformFn","opt_stops","xs","ys","_boundingExtentXYs","projection","projectionExtent","getExtent","canWrapX","worldWidth","Projection","code_","units_","extent_","worldExtent_","worldExtent","axisOrientation_","axi
 sOrientation","global_","canWrapX_","getPointResolutionFunc_","getPointResolution","defaultTileGrid_","metersPerUnit_","metersPerUnit","getCode","getUnits","getMetersPerUnit","getWorldExtent","getAxisOrientation","isGlobal","setGlobal","getDefaultTileGrid","setDefaultTileGrid","tileGrid","setExtent","setWorldExtent","setGetPointResolution","getPointResolutionFunc","clamp","cosh","LOG2E","squaredSegmentDistance","toDegrees","angleInRadians","toRadians","angleInDegrees","modulo","lerp","HALF_SIZE","EXTENT","WORLD_EXTENT","EPSG3857Projection","PROJECTIONS","fromEPSG4326","opt_output","opt_dimension","dimension","halfSize","toEPSG4326","EPSG4326Projection","opt_axisOrientation","destination","sourceCode","destinationCode","getDistance","opt_radius","radius","lat1","lat2","deltaLatBy2","deltaLonBy2","getLengthInternal","getAreaInternal","lon1","dByR","padNumber","opt_precision","numberString","toFixed","decimal","compareVersions","s1","s2","n1","n2","closestOnSegment","segment","along","
 degreesToStringHDMS","hemispheres","degrees","opt_fractionDigits","normalizedDegrees","dflPrecision","precision","deg","sec","template","coordinate1","coordinate2","cosAngle","sinAngle","coord1","coord2","squaredDistanceToSegment","toStringXY","worldsAway","getWorldsAway","opt_sourceExtentWidth","sourceExtentWidth","cloneTransform","identityTransform","addProjection","projectionLike","opt_units","pointResolution","toEPSG4326_1","getTransformFromProjections","vertices","addEquivalentProjections","projections","addProjections","createProjection","defaultCode","createTransformFromCoordinateTransform","coordTransform","addCoordinateTransforms","inverse","sourceProj","destProj","fromLonLat","opt_projection","equivalent","projection1","projection2","equalUnits","sourceProjection","destinationProjection","transformFunc","getTransform","transformExtent","projections2","forwardTransform","inverseTransform","getUserProjection","toUserCoordinate","fromUserCoordinate","destProjection","toUserEx
 tent","fromUserExtent","createSafeCoordinateTransform","transformed","sourceX","sourceY","sourceExtent","transform2D","opt_dest","dest","anchorX","anchorY","tmpTransform","Geometry","lastResult","lastArgs","lastThis","called","extentRevision_","simplifiedGeometryMaxMinSquaredTolerance","simplifiedGeometryRevision","simplifyTransformedInternal","revision","squaredTolerance","opt_transform","getSimplifiedGeometry","nextArgs","simplifyTransformed","closestPointXY","closestPoint","minSquaredDistance","getClosestPoint","opt_closestPoint","intersectsCoordinate","computeExtent","returnOrUpdate","rotate","opt_sy","opt_anchor","simplify","intersectsExtent","translate","inCoordinates","outCoordinates","pixelExtent","projectedExtent","getStrideForLayout","GeometryLayout","SimpleGeometry","getCoordinates","getFirstCoordinate","getFlatCoordinates","getLastCoordinate","getLayout","simplifiedGeometry","getSimplifiedGeometryInternal","getStride","setFlatCoordinates","setCoordinates","opt_layout","s
 etLayout","nesting","getLayoutForStride","assignClosest","offset1","offset2","maxSquaredDelta","squaredDelta","arrayMaxSquaredDelta","ends","assignClosestPoint","maxDelta","isRing","opt_tmpPoint","squaredDistance","tmpPoint","assignClosestArrayPoint","deflateCoordinate","deflateCoordinates","deflateCoordinatesArray","coordinatess","opt_ends","jj","douglasPeucker","simplifiedFlatCoordinates","simplifiedOffset","markers","first","maxSquaredDistance","squaredDistance_1","douglasPeuckerArray","simplifiedEnds","snap","quantize","quantizeArray","inflateCoordinates","opt_coordinates","inflateCoordinatesArray","opt_coordinatess","inflateMultiCoordinatesArray","endss","opt_coordinatesss","coordinatesss","twiceArea","LinearRing","maxDelta_","maxDeltaRevision_","GeometryType","linearRingContainsExtent","linearRingContainsXY","wn","linearRingsContainsXY","getInteriorPointOfArray","flatCenters","flatCentersOffset","intersections","rr","pointX","maxSegmentLength","segmentLength","getInteriorPoint
 sOfMultiArray","interiorPoints","point1","point2","intersectsLineString","coordinatesExtent","startRel","endRel","startX","startY","endX","endY","slope","intersectsSegment","intersectsLinearRingArray","intersectsLinearRing","linearRingIsClockwise","firstVertexRepeated","iMinVertex","minXAtMinY","findCornerVertex","iPreviousVertex","iNextVertex","aX","aY","bX","bY","cX","cY","linearRingsAreOriented","opt_right","isClockwise","orientLinearRings","orientLinearRingsArray","ends_","flatInteriorPointRevision_","flatInteriorPoint_","orientedRevision_","orientedFlatCoordinates_","appendLinearRing","linearRing","getOrientedFlatCoordinates","getEnds","getFlatInteriorPoint","flatCenter","getInteriorPoint","getLinearRingCount","getLinearRing","getLinearRings","linearRings","circular","opt_n","opt_sphereRadius","fromExtent","fromCircle","opt_sides","opt_angle","sides","arrayLength","makeRegular","getRadius","startAngle","GeolocationError","Geolocation","position_","transform_","watchId_","handle
 ProjectionChanged_","handleTrackingChanged_","setProjection","trackingOptions","setTrackingOptions","setTracking","tracking","getProjection","navigator","getTracking","geolocation","watchPosition","positionChange_","positionError_","getTrackingOptions","clearWatch","coords","accuracy","altitude","altitudeAccuracy","heading","longitude","latitude","projectedPosition","speed","getAccuracy","getAccuracyGeometry","getAltitude","getAltitudeAccuracy","getHeading","getPosition","getSpeed","Kinetic","decay","minVelocity","decay_","minVelocity_","delay_","points_","angle_","initialVelocity_","update","Date","now","firstIndex","getAngle","HEX_COLOR_RE_","NAMED_COLOR_RE_","asString","fromNamed","document","createElement","body","appendChild","getComputedStyle","removeChild","cache","cacheSize","hasAlpha","normalize","fromStringInternal_","asArray","IconImageCache","cache_","cacheSize_","maxCacheSize_","canExpireCache","expire","iconImage","crossOrigin","getKey","setSize","maxCacheSize","shared
 ","Base","BaseLayer","opacity","zIndex","maxResolution","minResolution","minZoom","maxZoom","className_","className","state_","getClassName","getLayerState","opt_managed","managed","getZIndex","getOpacity","sourceState","getSourceState","getVisible","getMaxResolution","getMinResolution","getMinZoom","getMaxZoom","getLayersArray","getLayerStatesArray","opt_states","setMaxResolution","setMinResolution","setMaxZoom","setMinZoom","setOpacity","setVisible","setZIndex","zindex","inView","layerState","viewState","Layer","baseOptions","mapPrecomposeKey_","mapRenderKey_","sourceChangeKey_","renderer_","render","setMap","handleSourcePropertyChange_","setSource","states","getSource","getState","handleSourceChange_","getFeatures","pixel","frameState","layerRenderer","getRenderer","prepareFrame","renderFrame","layerStatesArray","arrayLayerState","createRenderer","hasRenderer","VectorContext","drawCustom","renderer","drawGeometry","drawCircle","circleGeometry","drawFeature","drawGeometryCollectio
 n","geometryCollectionGeometry","drawLineString","lineStringGeometry","drawMultiLineString","multiLineStringGeometry","drawMultiPoint","multiPointGeometry","drawMultiPolygon","multiPolygonGeometry","drawPoint","pointGeometry","drawPolygon","drawText","setFillStrokeStyle","fillStyle","strokeStyle","setImageStyle","imageStyle","opt_declutterGroup","setTextStyle","textStyle","opt_declutterGroups","asColorLike","ua","userAgent","FIREFOX","WEBKIT","MAC","DEVICE_PIXEL_RATIO","devicePixelRatio","WORKER_OFFSCREEN_CANVAS","WorkerGlobalScope","OffscreenCanvas","IMAGE_DECODE","Image","PASSIVE_EVENT_LISTENERS","passive","createCanvasContext2D","opt_width","opt_height","opt_canvasPool","canvas","getContext","offsetWidth","marginLeft","marginRight","offsetHeight","marginTop","marginBottom","replaceNode","oldNode","parentNode","replaceChild","removeNode","removeChildren","lastChild","fontRegEx","RegExp","fontRegExMatchIndex","getFontParameters","fontSpec","variant","family","defaultLineDash","defa
 ultPadding","checkedFonts","labelCache","measureFont","div","heights","measureContext","textHeights","registerFont","referenceWidth","referenceFonts","isAvailable","fontStyle","fontWeight","referenceFont","measureTextWidth","check","clearInterval","setInterval","measureTextHeight","metrics","measureText","actualBoundingBoxAscent","actualBoundingBoxDescent","innerHTML","padding","rotateAtOffset","offsetX","offsetY","drawImageOrLabel","labelOrImage","originX","originY","save","globalAlpha","setTransform","contextInstructions","executeLabelInstructions","drawImage","restore","createTransformStringCanvas","createTransformString","CanvasImmediateRenderer","pixelRatio","viewRotation","opt_squaredTolerance","opt_userTransform","context_","pixelRatio_","viewRotation_","squaredTolerance_","userTransform_","contextFillState_","contextStrokeState_","contextTextState_","fillState_","strokeState_","image_","imageAnchorX_","imageAnchorY_","imageHeight_","imageOpacity_","imageOriginX_","imageOrigi
 nY_","imageRotateWithView_","imageRotation_","imageScale_","imageWidth_","text_","textOffsetX_","textOffsetY_","textRotateWithView_","textRotation_","textScale_","textFillState_","textStrokeState_","textState_","pixelCoordinates_","tmpLocalTransform_","drawImages_","pixelCoordinates","localTransform","centerX","centerY","drawText_","setContextFillState_","setContextStrokeState_","setContextTextState_","strokeText","fillText","moveToLineTo_","close","moveTo","lineTo","closePath","drawRings_","simpleGeometry","transformGeom2D","beginPath","arc","stroke","getFill","getStroke","getImage","getText","getGeometryFunction","getGeometriesArray","flatMidpoint","getFlatMidpoint","geometryExtent","flatMidpoints","getFlatMidpoints","flatInteriorPoint","getEndss","flatInteriorPoints","getFlatInteriorPoints","fillState","contextFillState","strokeState","contextStrokeState","lineCap","setLineDash","lineDash","lineDashOffset","lineJoin","lineWidth","miterLimit","textState","contextTextState","textAl
 ign","textBaseline","fillStyleColor","getColor","strokeStyleColor","strokeStyleLineCap","getLineCap","strokeStyleLineDash","getLineDash","strokeStyleLineDashOffset","getLineDashOffset","strokeStyleLineJoin","getLineJoin","strokeStyleWidth","strokeStyleMiterLimit","getMiterLimit","imageSize","getSize","imageAnchor","getAnchor","imageImage","imageOrigin","getOrigin","imageScale","getScaleArray","getRotateWithView","getRotation","textFillStyle","textFillStyleColor","textStrokeStyle","textStrokeStyleColor","textStrokeStyleLineCap","textStrokeStyleLineDash","textStrokeStyleLineDashOffset","textStrokeStyleLineJoin","textStrokeStyleWidth","textStrokeStyleMiterLimit","textFont","getFont","textOffsetX","getOffsetX","textOffsetY","getOffsetY","textRotateWithView","textRotation","textScale","textText","textTextAlign","getTextAlign","textTextBaseline","getTextBaseline","GEOMETRY_RENDERERS","builderGroup","getImageState","ImageState","imageReplay","getBuilder","BuilderType","addDeclutter","textR
 eplay","lineStringReplay","polygonReplay","replayGroup","geometryRenderer","circleReplay","defaultOrder","feature1","feature2","getSquaredTolerance","getTolerance","renderFeature","loading","imageState","unlistenImageChange","listenImageChange","renderGeometry","getGeometries","renderFeatureInternal","getVectorContext","userTransform","inversePixelTransform","coordinateToPixelTransform","userProjection","renderDeclutterItems","declutterTree","declutterItems","zIndexItems","renderDeclutter","expireIconCache","MapRenderer","map_","declutterTree_","dispatchRenderEvent","calculateMatrices2D","pixelToCoordinateTransform","forEachFeatureAtCoordinate","hitTolerance","checkWrapped","thisArg","layerFilter","thisArg2","translatedCoordinate","offsets","declutteredFeatures","layerStates","numLayers","entry","tmpCoord","getWrapX","callback_1","forEachLayerAtPixel","hasFeatureAtCoordinate","getMap","scheduleExpireIconCache","postRenderFunctions","RenderEvent","opt_inversePixelTransform","opt_fram
 eState","opt_context","Composite","CompositeMapRenderer","fontChangeListenerKey_","redrawText","element_","CLASS_UNSELECTABLE","container","getViewport","insertBefore","firstChild","children_","renderedVisible_","event_1","previousElement","layerIndex","oldChildren","childNodes","oldChild","newChild","replaceChildren","display","getDataAtPixel","LayerGroup","layersListenerKeys_","listenerKeys_","handleLayersChanged_","setLayers","handleLayerChange_","getLayers","handleLayersAdd_","handleLayersRemove_","layersArray","collectionEvent","ownLayerState","MapEvent","MapBrowserEvent","originalEvent","opt_dragging","pixel_","coordinate_","dragging","getEventPixel","getCoordinateFromPixel","SINGLECLICK","CLICK","DBLCLICK","POINTERDRAG","POINTERMOVE","POINTERDOWN","POINTERUP","POINTEROVER","POINTEROUT","POINTERENTER","POINTERLEAVE","POINTERCANCEL","MapBrowserEventHandler","moveTolerance","clickTimeoutId_","dragging_","dragListenerKeys_","moveTolerance_","down_","activePointers_","trackedTouch
 es_","pointerdownListenerKey_","handlePointerDown_","originalPointerMoveEvent_","relayedListenerKey_","relayEvent_","boundHandleTouchMove_","handleTouchMove_","emulateClick_","pointerEvent","newEvent","MapBrowserEventType","clearTimeout","setTimeout","updateActivePointers_","pointerId","handlePointerUp_","isMouseActionButton_","button","handlePointerMove_","getRootNode","isMoving_","defaultPrevented","clientX","clientY","PriorityQueue","priorityFunction","keyFunction","priorityFunction_","keyFunction_","elements_","priorities_","queuedElements_","dequeue","elements","priorities","siftUp_","elementKey","enqueue","priority","siftDown_","getCount","getLeftChildIndex_","getRightChildIndex_","getParentIndex_","heapify_","isKeyQueued","isQueued","count","startIndex","lIndex","rIndex","smallerChildIndex","parentIndex","reprioritize","TileQueue","tilePriorityFunction","tileChangeCallback","boundHandleTileChange_","handleTileChange","tileChangeCallback_","tilesLoading_","tilesLoadingKeys_","
 added","getTilesLoading","tile","hifi","TileState","tileKey","loadMoreTiles","maxTotalLoading","maxNewLoads","newLoads","createExtent","onlyCenter","smooth","opt_isMoving","viewWidth","viewHeight","ratio","getViewportClampedResolution","maxExtent","viewportSize","showFullExtent","xResolution","yResolution","getSmoothClampedResolution","createMinMaxResolution","opt_smooth","opt_maxExtent","opt_showFullExtent","cappedMaxRes","disable","easeIn","easeOut","inAndOut","animationCallback","returnValue","isNoopAnimation","animation","sourceCenter","targetCenter","sourceResolution","targetResolution","sourceRotation","targetRotation","View","hints_","animations_","updateAnimationKey_","projection_","viewportSize_","targetCenter_","targetResolution_","targetRotation_","cancelAnchor_","applyOptions_","resolutionConstraintInfo","resolutionConstraint","zoomFactor","multiWorld","smoothResolutionConstraint","projExtent","constrainOnlyCenter","resolutions","constrainResolution","capped","createSnap
 ToResolutions","defaultMaxResolution","defaultMinResolution","defaultMaxZoom","power","opt_minResolution","minZoomLevel","cappedZoomLevel","zoomLevel","createSnapToPower","constraint","createResolutionConstraint","maxResolution_","minResolution_","zoomFactor_","resolutions_","minZoom_","centerConstraint","smoothExtentConstraint","createCenterConstraint","rotationConstraint","enableRotation","constrainRotation","opt_tolerance","theta","createRotationConstraint","constraints_","setRotation","setCenterInternal","setResolution","setZoom","options_","getUpdatedOptions_","newOptions","getResolution","getZoom","getCenterInternal","animate","var_args","isDef","getAnimating","resolveConstraints","animateInternal","animationCount","series","complete","easing","getResolutionForZoom","setHint","ViewHint","updateAnimations_","getInteracting","cancelAnimations","cancelAnimationFrame","seriesComplete","elapsed","fraction","getViewportSize_","constrainedResolution","calculateCenterZoom","applyTarge
 tState_","constrainedRotation","calculateCenterRotate","requestAnimationFrame","currentCenter","currentResolution","opt_rotation","setViewportSize","opt_size","ViewProperty","getConstraints","getConstrainResolution","getHints","opt_hints","calculateExtent","calculateExtentInternal","getZoomForResolution","setConstrainResolution","enabled","getResolutions","getResolutionForExtent","getResolutionForExtentInternal","getResolutionForValueFunction","opt_power","getConstrainedResolution","getValueForResolutionFunction","logPower","baseLevel","fit","geometryOrExtent","fitInternal","minRotX","minRotY","maxRotX","maxRotY","rotX","rotY","centerRotX","centerRotY","getConstrainedCenter","centerOn","centerOnInternal","adjustCenter","deltaCoordinates","setCenter","adjustCenterInternal","adjustResolution","adjustResolutionInternal","isMoving","newResolution","adjustZoom","adjustRotation","adjustRotationInternal","newRotation","hint","opt_doNotCancelAnims","opt_forceMoving","newCenter","opt_duratio
 n","opt_resolutionDirection","beginInteraction","endInteraction","endInteractionInternal","opt_targetResolution","getConstrainedZoom","targetZoom","opt_direction","targetRes","toSize","PluggableMap","optionsInternal","keyboardEventTarget","getElementById","controls","interactions","overlays","layerGroup","MapProperty","view","createOptionsInternal","boundHandleBrowserEvent_","handleBrowserEvent","maxTilesLoading_","maxTilesLoading","postRenderTimeoutHandle_","animationDelayKey_","animationDelay_","renderFrame_","coordinateToPixelTransform_","pixelToCoordinateTransform_","frameIndex_","frameState_","previousExtent_","viewPropertyListenerKey_","viewChangeListenerKey_","layerGroupPropertyListenerKeys_","viewport_","overflow","overlayContainer_","pointerEvents","overlayContainerStopEvent_","mapBrowserEventHandler_","keyboardEventTarget_","keyHandlerKeys_","overlays_","overlayIdIndex_","handleResize_","postRenderFunctions_","tileQueue_","getTilePriority","handleTileChange_","handleLayerG
 roupChanged_","handleViewChanged_","handleSizeChanged_","handleTargetChanged_","control","interaction","addOverlayInternal_","addControl","getControls","addInteraction","getInteractions","addLayer","getLayerGroup","addOverlay","overlay","getOverlays","setTarget","forEachFeatureAtPixel","getCoordinateFromPixelInternal","getFeaturesAtPixel","hasFeatureAtPixel","getEventCoordinate","getEventCoordinateInternal","viewportPosition","getBoundingClientRect","eventPosition","changedTouches","getTarget","getTargetElement","getView","getOverlayById","getLoading","getPixelFromCoordinate","viewCoordinate","getPixelFromCoordinateInternal","getOverlayContainer","getOverlayContainerStopEvent","tileSourceKey","tileCenter","tileResolution","wantedTiles","browserEvent","mapBrowserEvent","handleMapBrowserEvent","rootNode","elementFromPoint","documentElement","interactionsArray","getActive","handlePostRender","tileQueue","hints","viewHints","lowOnFrameBudget","time","targetElement","updateSize","handleV
 iewPropertyChanged_","updateViewportSize_","isRendered","renderSync","handleFontsChanged","removeControl","removeInteraction","removeLayer","removeOverlay","previousFrameState","hasArea","usedTiles","MapEventType","setLayerGroup","setView","computedStyle","Control","target_","listenerKeys","mapEvent","Attribution","ulElement_","collapsed_","collapsed","overrideCollapsible_","collapsible","collapsible_","tipLabel","collapseLabel","collapseLabel_","textContent","label_","activeLabel","setAttribute","handleClick_","cssClasses","renderedAttributions_","collectSourceAttributions_","visibleAttributions","attributionGetter","getAttributions","attributions","getAttributionsCollapsible","setCollapsible","updateElement_","handleToggle_","classList","toggle","getCollapsible","setCollapsed","getCollapsed","Rotate","add","callResetNorth_","resetNorth","duration_","autoHide_","autoHide","rotation_","resetNorth_","Zoom","zoomInLabel","zoomOutLabel","zoomInTipLabel","zoomOutTipLabel","inElement","c
 reateTextNode","outElement","zoomByDelta_","currentZoom","newZoom","defaults","zoomOptions","rotateOptions","attributionOptions","zoomByDelta","Interaction","setActive","active","DoubleClickZoom","delta_","stopEvent","shiftKey","Pointer","PointerInteraction","handleDownEvent","handleDragEvent","handleMoveEvent","handleUpEvent","stopDown","handlingDownUpSequence","trackedPointers_","targetPointers","getPointerCount","updateTrackedPointers_","handledUp","handled","isPointerDraggingEvent","pass","altKeyOnly","altKey","metaKey","ctrlKey","altShiftKeysOnly","activeElement","focusWithTabindex","hasAttribute","always","mouseActionButton","never","singleClick","noModifierKeys","shiftKeyOnly","targetNotEditable","tagName","mouseOnly","pointerType","primaryAction","isPrimary","DragPan","kinetic_","kinetic","lastCentroid","lastPointersCount_","panning_","condition_","onFocusOnly","noKinetic_","centroid","centerpx","DragRotate","lastAngle_","RenderBox","geometry_","startPixel_","endPixel_","ren
 der_","startPixel","endPixel","setPixels","createOrUpdateGeometry","DragBoxEventType","DragBoxEvent","DragBox","box_","minArea_","onBoxEnd","boxEndCondition_","boxEndCondition","defaultBoxEndCondition","DragZoom","out_","mapExtent","boxPixelExtent","KeyboardPan","defaultCondition_","pixelDelta_","pixelDelta","keyCode","KeyCode","mapUnitsDelta","pan","KeyboardZoom","charCode","Mode","MouseWheelZoom","totalDelta_","lastDelta_","timeout_","timeout","useAnchor_","useAnchor","constrainResolution_","lastAnchor_","startTime_","timeoutId_","mode_","trackpadEventGap_","trackpadTimeoutId_","deltaPerZoom_","endInteraction_","wheelEvent","deltaMode","WheelEvent","DOM_DELTA_PIXEL","DOM_DELTA_LINE","timeLeft","handleWheelZoom_","setMouseAnchor","PinchRotate","pointerOptions","anchor_","rotating_","rotationDelta_","threshold_","threshold","rotationDelta","touch0","touch1","PinchZoom","lastDistance_","lastScaleDelta_","scaleDelta","altShiftDragRotate","doubleClickZoom","zoomDelta","zoomDuration","d
 ragPan","pinchRotate","pinchZoom","keyboard","mouseWheelZoom","shiftDragZoom","Map","Overlay","insertFirst","autoPan","autoPanAnimation","autoPanMargin","rendered","mapPostrenderListenerKey","handleElementChanged","handleMapChanged","handleOffsetChanged","handlePositionChanged","handlePositioningChanged","setElement","setOffset","setPositioning","positioning","OverlayPositioning","setPosition","getElement","getOffset","getPositioning","updatePixelPosition","performAutoPan","panIntoView","opt_panIntoViewOptions","mapRect","getRect","overlayRect","panIntoViewOptions","myMargin","offsetLeft","offsetRight","offsetTop","offsetBottom","centerPx","newCenterPx","panOptions","box","pageXOffset","pageYOffset","mapSize","updateRenderedPosition","posX","posY","msTransform","getOptions","withCredentials","loadFeaturesXhr","failure","xhr","XMLHttpRequest","open","FormatType","responseType","onload","status","responseText","responseXML","DOMParser","parseFromString","readFeatures","featureProjecti
 on","readProjection","onerror","send","dataProjection","addFeatures","TileRange","tileCoord","containsTileRange","tileRange","opt_tileCoord","getKeyZXY","fromKey","tmpTileCoord","TileGrid","opt_strict","currentVal","origins","origin_","origin","origins_","tileSizes_","tileSizes","tileSize_","fullTileRanges_","tmpSize_","sizes","calculateTileRanges_","forEachTileCoord","getTileRangeForExtentAndZ","forEachTileCoordParentTileRange","opt_tileRange","tileCoordExtent","getTileCoordExtent","getTileCoordChildTileRange","getTileRangeExtent","getTileSize","getTileCoordForXYAndZ_","getTileCoordCenter","getTileCoordForCoordAndResolution","getTileCoordForXYAndResolution_","reverseIntersectionPolicy","getZForResolution","adjustX","adjustY","xFromOrigin","yFromOrigin","tileCoordX","tileCoordY","getTileCoordForCoordAndZ","getTileCoordResolution","getFullTileRange","fullTileRanges","getForProjection","createForProjection","createXYZ","xyzOptions","gridOptions","resolutionsFromExtent","opt_maxZoom","
 opt_tileSize","opt_maxResolution","opt_corner","createForExtent","extentFromProjection","half","supportedExtensions","CONTEXT_IDS","opt_attributes","XML_SCHEMA_INSTANCE_URI","createElementNS","namespaceURI","qualifiedName","getDocument","getAllTextContent","normalizeWhitespace","getAllTextContent_","accumulator","Node","CDATA_SECTION_NODE","TEXT_NODE","nodeValue","nextSibling","isDocument","xml","makeArrayExtender","valueReader","objectStack","makeArrayPusher","makeReplacer","makeObjectPropertyPusher","opt_property","localName","makeObjectPropertySetter","makeChildAppender","nodeWriter","makeArraySerializer","serializersNS","nodeFactory","serializers","makeSimpleNodeFactory","opt_nodeName","opt_namespaceURI","fixedNodeName","nodeName","OBJECT_PROPERTY_NODE_FACTORY","makeSequence","orderedKeys","sequence","makeStructureNS","namespaceURIs","structure","opt_structureNS","structureNS","parseNode","parsersNS","firstElementChild","nextElementSibling","parsers","pushParseAndPop","opt_keys"
 ,"pushSerializeAndPop","xmlSerializer_","document_","implementation","createDocument","BufferUsage","getArrayClassForType","Float32Array","Uint32Array","WebGLArrayBuffer","opt_usage","ofSize","fromArray","getUsage","WebGLPostProcessingPass","gl_","webGlContext","gl","scaleRatio_","scaleRatio","renderTargetTexture_","createTexture","renderTargetTextureSize_","frameBuffer_","createFramebuffer","vertexShader","createShader","VERTEX_SHADER","shaderSource","compileShader","fragmentShader","FRAGMENT_SHADER","renderTargetProgram_","createProgram","attachShader","linkProgram","renderTargetVerticesBuffer_","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","renderTargetAttribLocation_","getAttribLocation","renderTargetUniformLocation_","getUniformLocation","renderTargetTextureLocation_","uniforms_","uniforms","location","getGL","init","textureSize","drawingBufferWidth","drawingBufferHeight","bindFramebuffer","FRAMEBUFFER","getFrameBuffer","internalFormat","RGBA","UNSIGNED_BYTE","bindText
 ure","TEXTURE_2D","texImage2D","texParameteri","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","framebufferTexture2D","COLOR_ATTACHMENT0","nextPass","activeTexture","TEXTURE0","clearColor","COLOR_BUFFER_BIT","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","useProgram","enableVertexAttribArray","vertexAttribPointer","FLOAT","uniform2f","uniform1i","applyUniforms","drawArrays","TRIANGLES","textureSlot","uniform","HTMLCanvasElement","ImageData","texture","uniform3f","uniform4f","uniform1f","fromTransform","mat4","DefaultUniform","AttributeType","UNSIGNED_SHORT","UNSIGNED_INT","computeAttributesStride","attributes","attr","getByteSizeFromType","BYTES_PER_ELEMENT","Uint16Array","WebGLHelper","boundHandleWebGLContextLost_","handleWebGLContextLost","boundHandleWebGLContextRestored_","handleWebGLContextRestored","canvas_","bufferCache_","currentProgram_","getSupportedExtensions","getExtension","ContextEventType","offsetRotateMatrix_","offsetScaleMatr
 ix_","tmpMat4_","uniformLocations_","attribLocations_","name_1","postProcessPasses_","postProcesses","shaderCompileErrors_","bufferKey","bufferCache","webGlBuffer","flushBufferData","deleteBuffer","bufferCacheEntry","isContextLost","prepareDraw","getCanvas","applyFrameState","prepareDrawToRenderTarget","renderTarget","opt_disableAlphaBlend","getFramebuffer","getTexture","ZERO","drawElements","elementType","numItems","offsetInBytes","finalizeDraw","offsetScaleMatrix","offsetRotateMatrix","setUniformMatrixValue","setUniformFloatValue","HTMLImageElement","prevValue","program","shader","getProgram","fragmentShaderSource","vertexShaderSource","getShaderInfoLog","getShaderCompileErrors","getAttributeLocation","makeProjectionTransform","uniformMatrix4fv","enableAttributeArray_","attribName","enableAttributes","opt_data","opt_texture","tmpArray4","WebGLRenderTarget","helper","helper_","texture_","framebuffer_","size_","data_","dataCacheDirty_","updateSize_","clearCachedData","readAll","read
 Pixels","readPixel","WMTSTileGrid","matrixIds_","matrixIds","getMatrixId","getMatrixIds","createFromCapabilitiesMatrixSet","matrixSet","opt_matrixLimits","matrixLimits","switchOriginXY","elt","elt_ml","tileWidth","tileHeight","ImageStyle","opacity_","rotateWithView_","rotateWithView","scale_","scaleArray_","displacement_","displacement","getScale","getDisplacement","getHitDetectionImage","getPixelRatio","getImageSize","getHitDetectionImageSize","setRotateWithView","setScale","RegularShape","hitDetectionCanvas_","fill_","points","radius_","radius1","radius2_","radius2","stroke_","imageSize_","hitDetectionImageSize_","getPoints","getRadius2","renderOptions","createRenderOptions","createHitDetectionCanvas_","draw_","strokeWidth","angle0","radiusC","drawHitDetectionCanvas_","CircleStyle","setRadius","Fill","color_","setColor","ImageBase","listenImage","loadHandler","errorHandler","img","promise","listening_1","then","catch","ImageWrapper","imageLoadFunction","src_","unlisten_","imageLoa
 dFunction_","handleImageError_","unlistenImage_","handleImageLoad_","setImage","taintedTestContext","IconImage","hitDetectionImage_","imageState_","tainted_","isTainted_","getImageData","dispatchChangeEvent_","replaceColor_","fillRect","getSrc","globalCompositeOperation","imgData","putImageData","Icon","normalizedAnchor_","anchorOrigin_","anchorOrigin","IconOrigin","anchorXUnits_","anchorXUnits","IconAnchorUnits","anchorYUnits_","anchorYUnits","crossOrigin_","imgSize","iconImage_","offset_","offsetOrigin_","offsetOrigin","setAnchor","iconImageSize","Stroke","lineCap_","lineDash_","lineDashOffset_","lineJoin_","miterLimit_","width_","setLineCap","setLineDashOffset","setLineJoin","setMiterLimit","setWidth","Style","geometryFunction_","defaultGeometryFunction","zIndex_","setRenderer","setFill","setStroke","setText","defaultStyles","createDefaultStyle","createEditingStyle","styles","blue","Text","font_","textAlign_","textBaseline_","maxAngle_","maxAngle","placement_","placement","TextPl
 acement","overflow_","offsetX_","offsetY_","backgroundFill_","backgroundFill","backgroundStroke_","backgroundStroke","padding_","getPlacement","getMaxAngle","getOverflow","getBackgroundFill","getBackgroundStroke","getPadding","setOverflow","setFont","setMaxAngle","setOffsetX","setOffsetY","setPlacement","setTextAlign","setTextBaseline","setBackgroundFill","setBackgroundStroke","setPadding","Tile","interimTile","transition_","transitionStarts_","release","getInterimTile","refreshInterimChain","getTileCoord","setState","getAlpha","inTransition","endTransition","brokenDiagonalRendering_","ImageTile","tileLoadFunction","tileLoadFunction_","naturalWidth","naturalHeight","Triangulation","targetProj","targetExtent","maxSourceExtent","errorThreshold","opt_destinationResolution","sourceProj_","targetProj_","transformInvCache","transformInv","transformInv_","maxSourceExtent_","errorThresholdSquared_","triangles_","wrapsXInSource_","canWrapXInSource_","sourceWorldWidth_","targetWorldWidth_","d
 estinationTopLeft","destinationTopRight","destinationBottomRight","destinationBottomLeft","sourceTopLeft","sourceTopRight","sourceBottomRight","sourceBottomLeft","maxSubdivision","addQuad_","leftBound_1","triangle","newTriangle","addTriangle_","aSrc","bSrc","cSrc","dSrc","sourceQuadExtent","sourceCoverageX","sourceWorldWidth","wrapsX","needsSubdivision","isNotFinite","centerSrc","bc","bcSrc","da","daSrc","ab","abSrc","cd","cdSrc","calculateSourceExtent","getTriangles","IMAGE_SMOOTHING_DISABLED","imageSmoothingEnabled","msImageSmoothingEnabled","drawTestTriangle","u1","u2","clip","verifyBrokenDiagonalRendering","calculateSourceResolution","targetMetersPerUnit","sourceMetersPerUnit","compensationFactor","triangulation","gutter","opt_renderEdges","opt_contextOptions","pixelRound","sourceDataExtent","canvasWidthInUnits","canvasHeightInUnits","stitchContext","stitchScale","xPos","yPos","srcWidth","srcHeight","targetTopLeft","u0","v0","sourceNumericalShiftX","sourceNumericalShiftY","affin
 eCoefs","maxRow","maxEl","absValue","coef","solveLinearSystem","isBrokenDiagonalRendering","ud","vd","steps","ReprojTile","sourceTileGrid","targetTileGrid","wrappedTileCoord","getTileFunction","opt_errorThreshold","renderEdges_","contextOptions_","gutter_","sourceTileGrid_","targetTileGrid_","wrappedTileCoord_","sourceTiles_","sourcesListenerKeys_","sourceZ_","maxTargetExtent","limitedTargetExtent","sourceProjExtent","calculateSourceExtentResolution","errorThresholdInPixels","triangulation_","sourceRange","srcX","srcY","reproject_","leftToLoad_1","sourceListenKey_1","unlistenSources_","LRUCache","opt_highWaterMark","highWaterMark","count_","entries_","oldest_","newest_","containsKey","value_","key_","newer","older","peekLast","peekLastKey","peekFirstKey","TileCache","expireCache","pruneExceptNewestZ","adaptAttributions","attributionLike","Source","attributions_","attributionsCollapsible_","attributionsCollapsible","wrapX_","wrapX","getContextOptions","refresh","setAttributions","Til
 eSource","opaque_","opaque","tilePixelRatio_","tilePixelRatio","tileCache","tmpSize","tileOptions","zDirection","getTileCacheForProjection","forEachLoadedTile","tileCoordKey","loaded","covered","getGutterForProjection","setKey","getOpaque","getTile","getTileGrid","getTileGridForProjection","thisProj","getTilePixelRatio","getTilePixelSize","getTileCoordForTileUrlFunction","withinExtentAndZ","updateCacheSize","tileCount","useTile","TileSourceEvent","zRegEx","xRegEx","yRegEx","dashYRegEx","createFromTemplates","templates","tileUrlFunctions","createFromTileUrlFunctions","nullTileUrlFunction","expandUrl","startCharCode","stopCharCode","stop_1","UrlTile","generateTileUrlFunction_","tileUrlFunction","setUrls","setUrl","tileLoadingKeys_","getTileLoadFunction","getTileUrlFunction","getUrls","uid","tileState","TileEventType","setTileLoadFunction","setTileUrlFunction","defaultTileLoadFunction","imageTile","TileImage","tileClass","tileCacheForProjection","tileGridForProjection","reprojectionErr
 orThreshold_","reprojectionErrorThreshold","imageSmoothing","renderReprojectionEdges_","usedTileCache","getGutter","projKey","createTile_","urlTileCoord","tileUrl","newTile","getTileInternal","setRenderReprojectionEdges","setTileGridForProjection","tilegrid","proj","jsonp","opt_errback","opt_callbackParam","script","cleanup","async","timer","getElementsByTagName","BingMaps","hidpi","hidpi_","culture_","culture","maxZoom_","apiKey_","imagerySet_","imagerySet","handleImageryMetadataResponse","getApiKey","getImagerySet","response","statusCode","statusDescription","authenticationResultCode","resourceSets","resources","resource","zoomMax","imageWidth","imageHeight","zoomMin","imageUrlSubdomains","subdomain","quadKeyTileCoord","imageUrl","digits","mask","quadKey","imageryProviders","transform_1","imageryProvider","intersecting","coverageAreas","coverageArea","XYZ","CartoDB","account_","account","mapId_","config_","config","templateCache_","initializeMap_","getConfig","updateConfig","setCo
 nfig","paramHash","applyTemplate_","mapUrl","client","handleInitResponse_","handleInitError_","setRequestHeader","tilesUrl","cdn_url","https","layergroupid","opt_maxEntries","rbush_","items_","extents","getAll","getInExtent","forEach_","forEachInExtent","rbush","VectorSourceEvent","opt_feature","Vector","VectorSource","loader_","format_","overlaps_","overlaps","url_","loader","strategy_","strategy","collection","useSpatialIndex","featuresRtree_","loadedExtentsRtree_","nullGeometryFeatures_","idIndex_","uidIndex_","featureChangeKeys_","featuresCollection_","addFeaturesInternal","bindFeaturesCollection_","addFeature","addFeatureInternal","featureKey","addToIndex_","setupChangeEvents_","VectorEventType","handleFeatureChange_","valid","newFeatures","geometryFeatures","length_1","length_2","length_3","modifyingCollection","removeFeature","opt_fast","featureId","removeFeatureInternal","clearEvent","forEachFeature","forEachFeatureAtCoordinateDirect","forEachFeatureInExtent","forEachFeature
 IntersectingExtent","getFeaturesCollection","getFeaturesAtCoordinate","getFeaturesInExtent","getClosestFeatureToCoordinate","opt_filter","closestFeature","previousMinSquaredDistance","minDistance","getFeatureById","getFeatureByUid","getFormat","getOverlaps","getUrl","sid","removeFromIdIndex_","hasFeature","loadFeatures","loadedExtentsRtree","extentsToLoad","_loop_1","extentToLoad","this_1","removeLoadedExtent","removed","setLoader","Cluster","geometryFunction","boundRefresh_","setDistance","mapDistance","clustered","neighbors","neighbor","createCluster","TierSizeCalculation","CustomTile","zoomifyImage_","Zoomify","tierSizeCalculation","tierSizeInTiles","tileSizeForTierSizeCalculation","tileCountUpToTier","tileCoordZ","tileIndex","localContext_1","ZoomifyTileClass","testTileUrl","__spreadArrays","il","jl","Versions","IIIF_PROFILE_VALUES","supports","formats","qualities","COMPLIANCE_VERSION1","COMPLIANCE_VERSION2","COMPLIANCE_VERSION3","versionFunctions","iiifInfo","levelProfile","get
 ComplianceLevelSupportedFeatures","imageInfo","scale_factors","tile_width","tile_height","additionalProfile","profile","profileSupports","profileFormats","profileQualities","scaleFactors","extraFormats","preferredFormat","preferredFormats","reduce","acc","extraFeatures","extraQualities","IIIFInfo","setImageInfo","getImageApiVersion","getComplianceLevelEntryFromProfile","getComplianceLevelFromProfile","complianceLevel","getTileSourceOptions","opt_preferredOptions","imageOptions","quality","formatPercentage","percentage","toLocaleString","IIIF","baseUrl","supportsListedSizes","supportsListedTiles","isInteger","supportsArbitraryTiling","maxScaleFactor","ignoredSizesIndex","IiifTileClass","regionParam","sizeParam","tileX","tileY","regionX","regionY","regionW","regionH","sizeW","sizeH","regionWidth","regionHeight","ReprojImage","getImageFunction","sourceImage","sourcePixelRatio","targetExtent_","sourceImage_","sourcePixelRatio_","sourceListenerKey_","unlistenSource_","ImageSourceEventTyp
 e","ImageSourceEvent","defaultImageLoadFunction","ImageSource","reprojectedImage_","reprojectedRevision_","findNearestResolution","getImageInternal","handleImageChange","appendParams","uri","keyParams","ImageArcGISRest","params_","renderedRevision_","ratio_","getParams","halfWidth","halfHeight","imageResolution","getRequestUrl_","getImageLoadFunction","srid","modifiedUrl","setImageLoadFunction","updateParams","ImageCanvas","opt_loader","error_","getError","handleLoad_","ImageCanvasSource","canvasFunction_","canvasFunction","canvasElement","ImageMapGuide","displayDpi_","displayDpi","useOverlay_","useOverlay","dpi","mcsW","mcsH","devW","devH","mpp","baseParams","Static","imageExtent_","imageExtent","getImageExtent","targetWidth","GETFEATUREINFO_IMAGE_SIZE","ImageWMS","v13_","updateV13_","serverType_","getFeatureInfoUrl","projectionObj","sourceProjectionObj","getLegendUrl","LAYERS","mpu","viewExtent","requestExtent","WMSServerType","ATTRIBUTION","OSM","BaseImage","BaseImageLayer","Laye
 rRenderer","boundHandleImageChange_","handleImageChange_","layer_","loadedTileCallback","createLoadedTileFinder","getLayer","renderIfReadyAndVisible","loadImage","CanvasLayerRenderer","renderedResolution","tempTransform","pixelTransform","containerReused","useContainer","layerClassName","transformOrigin","topLeft","topRight","bottomRight","bottomLeft","clipUnrotated","inverted","dispatchRenderEvent_","preRender","postRender","getRenderTransform","renderPixel","newCanvas","newContext","clearRect","CanvasImageLayerRenderer","imageLayer","viewResolution","imageSource","renderedExtent","imagePixelRatio","viewCenter","size_1","canvasTransform","clipped","layerExtent","dw","dh","previousAlpha","ImageLayer","BaseTile","BaseTileLayer","preload","useInterimTilesOnError","setPreload","setUseInterimTilesOnError","getPreload","TileProperty","getUseInterimTilesOnError","CanvasTileLayerRenderer","tileLayer","extentChanged","renderedExtent_","renderedPixelRatio","renderedProjection","renderedRevis
 ion","renderedTiles","newTiles_","tmpExtent","tmpTileRange_","isDrawableTile","tileSource","sourceRevision","canvasExtent","tilesToDrawByZ","findLoadedTiles","tmpTileRange","childTileRange","canvasScale","clips","clipZs","currentClip","zs","currentZ","currentTilePixelSize","currentScale","dx_1","dy_1","originTileCoord","originTileExtent","origin_1","tileGutter","tilesToDraw","floatX","nextX","floatY","nextY","i_1","drawTileImage","updateUsedTiles","manageTilePyramid","scheduleExpireCache","getTileImage","tileAlpha","alphaChanged","postRenderFunction","opt_tileCallback","TileLayer","hasImageData","createMinion","operation","workerHasImageData","newWorkerImageData","buffers","meta","imageOps","numBuffers","numBytes","images","Uint8ClampedArray","arrays","pixels","createWorker","onMessage","lib","blob","Blob","URL","createObjectURL","worker","Worker","Processor","threads","_imageOps","workers","_onWorkerMessage","minion","terminated","postMessage","terminate","createFauxWorker","_worke
 rs","_queue","_maxQueueLength","queue","_running","_dataLookup","_job","process","_enqueue","_dispatch","job","slices","_resolveJob","imageData","createImageData","newImageData","RasterEventType","RasterOperationType","RasterSourceEvent","RasterSource","processor_","operationType_","operationType","threads_","layers_","createLayer","createLayers","requestedFrameState_","renderedImageCanvas_","iMax","sourceOrLayer","sourceAttribution","setOperation","opt_lib","updateFrameState_","allSourcesReady_","ready","processSources_","imageDatas","onWorkerComplete_","sharedContext","layerOrSource","Raster","ATTRIBUTIONS","LayerConfig","ProviderConfig","Stamen","provider","providerConfig","layerConfig","TileArcGISRest","tmpExtent_","getKeyForParams_","tileExtent","LabeledTile","strokeRect","TileDebug","textTileCoord","TileJSON","tileJSON_","handleTileJSONResponse","handleTileJSONError","onXHRLoad_","onXHRError_","tileJSON","getTileJSON","epsg4326Projection","attributionExtent_1","TileWMS","preem
 ptive","preemptive_","grid_","keys_","jsonp_","getData","xRelative","yRelative","row","forDataAtCoordinate","opt_request","loadInternal_","handleError_","json","UTFGrid","tileUrlFunction_","template_","getTemplate","forDataAtCoordinateAndResolution","grids","VectorTile","features_","onLoad","setFeatures","onError","canvasPool","VectorRenderTile","getSourceTiles","executorGroups","loadingSourceTiles","errorSourceTileKeys","hitDetectionImageData","replayState_","sourceTiles","wantedResolution","sourceZ","hasContext","getReplayState","dirty","renderedRenderOrder","renderedTileResolution","renderedTileRevision","renderedZ","renderedTileZ","defaultLoadFunction","loadingTiles_","sourceTileCache","tileGrids_","sourceTile","tileFeatures","candidate","loadedZ","previousSourceTiles","sourceTileCoord","listenChange","sourceTileKey","errorTileCount","coordKey","empty","WMTS","requestEncoding","WMTSRequestEncoding","version_","dimensions_","dimensions","matrixSet_","requestEncoding_","getKeyForD
 imensions_","createFromWMTSTemplate","getDimensions","getMatrixSet","getRequestEncoding","getVersion","updateDimensions","BaseVector","BaseVectorLayer","renderBuffer","updateWhileAnimating","updateWhileInteracting","declutter_","declutter","renderBuffer_","updateWhileAnimating_","updateWhileInteracting_","getDeclutter","getRenderBuffer","getRenderOrder","getUpdateWhileAnimating","getUpdateWhileInteracting","setRenderOrder","renderOrder","WebGLWorkerMessageType","WebGLLayerRenderer","WebGLPointsLayerRenderer","projectionMatrixTransform","sourceRevision_","verticesBuffer_","hitVerticesBuffer_","indicesBuffer_","program_","hitDetectionEnabled_","hitFragmentShader","hitVertexShader","hitProgram_","customAttributes","attribute","hitDetectionAttributes","currentTransform_","renderTransform_","invertRenderTransform_","renderInstructions_","hitRenderInstructions_","hitRenderTarget_","worker_","received","projectionTransform","hitDetection","vertexBuffer","indexBuffer","renderInstructions","
 featureCache_","featureCount_","sourceListenKeys_","handleSourceFeatureAdded_","handleSourceFeatureChanged_","handleSourceFeatureDelete_","handleSourceFeatureClear_","renderCount","renderHitDetection","vectorSource","viewNotMoving","sourceChanged","rebuildBuffers_","featureCache","totalInstructionsCount","totalHitInstructionsCount","hitColor","tmpCoords","tmpColor","renderIndex","hitIndex","featureUid","radix","customAttributesCount","hitMessage","colorDecodeId","Instruction","BEGIN_GEOMETRY","BEGIN_PATH","CLOSE_PATH","CUSTOM","DRAW_CHARS","DRAW_IMAGE","END_GEOMETRY","FILL","MOVE_TO_LINE_TO","SET_FILL_STYLE","SET_STROKE_STYLE","STROKE","beginPathInstruction","closePathInstruction","CanvasBuilder","maxLineWidth","beginGeometryInstruction1_","beginGeometryInstruction2_","bufferedMaxExtent_","instructions","tmpCoordinate_","hitDetectionInstructions","applyPixelRatio","dashArray","dash","appendFlatCoordinates","closed","skipFirst","myEnd","getBufferedMaxExtent","lastRel","nextRel","last
 XCoord","lastYCoord","nextCoord","skipped","drawCustomCoordinates_","builderEnds","builderEnd","beginGeometry","builderEndss","builderBegin","myEnds","endGeometry","reverseHitDetectionInstructions","instruction","createFill","fillInstruction","applyStroke","createStroke","updateFillStyle","currentFillStyle","updateStrokeStyle","currentStrokeStyle","currentLineCap","currentLineDash","currentLineDashOffset","currentLineJoin","currentLineWidth","currentMiterLimit","endGeometryInstruction","CanvasImageBuilder","declutterGroups_","imagePixelRatio_","anchorX_","anchorY_","height_","originX_","originY_","drawCoordinates_","myBegin","declutterGroups","hitDetectionImage","CanvasLineStringBuilder","drawFlatCoordinates_","moveToLineToInstruction","lastStroke","CanvasPolygonBuilder","drawFlatCoordinatess_","numEnds","setFillStrokeStyles_","circleInstruction","matchingChunk","m12","m23","x12","y12","x23","y23","chunkStart","chunkEnd","chunkM","TEXT_ALIGN","BATCH_CONSTRUCTORS","PolygonBuilder","B
 uilder","ImageBuilder","LineStringBuilder","CanvasTextBuilder","labels_","fillStates","strokeStates","textStates","textKey_","fillKey_","strokeKey_","flatOffset","flatEnd","oo","declutterGroup","drawChars_","geometryWidths","saveTextStates_","p0","p3","pixelRatio_1","strokeKey","textKey","fillKey","baseline","BuilderGroup","tolerance_","maxExtent_","resolution_","buildersByZIndex_","builderInstructions","zKey","builders","builderKey","builderInstruction","builderType","zIndexKey","replays","replay","Constructor","drawTextOnPath","startM","measureAndCacheTextWidth","rotatedCoordinates","previousAngle","numChars","segmentM","angleChanged","char","charLength","charM","segmentPos","lineStringLength","p4","Executor","alignFill_","coordinateCache_","renderedTransform_","widths_","createLabel","align","numLines","widths","currentWidth","measureTextWidths","renderWidth","OffscreenCanvasRenderingContext2D","CanvasRenderingContext2D","leftRight","replayTextBackground_","strokeInstruction","se
 tStrokeStyle_","replayImageOrLabel_","contextScale","imageOrLabel","snapToPixel","fillStroke","boxW","boxH","boxX","boxY","strokePadding","declutterArgs","repeatSize","boxes","declutterData","currentAlpha","drawLabelWithPointPlacement_","execute_","featureCallback","opt_hitExtent","dd","prevX","prevY","roundX","roundY","pendingFill","pendingStroke","lastFillInstruction","lastStrokeInstruction","coordinateCache","viewRotationFromTransform","batchSize","labelWithAnchor","widthIndex","declutterGroupIndex","measurePixelRatio","pixelRatioScale","cachedWidths","pathLength","textLength","cc","chars","execute","executeHitDetection","opt_featureCallback","ORDER","ExecutorGroup","allInstructions","opt_renderBuffer","executorsByZIndex_","hitDetectionContext_","hitDetectionTransform_","createExecutors_","flatClipCoords","getClipCoords","executors","instructionByZindex","hasExecutors","candidates","contextSize","hitExtent","circleArrayCache","arraySize","fillCircleArrayRowToMiddle","getCircleArr
 ay","j_1","result_1","executor","opt_builderTypes","opt_declutterReplays","builderTypes","0","replayDeclutter","declutterReplays","zz","executorData","currentExecutor","createHitDetectionImageData","transforms","featureCount","indexFactor","featuresByZIndex","featureStyleFunction","originalStyle","canvas_1","imgContext","byGeometryType","zIndexKeys","geomAndStyle","kk","hitDetect","resultFeatures","CanvasVectorLayerRenderer","vectorLayer","boundHandleStyleImageChange_","handleStyleImageChange_","animatingOrInteracting_","dirty_","hitDetectionImageData_","renderedFeatures_","renderedResolution_","renderedRotation_","renderedCenter_","renderedProjection_","renderedRenderOrder_","replayGroup_","replayGroupChanged","clipping","makeScale","world","transform_2","viewHints_1","Promise","layer_1","features_1","animating","interacting","frameStateExtent","vectorLayerRevision","vectorLayerRenderBuffer","vectorLayerRenderOrder","loadExtents","loadExtent","userExtent","replayGroupInstructions",
 "executorGroup","CanvasVectorImageLayerRenderer","vectorRenderer_","layerImageRatio_","getImageRatio","coordinateToVectorPixelTransform_","renderedPixelToCoordinateTransform_","vectorPixel","vectorRenderer","imageFrameState_1","image_1","IMAGE_REPLAYS","VECTOR_REPLAYS","CanvasVectorTileLayerRenderer","renderedLayerRevision_","renderTileImageQueue_","tileListenerKeys_","tmpTransform_","prepareTile","tileUid","updateExecutorGroup_","tileImageNeedsRender_","listenerKey","getRenderMode","VectorTileRenderType","renderTileImage_","layerRevision","builderState","layerUid","tt","sourceTileExtent","sharedExtent","bufferedExtent","executorGroupInstructions","replayExtent","renderingReplayGroup","_loop_2","tileContainsCoordinate","extent_1","tilePixel","renderQueuedTileImages_","renderMode","replayTypes","worldOffset","replayState","renderPixelRatio","renderScale","pixelScale","interpolatePoint","cumulativeLengths","opt_comparator","cmp","comparator","lineStringCoordinateAtM","extrapolate","m0
 ","flatMidpoint_","flatMidpointRevision_","appendCoordinate","forEachSegment","getCoordinateAtM","opt_extrapolate","getCoordinateAt","VectorLayer","geoM","fracA","fracB","fracM","geoA","geoB","geoStack","fractionStack","fractions","maxIterations","DEFAULT_STROKE_STYLE","INTERVALS","Graticule","maxLines","targetSize","showLabels","lonLabelFormatter","latLabelFormatter","lonLabelPosition","latLabelPosition","lonLabelStyle","latLabelStyle","intervals","maxLat_","maxLon_","minLat_","minLon_","maxX_","maxY_","minX_","minY_","targetSize_","maxLines_","meridians_","parallels_","strokeStyle_","fromLonLatTransform_","toLonLatTransform_","projectionCenterLonLat_","bottomLeft_","bottomRight_","topLeft_","topRight_","meridiansLabels_","parallelsLabels_","lonLabelFormatter_","latLabelFormatter_","lonLabelPosition_","latLabelPosition_","lonLabelStyleBase_","lonLabelStyle_","latLabelStyleBase_","latLabelStyle_","drawLabels_","intervals_","loaderFunction","strategyFunction","featurePool_","lineStyl
 e_","loadedExtent_","realWorldExtent","renderExtent","updateProjectionInfo_","createGraticule_","featuresColl","poolIndex","addMeridian_","lon","minLat","maxLat","lineString","getMeridian_","geom","addParallel_","minLon","maxLon","getParallel_","rotationCenter","rotationExtent","cr","sr","unrotatedWidth","unrotatedHeight","startWorld","endWorld","labelsAtStart","vectorContext","textPoint","getMeridianPoint_","getParallelPoint_","getInterval_","validCenterP","centerLonLat","cnt","centerLon","centerLat","validExtentP","validExtent","clampedLat","frac","meridian","clampedBottom","clampedTop","getMeridians","lon2","parallel","clampedLeft","clampedRight","getParallels","toLonLatTransform","split_1","lonLatCoordinates","worldExtentP","DEFAULT_GRADIENT","Heatmap","gradient","blur","gradient_","handleGradientChanged_","setGradient","setBlur","weightFunction_","getBlur","getGradient","colors","createLinearGradient","addColorStop","createGradient","u_size","u_blurSlope","u_gradientTexture","F
 eatureFormat","defaultFeatureProjection","getReadOptions","adaptOptions","readFeature","readGeometry","writeFeature","writeFeatures","writeGeometry","transformGeometryWithOptions","decimals","power_1","transformExtentWithOptions","MultiLineString","lineStrings","appendLineString","opt_interpolate","lineStringsCoordinateAtM","getLineString","getLineStrings","midpoints","intersectsLineStringArray","MultiPoint","appendPoint","getPoint","MultiPolygon","opt_endss","endss_","flatInteriorPointsRevision_","flatInteriorPoints_","appendPolygon","newEndss","multiArrayMaxSquaredDelta","assignClosestMultiArrayPoint","linearRingssContainsXY","linearRingss","getInteriorPoints","linearRingssAreOriented","simplifiedEndss","quantizeMultiArray","getPolygon","prevEnds","getPolygons","intersectsLinearRingMultiArray","deflateMultiCoordinatesArray","lastEnds","RenderFeature","type_","flatCoordinates_","flatMidpoints_","properties_","midpoint","layersPBFReader","layerPBFReader","featurePBFReader","readRawF
 eature","MVT","featureClass_","featureClass","geometryName","layerName_","layerName","idProperty_","idProperty","readRawGeometry_","cmd","coordsLen","currentEnd","cmdLen","createFeature_","rawFeature","getGeometryType","prevEndIndex","ctor","pbfLayers","pbfLayer","VectorTileLayer","renderMode_","defaultResolutions","createCanvas","hairSpacePool","applyLetterSpacing","letterSpacing","textWithLetterSpacing","joinSpaceString","ll","getMeasureContext","measureCache","renderFeatureCoordinates","emptyObj","zoomObj","functionCache","getValue","layoutOrPaint","functions","value_1","isExpr","compiledExpression","rawExpression","expressionData","filterCache","colorWithOpacity","templateRegEx","fromTemplate","glStyle","spriteImage","spriteImgSize","spriteImageUrl","img_1","olLayer","mapboxSource","allLayers","layersBySourceLayer","mapboxLayers","sourceLayer","source_1","textHalo","iconImageCache","patternCache","stylesLength","layerData","evaluateFilter","strokeColor","fillIcon","icon_1","spri
 teData","pattern","icon_cache_key","spriteImageData","createPattern","width_1","hasImage","placementAngle","iconImg","skipLabel","styleGeom","iconRotationAlignment","ii_1","iconSize","iconColor","circleRadius","circleStrokeColor","circleColor","circleStrokeWidth","cache_key","textSize","fontArray","textLineHeight","getFonts","textTransform","maxTextWidth","wrappedLabel","wrapText","em","hardLines","wrappedText","words","maxWidth","word","testLine","line_1","prevWidth","nextWidth","line_2","lineWords","lastWord","textAnchor","textHaloWidth","textOffset","textTranslate","vOffset","hOffset","textRotationAlignment","haloColor","halfTextSize","textPadding","cloneGeometries","clonedGeometries","GeometryCollection","opt_geometries","geometries_","changeEventsKeys_","listenGeometriesChange_","unlistenGeometriesChange_","geometryCollection","setGeometries","getGeometriesArrayRecursive","geometriesArray","simplifiedGeometries","simplified","simplifiedGeometryCollection","setGeometriesArray","
 getObject","JSONFeature","readFeatureFromObject","readFeaturesFromObject","readGeometryFromObject","readProjectionFromObject","writeFeatureObject","writeFeaturesObject","writeGeometryObject","readPointGeometry","readLineStringGeometry","readPolygonGeometry","readMultiPointGeometry","readMultiLineStringGeometry","readMultiPolygonGeometry","readGeometryCollectionGeometry","geoJSON","writePointGeometry","writeLineStringGeometry","rightHanded","writePolygonGeometry","writeMultiPointGeometry","writeMultiLineStringGeometry","writeMultiPolygonGeometry","writeGeometryCollectionGeometry","loadedFontFamilies","GeoJSON","extractGeometryName_","extractGeometryName","geoJSONFeature","geoJSONFeatures","crs","objects","fontFamilyRegEx","stripQuotesRegEx","hasFontFamily","styleSheets","styleSheet","cssRules","cssRule","cssText","processedFontFamilies","googleFamilies","fontsKey","googleFontDescriptions","googleFontDescription","fontUrl","querySelector","markup","head","spriteRegEx","withPath","toSp
 riteUrl","applyStyle","onChange","sizeFactor_1","spriteUrl_1","fetch","credentials","ok","statusText","spritesJson","getMapboxPath","ErrorEvent","SourceType","MapboxVector","MapboxVectorLayer","sourceId","accessToken","fetchStyle","styleUrl","mapboxPath","mapboxBaseUrl","normalizeStyleUrl","onStyleLoad","handleError","sourceIdOrLayersList","firstSource","normalizeSpriteUrl","normalizeGlyphsUrl","styleSource","VectorImage","VectorImageLayer","imageRatio","imageRatio_","DragAndDropEventType","DragAndDropEvent","file","opt_features","DragAndDrop","formatConstructors_","formatConstructors","dropListenKeys_","source_","handleResult_","tryReadFeatures_","registerListeners_","dropArea","handleDrop","handleStop","unregisterListeners_","files","dataTransfer","reader","FileReader","readAsText","dropEffect","DragRotateAndZoom","lastMagnitude_","magnitude","angleDelta","Circle","setCenterAndRadius","getRadiusSquared_","DrawEventType","DrawEvent","Draw","shouldHandle_","downPx_","downTimeout_","
 lastDragTime_","freehand_","snapTolerance_","snapTolerance","getMode","stopClick_","stopClick","minPoints_","minPoints","maxPoints_","maxPoints","finishCondition_","finishCondition","opt_geometry","squaredLength","Constructor_1","mode_1","dragVertexDelay_","dragVertexDelay","finishCoordinate_","sketchFeature_","sketchPoint_","sketchCoords_","sketchLine_","sketchLineCoords_","squaredClickTolerance_","clickTolerance","overlay_","freehandCondition_","freehand","freehandCondition","updateState_","getOverlay","move","addToDrawing_","startDrawing_","circleMode","finishDrawing","atFinish_","abortDrawing","downPx","clickPx","modifyDrawing_","createOrUpdateSketchPoint_","potentiallyDone","potentiallyFinishCoordinates","sketchCoords","finishCoordinate","finishPixel","updateSketchFeatures_","sketchLineGeom","removeLastPoint","sketchFeature","abortDrawing_","appendCoordinates","ending","sketchFeatures","overlaySource","ExtentEventType","ExtentEvent","getDefaultPointerStyleFunction","getPointHan
 dler","fixedPoint","getEdgeHandler","fixedP1","fixedP2","Extent","pointerHandler_","pixelTolerance_","pixelTolerance","snappedToVertex_","extentFeature_","vertexFeature_","extentOverlay_","boxStyle","vertexOverlay_","pointerStyle","snapToVertex_","pixelCoordinate","getExtentInternal","segments","getSegments","closestSegment","vertex","vertexPixel","pixel1","pixel2","squaredDist1","squaredDist2","dist","createOrUpdatePointerFeature_","createOrUpdateExtentFeature_","extentFeature","vertexFeature","getOpposingPoint","x_","y_","tempExtent","tempSegment","ModifyEventType","ModifyEvent","compareIndexes","projectedDistanceToSegmentDataSquared","pointCoordinates","segmentData","distanceToCenterSquared","distanceToCircumference","closestOnSegmentData","Modify","boundHandleFeatureChange_","defaultDeleteCondition_","deleteCondition_","deleteCondition","insertVertexCondition_","insertVertexCondition","vertexSegments_","lastPixel_","ignoreNextSingleClick_","modified_","rBush_","changingFeature_"
 ,"dragSegments_","SEGMENT_WRITERS_","writePointGeometry_","writeLineStringGeometry_","writePolygonGeometry_","writeMultiPointGeometry_","writeMultiLineStringGeometry_","writeMultiPolygonGeometry_","writeCircleGeometry_","writeGeometryCollectionGeometry_","handleSourceAdd_","handleSourceRemove_","addFeature_","handleFeatureAdd_","handleFeatureRemove_","lastPointerEvent_","writer","handlePointerAtPixel_","willModifyFeatures_","removeFeature_","removeFeatureSegmentData_","rBush","nodesToRemove","nodeToRemove","depth","centerSegmentData","circumferenceSegmentData","featureSegments","geometry_1","createOrUpdateVertexFeature_","removePoint","dragSegment","setGeometryCoordinates_","insertVertices","vertexExtent","segmentDataMatches","componentSegments","segmentDataMatch","insertVertex_","opt_coordinate","nodes","vertexSegments","rTree","updateSegmentIndices_","newSegmentData","newSegmentData2","removeVertex_","component","newIndex","dragSegments","segmentsByFeature","deleted","SelectEventT
 ype","SelectEvent","selected","deselected","originalFeatureStyles","Select","boundAddFeature_","boundRemoveFeature_","addCondition_","addCondition","removeCondition_","removeCondition","toggleCondition_","toggleCondition","multi_","multi","filter_","hitTolerance_","layers_1","layerFilter_","featureLayerAssociation_","addFeatureLayerAssociation_","getHitTolerance","setHitTolerance","restorePreviousStyle_","applySelectedStyle_","selectInteractions","removeFeatureLayerAssociation_","getFeatureFromEvent","Snap","vertex_","edge_","edge","featuresListenerKeys_","featureChangeListenerKeys_","indexedFeaturesExtents_","pendingFeatures_","opt_listen","feature_uid","segmentWriter","forEachFeatureAdd_","forEachFeatureRemove_","getFeatures_","snapTo","snapped","updateFeature_","featuresToUpdate","opt_unlisten","unregister","nodesToRemove_1","currentMap","closestSegmentData","projectedCoordinate","isCircle","closestOnCircle","TranslateEventType","TranslateEvent","startCoordinate","Translate","las
 tCoordinate_","startCoordinate_","lastFeature_","handleActiveChanged_","featuresAtPixel_","newCoordinate","deltaX_1","deltaY_1","oldMap","GEOMETRY_READERS","getGeometryLayout","paths","GEOMETRY_WRITERS","_a","_b","esriJSONPolygon","flatRing","outerRings","holes","hole","outerRing","convertRings","geometryReader","hasZ","hasM","getHasZM","geometryWriter","esriJSON","hasZM","multiPoint","multiLineString","EsriJSON","opt_idField","esriJSONFeature","esriJSONFeatures","objectIdFieldName","wkid","XMLFeature","XMLSerializer","readFeatureFromDocument","readFeatureFromNode","readFeaturesFromDocument","readFeaturesFromNode","ELEMENT_NODE","readGeometryFromDocument","readGeometryFromNode","readProjectionFromDocument","readProjectionFromNode","writeFeatureNode","serializeToString","writeFeaturesNode","writeGeometryNode","GMLNS","ONLY_WHITESPACE_RE","GMLBase","featureType","featureNS","srsName","schemaLocation","FEATURE_COLLECTION_PARSERS","namespace","readFeaturesInternal","ft","featureTypes","
 readFeatureElement","readGeometryElement","getAttribute","GEOMETRY_PARSERS","readFeatureElementInternal","asFeature","_content_","attName","fid","getAttributeNS","readPoint","readFlatCoordinatesFromNode","readMultiPoint","MULTIPOINT_PARSERS","readMultiLineString","MULTILINESTRING_PARSERS","readMultiPolygon","MULTIPOLYGON_PARSERS","pointMemberParser","POINTMEMBER_PARSERS","lineStringMemberParser","LINESTRINGMEMBER_PARSERS","polygonMemberParser","POLYGONMEMBER_PARSERS","readLineString","readFlatLinearRing","GEOMETRY_FLAT_COORDINATES_PARSERS","readLinearRing","readPolygon","flatLinearRings","FLAT_LINEAR_RINGS_PARSERS","RING_PARSERS","readBooleanString","readDateTime","dateTime","readDecimal","readDecimalString","readNonNegativeInteger","readNonNegativeIntegerString","writeBooleanTextNode","bool","writeStringTextNode","writeDecimalTextNode","toPrecision","writeNonNegativeIntegerTextNode","nonNegativeInteger","MULTIGEOMETRY_TO_MEMBER_NODENAME","GML3","surface_","surface","curve_","multiC
 urve_","multiCurve","multiSurface_","multiSurface","readMultiCurve","MULTICURVE_PARSERS","readMultiSurface","MULTISURFACE_PARSERS","curveMemberParser","CURVEMEMBER_PARSERS","surfaceMemberParser","SURFACEMEMBER_PARSERS","readPatch","PATCHES_PARSERS","readSegment","SEGMENTS_PARSERS","readPolygonPatch","readLineStringSegment","interiorParser","flatLinearRing","exteriorParser","readSurface","SURFACE_PARSERS","readCurve","CURVE_PARSERS","readEnvelope","ENVELOPE_PARSERS","readFlatPos","containerSrs","readFlatPosList","contextDimension","dim","writePos_","srsDimension","getCoords_","opt_srsName","opt_hasZ","writePosList_","writePoint","writeEnvelope","ENVELOPE_SERIALIZERS","writeLinearRing","posList","RING_NODE_FACTORY_","exteriorWritten","writeSurfaceOrPolygon","RING_SERIALIZERS","patches","writeSurfacePatches_","writeCurveOrLineString","writeCurveSegments_","writeMultiSurfaceOrPolygon","SURFACEORPOLYGONMEMBER_SERIALIZERS","MULTIGEOMETRY_MEMBER_NODE_FACTORY_","writeMultiPoint","POINTMEMBE
 R_SERIALIZERS","writeMultiCurveOrLineString","LINESTRINGORCURVEMEMBER_SERIALIZERS","writeRing","writeSurfaceOrPolygonMember","GEOMETRY_NODE_FACTORY_","writePointMember","writeLineStringOrCurveMember","writeGeometryElement","GEOMETRY_SERIALIZERS","writeFeatureElement","writeFeatureMembers_","setAttributeNS","GML","GML2","readFlatCoordinates","coordsGroups","readBox","BOX_PARSERS_","innerBoundaryIsParser","outerBoundaryIsParser","createCoordinatesNode_","writeCoordinates_","GML32","NAMESPACE_URIS","FEATURE_READER","readRte","readTrk","readWpt","GPX_PARSERS","LINK_PARSERS","GPX_SERIALIZERS","RTE_SEQUENCE","RTE_SERIALIZERS","TRK_SEQUENCE","TRK_SERIALIZERS","writeWptType","GPX","readExtensions_","readExtensions","handleReadExtensions_","extensionsNode","featureReader","gpx","GPX_NODE_FACTORY","RTE_PARSERS","parseLink","parseExtensions","RTEPT_PARSERS","rteValues","layoutOptions","TRK_PARSERS","TRKSEG_PARSERS","TRKPT_PARSERS","trkValues","WPT_PARSERS","LINK_SEQUENCE","LINK_SERIALIZERS","w
 riteLink","RTEPT_TYPE_SEQUENCE","TRKSEG_SERIALIZERS","TRKSEG_NODE_FACTORY","WPT_TYPE_SEQUENCE","WPT_TYPE_SERIALIZERS","date","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","GEOMETRY_TYPE_TO_NODENAME","applyLayoutOptions","DEFAULT_COLOR","DEFAULT_IMAGE_STYLE_ANCHOR","DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS","DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS","DEFAULT_IMAGE_STYLE_SIZE","DEFAULT_IMAGE_STYLE_SRC","DEFAULT_IMAGE_SCALE_MULTIPLIER","TextFeature","readFeatureFromText","readFeaturesFromText","readGeometryFromText","readProjectionFromText","writeFeatureText","writeFeaturesText","writeGeometryText","IGCZ","B_RECORD_RE","H_RECORD_RE","HFDTE_RECORD_RE","NEWLINE_RE","IGC","altitudeMode_","altitudeMode","year","month","day","lastDateTime","hour","minute","second","UTC","GX_NAMESPACE_URIS","ICON_ANCHOR_UNITS_MAP","PLACEMARK_PARSERS","extendedDataParser","regionParser","readMultiGeometry","styleMapValue","readStyleMapValue","placemarkObject","readURI","GX_MULT
 ITRACK_GEOMETRY_PARSERS","readGxTrack","NETWORK_LINK_PARSERS","REGION_PARSERS","LAT_LON_ALT_BOX_PARSERS","regionObject","LOD_PARSERS","lodObject","KML_SEQUENCE","KML_SERIALIZERS","DOCUMENT_SERIALIZERS","DOCUMENT_NODE_FACTORY","writePlacemark","DEFAULT_FILL_STYLE","DEFAULT_NO_IMAGE_STYLE","DEFAULT_IMAGE_STYLE","DEFAULT_TEXT_STROKE_STYLE","DEFAULT_TEXT_STYLE","DEFAULT_STYLE","TEXTAREA","DEFAULT_STYLE_ARRAY","KML","defaultStyle_","defaultStyle","extractStyles_","extractStyles","writeStyles_","writeStyles","sharedStyles_","showPointNames_","showPointNames","readDocumentOrFolder_","readPlacemark_","readSharedStyle_","readSharedStyleMap_","sharedStyles","drawName","multiGeometryPoints","featureStyle","findStyle","styleValue","nameStyle","foundStyle","createNameStyleFunction","createFeatureStyleFunction","styleUri","baseURI","fs","readName","readNameFromDocument","readNameFromNode","name_2","readNetworkLinks","networkLinks","readNetworkLinksFromDocument","readNetworkLinksFromNode","readReg
 ion","regions","readRegionFromDocument","readRegionFromNode","kml","xmlnsUri","readColor","hexColor","readScale","STYLE_MAP_PARSERS","pairObject","PAIR_PARSERS","ICON_STYLE_PARSERS","iconObject","ICON_PARSERS","xunits","yunits","LABEL_STYLE_PARSERS","LINE_STYLE_PARSERS","POLY_STYLE_PARSERS","FLAT_LINEAR_RING_PARSERS","GX_TRACK_PARSERS","whens","when","gxTrackObject","EXTRUDE_AND_ALTITUDE_MODE_PARSERS","MULTI_GEOMETRY_PARSERS","multiGeometry","homogeneous","setCommonGeometryProperties","INNER_BOUNDARY_IS_PARSERS","OUTER_BOUNDARY_IS_PARSERS","STYLE_PARSERS","styleObject","IconObject","drawIcon","hotSpot","outline","hasExtrude","hasTessellate","hasAltitudeMode","extrudes","tessellates","altitudeModes","DATA_PARSERS","EXTENDED_DATA_PARSERS","featureObject","displayName","SCHEMA_DATA_PARSERS","writeColorTextNode","abgr","hex","EXTENDEDDATA_NODE_SERIALIZERS","pair","createCDATASection","writeCDATASection","DATA_NODE_FACTORY","ICON_SEQUENCE","ICON_SERIALIZERS","GX_NODE_FACTORY","ICON_STYLE
 _SEQUENCE","ICON_STYLE_SERIALIZERS","vec2","writeScaleTextNode","LABEL_STYLE_SEQUENCE","LABEL_STYLE_SERIALIZERS","LINE_STYLE_SEQUENCE","LINE_STYLE_SERIALIZERS","GEOMETRY_NODE_FACTORY","POINT_NODE_FACTORY","LINE_STRING_NODE_FACTORY","LINEAR_RING_NODE_FACTORY","POLYGON_NODE_FACTORY","MULTI_GEOMETRY_SERIALIZERS","writePrimitiveGeometry","writePolygon","writeMultiGeometry","BOUNDARY_IS_SERIALIZERS","writeBoundaryIs","PLACEMARK_SERIALIZERS","namesAndValues","names","pointStyles","lineStyles","polyStyles","STYLE_SEQUENCE","STYLE_SERIALIZERS","PLACEMARK_SEQUENCE","EXTENDEDDATA_NODE_FACTORY","styleArray","PRIMITIVE_GEOMETRY_SEQUENCE","PRIMITIVE_GEOMETRY_SERIALIZERS","POLY_STYLE_SEQUENCE","POLYGON_SERIALIZERS","INNER_BOUNDARY_NODE_FACTORY","OUTER_BOUNDARY_NODE_FACTORY","POLY_STYLE_SERIALIZERS","iconProperties","WAY_PARSERS","ndrefs","readTag","PARSERS","tags","NODE_PARSERS","ways","OSMXML","flipXY","opt_destOffset","destOffset","encodeDeltas","numbers","opt_factor","factor","lastNumbers","en
 codeFloats","decodeDeltas","encoded","decodeFloats","encodeUnsignedInteger","encodeUnsignedIntegers","encodeSignedIntegers","current","decodeUnsignedIntegers","decodeSignedIntegers","Polyline","factor_","geometryLayout_","geometryLayout","TopoJSON","topoJSONTopology","arcs","transformArc","transformArcs","topoJSONFeatures","objectName","readFeaturesFromGeometryCollection","readFeatureFromGeometry","transformVertex","concatenateArcs","polyArray","ringCoords","indices","Filter","tagName_","getTagName","LogicalNary","And","Bbox","Spatial","Contains","propertyName","During","ComparisonBinary","opt_matchCase","matchCase","EqualTo","GreaterThanOrEqualTo","Intersects","IsBetween","lowerBoundary","upperBoundary","IsLike","opt_wildCard","opt_singleChar","opt_escapeChar","wildCard","singleChar","escapeChar","IsNull","LessThanOrEqualTo","Not","NotEqualTo","Or","and","TRANSACTION_SUMMARY_PARSERS","TRANSACTION_RESPONSE_PARSERS","INSERT_RESULTS_PARSERS","QUERY_SERIALIZERS","TRANSACTION_SERIALIZER
 S","gmlVersion","featurePrefix","typeName","getTypeName","XMLNS","writeOgcFidFilter","WFSNS","nativeElement","vendorId","safeToIgnore","OGCNS","SCHEMA_LOCATIONS","WFS","featureType_","featureNS_","gmlFormat_","gmlFormat","schemaLocation_","getFeatureType","setFeatureType","readTransactionResponse","readTransactionResponseFromDocument","readTransactionResponseFromNode","readFeatureCollectionMetadata","readFeatureCollectionMetadataFromDocument","readFeatureCollectionMetadataFromNode","writeGetFeature","handle","outputFormat","maxFeatures","resultType","viewParams","propertyNames","GETFEATURE_SERIALIZERS","writeTransaction","inserts","updates","deletes","baseObj","gmlOptions","nativeElements","OGC_FID_PARSERS","prefix","writeFilterCondition","valueReference","timePeriod","writeTimeInstant","writeLogicalFilter","writeOgcPropertyName","writeComparisonFilter","writeOgcLiteral","writeOgcExpression","timeInstant","timePosition","GeometryConstructor","TokenType","WKTGeometryType","Lexer","wk
 t","index_","isAlpha_","isNumeric_","opt_decimal","isWhiteSpace_","nextChar_","nextToken","readNumber_","readText_","scientificNotation","substring","lexer_","token_","layout_","consume_","isTokenType","isMatch","parseGeometry_","parseGeometryLayout_","dimToken","dimInfo","parseGeometryCollectionText_","isEmptyGeometry_","formatErrorMessage_","parsePointText_","parsePoint_","parseLineStringText_","parsePointList_","parsePolygonText_","parseLineStringTextList_","parseMultiPointText_","parsePointTextList_","parseMultiLineStringText_","parseMultiPolygonText_","parsePolygonTextList_","geomType","WKT","splitCollection_","splitCollection","parse_","encodePointGeometry","encodeLineStringGeometry","encodePolygonGeometry","GeometryEncoder","components","geoms","enc","geometryEncoder","encodeGeometryLayout","XML","readFromDocument","readFromNode","readHref","SERVICE_PARSERS","CAPABILITY_PARSERS","REQUEST_PARSERS","EXCEPTION_PARSERS","LAYER_PARSERS","WMSCapabilities","wmsCapabilityObject","rea
 dKeywordList","CONTACT_INFORMATION_PARSERS","CONTACT_PERSON_PARSERS","CONTACT_ADDRESS_PARSERS","geographicBoundingBox","EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS","westBoundLongitude","southBoundLatitude","eastBoundLongitude","northBoundLatitude","ATTRIBUTION_PARSERS","authorityObject","readFormatOnlineresource","metadataObject","parentLayerObject","layerObject","queryable","cascaded","noSubsets","fixedWidth","fixedHeight","childValue","parentValue","readSizedFormatOnlineresource","readOperationType","OPERATIONTYPE_PARSERS","DCPTYPE_PARSERS","HTTP_PARSERS","FORMAT_ONLINERESOURCE_PARSERS","KEYWORDLIST_PARSERS","formatOnlineresource","WMSGetFeatureInfo","readFeatures_","layerElement","layerFeatures","gmlFeatures","SERVICE_IDENTIFICATION_PARSERS","SERVICE_PROVIDER_PARSERS","OPERATIONS_METADATA_PARSERS","OWS","owsObject","ADDRESS_PARSERS","ALLOWED_VALUES_PARSERS","CONSTRAINT_PARSERS","CONTACT_INFO_PARSERS","PHONE_PARSERS","DCP_PARSERS","REQUEST_METHOD_PARSERS","OPERATION_PARSERS","SERVICE_CONT
 ACT_PARSERS","CONTENTS_PARSERS","WMTSCapabilities","owsParser_","WMTSCapabilityObject","TMS_PARSERS","isDefault","TMS_LINKS_PARSERS","DIMENSION_PARSERS","resourceType","WGS84_BBOX_READERS","legend","TMS_LIMITS_LIST_PARSERS","TMS_LIMITS_PARSERS","readCoordinates","TM_PARSERS","events","FullScreenEventType","isFullScreenSupported","requestFullscreen","fullscreenEnabled","isFullScreen","fullscreenElement","requestFullScreen","FullScreen","cssClassName_","labelNode_","labelActive","labelActiveNode_","button_","setClassName_","handleFullScreen_","exitFullscreen","requestFullScreenWithKeys","handleFullScreenChange_","fullscreen","activeClassName","inactiveClassName","nextClassName","MousePosition","coordinateFormat","setCoordinateFormat","undefinedHTML_","undefinedHTML","renderOnMouseOut_","renderedHTML_","mapProjection_","getCoordinateFormat","handleMouseMove","updateHTML_","handleMouseOut","html","ControlledMap","OverviewMap","boundHandleRotationChanged_","handleRotationChanged_","viewE
 xtent_","ovmapDiv_","view_","ovmap_","ovmap","boxSizing","boxOverlay_","overlayBox","mousePosition","endMoving","oldView","unbindView_","handleMapPropertyChange_","bindView_","resetExtent_","newView","validateExtent_","ovmapSize","ovextent","topLeftPixel","bottomRightPixel","boxWidth","boxHeight","ovmapWidth","ovmapHeight","recenter_","ovview","MAX_RATIO","updateBox_","ovresolution","getOverviewMap","LEADING_DIGITS","ScaleLine","bar","innerElement_","viewState_","minWidth_","minWidth","renderedWidth_","handleUnitsChanged_","setUnits","scaleBar_","scaleBarSteps_","scaleBarText_","dpi_","setDpi","pointResolutionUnits","nominalCount","suffix","metersPerDegree","decimalCount","createScaleBar","mapScale","getScaleForResolution","scaleSteps","stepWidth","backgroundColor","createMarker","createStepText","isLast","lengthString","Direction","ZoomSlider","currentResolution_","direction_","heightLimit_","widthLimit_","startX_","startY_","thumbSize_","sliderInitialized_","thumbElement","contain
 erElement","handleDraggerStart_","handleDraggerDrag_","handleDraggerEnd_","handleContainerClick_","initSlider_","containerWidth","containerHeight","thumb","thumbWidth","thumbHeight","relativePosition","getRelativePosition_","getResolutionForPosition_","drag","setThumbPosition_","getPositionForResolution_","ZoomToExtent","handleZoomToExtent","ol","featureloader","loadingstrategy","proj4","webgl","sphere","stableSort","compareFnc","colorlike","createStringXY","toStringHDMS","upAndDown","click","doubleClick","focus","penOnly","pointerEvt","platformModifierKeyOnly","pointerMove","touchOnly","setWithCredentials","xhrWithCredentials","writeFilter","between","during","equalTo","greaterThan","greaterThanOrEqualTo","isNull","lessThan","lessThanOrEqualTo","like","not","notEqualTo","or","createBox","boxCoordinates","createRegularPolygon","Group","projCodes","defs","def","axis","to_meter","code1","proj1","code2","proj2","def1","def2","toLonLat","lonLat","getRenderPixel","toContext","PointsLayer
 ","ImageStatic","optionsFromCapabilities","wmtsCap","tileMatrixSets","supportedCRS","matrixSetObj","projConfig","matrix","TileMatrix","selectedMatrixLimit","MinTileCol","MinTileRow","MaxTileCol","MatrixWidth","MaxTileRow","MatrixHeight","Identifier","ScaleDenominator","TopLeftCorner","tileSpanX","TileWidth","tileSpanY","TileHeight","gets","encodings","composeCssTransform","DYNAMIC_DRAW","ELEMENT_ARRAY_BUFFER","Helper","PostProcessingPass","RenderTarget","STREAM_DRAW","registerDocument","registerXMLSerializer","xmlSerializer"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OA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B,M0LyhB1BjF,GAAGI,MAAM8E,qB1L9iByB,M0L+iBlClF,GAAGI,MAAM+E,OAAS,GAClBnF,GAAGI,MAAM+E,OAAOpiG,wBAA0B,GAC1Ci9F,GAAGI,MAAMgF,mBAAqB,GAC9BpF,GAAGI,MAAMiF,aAAe,GACxBrF,GAAGI,MAAMrhG,Y1LriBgB,M0LsiBzBihG,GAAGI,MAAMkF,Y1L7iBgB,M0L8iBzBtF,GAAG9lG,IAAIV,kBAAoB,GAC3BwmG,GAAG9lG,IAAIj6F,MAAQ,GACf+/L,GAAG9lG,IAAIqrG,iBzLhIA,SAA0Br1I,GAC7BusC,GAAYvsC,GyLgIhB8vI,GAAG9lG,IAAIsrG,sBzLrJA,SAA+BC,GAClCjpG,GAAiBipG,GyLsJN,gB","file":"ol.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof e
 xports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ol\"] = factory();\n\telse\n\t\troot[\"ol\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\tre
 turn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1:
  behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call
 \n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","var $version = 8;\nvar $root = {\n\tversion: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: [\n\t\t\t8\n\t\t],\n\t\tdoc: \"Style specification version number. Must be 8.\",\n\t\texample: 8\n\t},\n\tname: {\n\t\ttype: \"string\",\n\t\tdoc: \"A human-readable name for the style.\",\n\t\texample: \"Bright\"\n\t},\n\tmetadata: {\n\t\ttype: \"*\",\n\t\tdoc: \"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n\t},\n\tcenter: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tdoc: \"Default map center in longitude and latitude.  The style center will be used only if the ma
 p has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: [\n\t\t\t-73.9749,\n\t\t\t40.7736\n\t\t]\n\t},\n\tzoom: {\n\t\ttype: \"number\",\n\t\tdoc: \"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: 12.5\n\t},\n\tbearing: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Default bearing, in degrees. The bearing is the compass direction that is \\\"up\\\"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: 29\n\t},\n\tpitch: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 6
 0 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: 50\n\t},\n\tlight: {\n\t\ttype: \"light\",\n\t\tdoc: \"The global light source.\",\n\t\texample: {\n\t\t\tanchor: \"viewport\",\n\t\t\tcolor: \"white\",\n\t\t\tintensity: 0.4\n\t\t}\n\t},\n\tsources: {\n\t\trequired: true,\n\t\ttype: \"sources\",\n\t\tdoc: \"Data source specifications.\",\n\t\texample: {\n\t\t\t\"mapbox-streets\": {\n\t\t\t\ttype: \"vector\",\n\t\t\t\turl: \"mapbox://mapbox.mapbox-streets-v6\"\n\t\t\t}\n\t\t}\n\t},\n\tsprite: {\n\t\ttype: \"string\",\n\t\tdoc: \"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containi
 ng the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).\",\n\t\texample: \"mapbox://sprites/mapbox/bright-v8\"\n\t},\n\tglyphs: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).\",\n\t\texample: \"mapbox://fonts/mapbox/{fontstack}/{range}.pbf\"\n\t},\n\ttransition: {\n\t\ttype: \"transition\",\n\t\tdoc: \"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.\",\n\t\texample: {\n\t\t\tduration: 300,\n\t\t\tdelay: 0\n\
 t\t}\n\t},\n\tlayers: {\n\t\trequired: true,\n\t\ttype: \"array\",\n\t\tvalue: \"layer\",\n\t\tdoc: \"Layers will be drawn in the order of this array.\",\n\t\texample: [\n\t\t\t{\n\t\t\t\tid: \"water\",\n\t\t\t\tsource: \"mapbox-streets\",\n\t\t\t\t\"source-layer\": \"water\",\n\t\t\t\ttype: \"fill\",\n\t\t\t\tpaint: {\n\t\t\t\t\t\"fill-color\": \"#00ffff\"\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n};\nvar sources = {\n\t\"*\": {\n\t\ttype: \"source\",\n\t\tdoc: \"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided.\"\n\t}\n};\nvar source = [\n\t\"source_vector\",\n\t\"source_raster\",\n\t\"source_raster_dem\",\n\t\"source_geojson\",\n\t\"source_video\",\n\t\"source_image\"\n];\nvar source_vector = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvector: {\n\t\t\t\tdoc: \"A vector til
 e source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The type of the source.\"\n\t},\n\turl: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t],\n\t\tdoc: \"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n\t},\n\tscheme: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\txyz: {\n\t\t\t\tdoc: \"Slippy map tilenames scheme.\"\n\t\t\t},\n\t\t\ttms: {\n\t\t\t\tdoc: \"OSGeo 
 spec scheme.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"xyz\",\n\t\tdoc: \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22,\n\t\tdoc: \"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n\t},\n\tpromoteId: {\n\t\ttype: \"promoteId\",\n\t\tdoc: \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used acr
 oss all its source layers.\"\n\t},\n\t\"*\": {\n\t\ttype: \"*\",\n\t\tdoc: \"Other keys to configure the data source.\"\n\t}\n};\nvar source_raster = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\traster: {\n\t\t\t\tdoc: \"A raster tile source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The type of the source.\"\n\t},\n\turl: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t],\n\t\tdoc: \"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When thi
 s property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22,\n\t\tdoc: \"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\"\n\t},\n\ttileSize: {\n\t\ttype: \"number\",\n\t\t\"default\": 512,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n\t},\n\tscheme: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\txyz: {\n\t\t\t\tdoc: \"Slippy map tilenames scheme.\"\n\t\t\t},\n\t\t\ttms: {\n\t\t\t\tdoc: \"OSGeo spec scheme.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"xyz\",\n\t\tdoc: \"Influences the y direction of the tile coordinates. The global-merca
 tor (aka Spherical Mercator) profile is assumed.\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n\t},\n\t\"*\": {\n\t\ttype: \"*\",\n\t\tdoc: \"Other keys to configure the data source.\"\n\t}\n};\nvar source_raster_dem = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\t\"raster-dem\": {\n\t\t\t\tdoc: \"A RGB-encoded raster DEM source\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The type of the source.\"\n\t},\n\turl: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t],\n\t\tdoc: \"An ar
 ray containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22,\n\t\tdoc: \"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\"\n\t},\n\ttileSize: {\n\t\ttype: \"number\",\n\t\t\"default\": 512,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to
  a user.\"\n\t},\n\tencoding: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tterrarium: {\n\t\t\t\tdoc: \"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.\"\n\t\t\t},\n\t\t\tmapbox: {\n\t\t\t\tdoc: \"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"mapbox\",\n\t\tdoc: \"The encoding used by this source. Mapbox Terrain RGB is used by default\"\n\t},\n\t\"*\": {\n\t\ttype: \"*\",\n\t\tdoc: \"Other keys to configure the data source.\"\n\t}\n};\nvar source_geojson = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tgeojson: {\n\t\t\t\tdoc: \"A GeoJSON data source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The data type of the GeoJSON source.\"\n\t},\n\tdata: {\n\t\ttype: \"*\",\n\t\tdoc: \"A URL to a GeoJSON file, or inline GeoJSON.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 18,\n\t\tdoc: \"Maximum zoo
 m level at which to create vector tiles (higher means greater detail at high zoom levels).\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n\t},\n\tbuffer: {\n\t\ttype: \"number\",\n\t\t\"default\": 128,\n\t\tmaximum: 512,\n\t\tminimum: 0,\n\t\tdoc: \"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance.\"\n\t},\n\ttolerance: {\n\t\ttype: \"number\",\n\t\t\"default\": 0.375,\n\t\tdoc: \"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance).\"\n\t},\n\tcluster: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source wit
 h additional properties:\\n * `cluster` Is `true` if the point is a cluster \\n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\\n * `point_count` Number of original points grouped into this cluster\\n * `point_count_abbreviated` An abbreviated point count\"\n\t},\n\tclusterRadius: {\n\t\ttype: \"number\",\n\t\t\"default\": 50,\n\t\tminimum: 0,\n\t\tdoc: \"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile.\"\n\t},\n\tclusterMaxZoom: {\n\t\ttype: \"number\",\n\t\tdoc: \"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered).\"\n\t},\n\tclusterProperties: {\n\t\ttype: \"*\",\n\t\tdoc: \"An object defining custom properties on the generated clusters if clustering is enabled, aggregating values fro
 m clustered points. Has the form `{\\\"property_name\\\": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `\\\"+\\\"` or `\\\"max\\\"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\\n\\nExample: `{\\\"sum\\\": [\\\"+\\\", [\\\"get\\\", \\\"scalerank\\\"]]}`.\\n\\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `[\\\"accumulated\\\"]` value, e.g.:\\n`{\\\"sum\\\": [[\\\"+\\\", [\\\"accumulated\\\"], [\\\"get\\\", \\\"sum\\\"]], [\\\"get\\\", \\\"scalerank\\\"]]}`\"\n\t},\n\tlineMetrics: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values.\"\n\t},\n\tgenerateId: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"Whether to generate ids
  for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values.\"\n\t},\n\tpromoteId: {\n\t\ttype: \"promoteId\",\n\t\tdoc: \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`.\"\n\t}\n};\nvar source_video = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvideo: {\n\t\t\t\tdoc: \"A video data source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The data type of the video source.\"\n\t},\n\turls: {\n\t\trequired: true,\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"URLs to video content in order of preferred format.\"\n\t},\n\tcoordinates: {\n\t\trequired: true,\n\t\tdoc: \"Corners of video specified in longitude, latitude pairs.\",\n\t\ttype: \"array\",\n\t\tlength: 4,\n\t\tvalue: {\n\t\t\ttype: \"array\",\n\t\t\tlength: 2,\n\t\t\tvalue: \"number\",\n\t\t\tdoc: \"A sing
 le longitude, latitude pair.\"\n\t\t}\n\t}\n};\nvar source_image = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\timage: {\n\t\t\t\tdoc: \"An image data source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The data type of the image source.\"\n\t},\n\turl: {\n\t\trequired: true,\n\t\ttype: \"string\",\n\t\tdoc: \"URL that points to an image.\"\n\t},\n\tcoordinates: {\n\t\trequired: true,\n\t\tdoc: \"Corners of image specified in longitude, latitude pairs.\",\n\t\ttype: \"array\",\n\t\tlength: 4,\n\t\tvalue: {\n\t\t\ttype: \"array\",\n\t\t\tlength: 2,\n\t\t\tvalue: \"number\",\n\t\t\tdoc: \"A single longitude, latitude pair.\"\n\t\t}\n\t}\n};\nvar layer = {\n\tid: {\n\t\ttype: \"string\",\n\t\tdoc: \"Unique layer name.\",\n\t\trequired: true\n\t},\n\ttype: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tfill: {\n\t\t\t\tdoc: \"A filled polygon with an optional stroked border.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\"
 ,\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tline: {\n\t\t\t\tdoc: \"A stroked line.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tsymbol: {\n\t\t\t\tdoc: \"An icon or a text label.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tcircle: {\n\t\t\t\tdoc: \"A filled circle.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\theatmap: {\n\t\t\t\tdoc: \"A heatma
 p.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"fill-extrusion\": {\n\t\t\t\tdoc: \"An extruded (3D) polygon.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.27.0\",\n\t\t\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\t\t\tios: \"3.6.0\",\n\t\t\t\t\t\tmacos: \"0.5.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\traster: {\n\t\t\t\tdoc: \"Raster map textures such as satellite imagery.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\thillshade: {\n\t\t\t\tdoc: \"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terr
 arium tiles.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.43.0\",\n\t\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tbackground: {\n\t\t\t\tdoc: \"The background color or pattern of the map.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdoc: \"Rendering type of this layer.\",\n\t\trequired: true\n\t},\n\tmetadata: {\n\t\ttype: \"*\",\n\t\tdoc: \"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n\t},\n\tsource: {\n\t\ttype: \"string\",\n\t\tdoc: \"Name of a source description to be used for this layer. Required for all layer types except `background`.\"\n\t},\n\t\"sourc
 e-layer\": {\n\t\ttype: \"string\",\n\t\tdoc: \"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\tminimum: 0,\n\t\tmaximum: 24,\n\t\tdoc: \"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\tminimum: 0,\n\t\tmaximum: 24,\n\t\tdoc: \"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.\"\n\t},\n\tfilter: {\n\t\ttype: \"filter\",\n\t\tdoc: \"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.\"\n\t},\n\tlayout: {\n\t\ttype: \"layout\",\n\t\tdoc: \"Layout properties for the layer.\"\n\t},\n\tpa
 int: {\n\t\ttype: \"paint\",\n\t\tdoc: \"Default paint properties for this layer.\"\n\t}\n};\nvar layout = [\n\t\"layout_fill\",\n\t\"layout_line\",\n\t\"layout_circle\",\n\t\"layout_heatmap\",\n\t\"layout_fill-extrusion\",\n\t\"layout_symbol\",\n\t\"layout_raster\",\n\t\"layout_hillshade\",\n\t\"layout_background\"\n];\nvar layout_background = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_fill = {\n\t\"fill-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Sorts features in ascending order based on this value. Features with a
  higher sort key will appear above features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"
 0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_circle = {\n\t\"circle-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\tios: \"5.9.0\",\n\t\t\t\tmacos: \"0.16.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\tios: \"5.9.0\",\n\t\t\t\tmacos: \"0.16.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"de
 fault\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_heatmap = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_line = {\n\t\"line-cap\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tbutt: {\n\t\t\t\tdoc: \"A cap with a squared-off end which is drawn to the exact endpoint of the
  line.\"\n\t\t\t},\n\t\t\tround: {\n\t\t\t\tdoc: \"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.\"\n\t\t\t},\n\t\t\tsquare: {\n\t\t\t\tdoc: \"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"butt\",\n\t\tdoc: \"The display of line endings.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-join\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tbevel: {\n\t\t\t\tdoc: \"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the 
 line's width.\"\n\t\t\t},\n\t\t\tround: {\n\t\t\t\tdoc: \"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.\"\n\t\t\t},\n\t\t\tmiter: {\n\t\t\t\tdoc: \"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"miter\",\n\t\tdoc: \"The display of lines when joining.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-miter-li
 mit\": {\n\t\ttype: \"number\",\n\t\t\"default\": 2,\n\t\tdoc: \"Used to automatically convert miter joins to bevel joins for sharp angles.\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"line-join\": \"miter\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-round-limit\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1.05,\n\t\tdoc: \"Used to automatically convert round joins to miter joins for shallow angles.\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"line-join\": \"round\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t
 \tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown
 .\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_symbol = {\n\t\"symbol-placement\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tpoint: {\n\t\t\t\tdoc: \"The label is placed at the point where the geometry is located.\"\n\t\t\t},\n\t\t\tline: {\n\t\t\t\tdoc: \"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.\"\n\t\t\t},\n\t\t\t\"line-center\": {\n\t\t\t\tdoc: \"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"point\",\n\t\tdoc: \"Label placement r
 elative to its geometry.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"`line-center` value\": {\n\t\t\t\tjs: \"0.47.0\",\n\t\t\t\tandroid: \"6.4.0\",\n\t\t\t\tios: \"4.3.0\",\n\t\t\t\tmacos: \"0.10.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-spacing\": {\n\t\ttype: \"number\",\n\t\t\"default\": 250,\n\t\tminimum: 1,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance between two symbol anchors.\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"symbol-placement\": \"line\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparamete
 rs: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-avoid-edges\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc
 : \"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first.  When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.53.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.11.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.53.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.11.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"symbol-z-order\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tauto: {\n\t\t\t\tdoc: \"
 Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`.\"\n\t\t\t},\n\t\t\t\"viewport-y\": {\n\t\t\t\tdoc: \"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`.\"\n\t\t\t},\n\t\t\tsource: {\n\t\t\t\tdoc: \"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.\",\n\t\t\"sdk-sup
 port\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.6.0\",\n\t\t\t\tios: \"4.5.0\",\n\t\t\t\tmacos: \"0.12.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-allow-overlap\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the icon will be visible even if it collides with other previously drawn symbols.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-ignore-placement\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, other symbols c
 an be visible even if they collide with the icon.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-optional\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},
 \n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-rotation-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"In combination with `symbol-placement`, determines the rotation behavior of icons.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t
 ios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"`auto` value\": {\n\t\t\t\tjs: \"0.25.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-size\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tunits: \"factor of the original icon size\",\n\t\tdoc: \"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tan
 droid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-text-fit\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tnone: {\n\t\t\t\tdoc: \"The icon is displayed at its intrinsic aspect ratio.\"\n\t\t\t},\n\t\t\twidth: {\n\t\t\t\tdoc: \"The icon is scaled in the x-dimension to fit the width of the text.\"\n\t\t\t},\n\t\t\theight: {\n\t\t\t\tdoc: \"The icon is scaled in the y-dimension to fit the height of the text.\"\n\t\t\t},\n\t\t\tboth: {\n\t\t\t\tdoc: \"The icon is scaled in both x- and y-dimensions.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"none\",\n\t\tdoc: \"Scales the icon to fit around the associated text.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandro
 id: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t},\n\t\t\t\"stretchable icons\": {\n\t\t\t\tjs: \"1.6.0\",\n\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-text-fit-padding\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tunits: \"pixels\",\n\t\tdoc: \"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"icon-text-fit\": [\n\t\t\t\t\t\"both\",\n\t\t\t\t\t\"width\",\n\t\t\t\t\t\"height\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandr
 oid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-image\": {\n\t\ttype: \"resolvedImage\",\n\t\tdoc: \"Name of image in sprite to use for drawing an image background.\",\n\t\ttokens: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\tunits: \"degrees\",\n\t\t
 doc: \"Rotates the icon clockwise.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-padding\": {\n\t\ttype: \"number\",\n\t\t\"default\": 2,\n\t\tminimum: 0,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Size of the additional area around the icon bounding box used for detecting symbol collisions.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tma
 cos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-keep-upright\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the icon may be flipped to prevent it from being rendered upside-down.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t{\n\t\t\t\t\"icon-rotation-alignment\": \"map\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-offset\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t
 \"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tdoc: \"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t\td
 oc: \"The center of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The left side of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The right side of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\ttop: {\n\t\t\t\tdoc: \"The top of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t\tdoc: \"The bottom of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-left\": {\n\t\t\t\tdoc: \"The top left corner of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t\tdoc: \"The top right corner of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t\tdoc: \"The bottom left corner of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t\tdoc: \"The bottom right corner of the icon is placed closest to the anchor.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\
 tdoc: \"Part of the icon placed closest to the anchor.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The icon is aligned to the plane of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The icon is aligned to the plane of the viewport.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"Automatically matches the value of `icon-rotation-alignment`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n
 \t\tdoc: \"Orientation of icon when map is pitched.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The text is aligned to the plane of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The text is aligned to the plane of the viewport.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"Automatically matches the value of `text-rotation-alignment`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"Orientation of text when map is pitched.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs:
  \"0.21.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t},\n\t\t\t\"`auto` value\": {\n\t\t\t\tjs: \"0.25.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-rotation-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `li
 ne-center`, this is equivalent to `map`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"`auto` value\": {\n\t\t\t\tjs: \"0.25.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-field\": {\n\t\ttype: \"formatted\",\n\t\t\"default\": \"\",\n\t\ttokens: true,\n\t\tdoc: \"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.\",\n\t\t\"sdk
 -support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-font\": {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\t\"default\": [\n\t\t\t\"Open Sans Regular\",\n\t\t\t\"Arial Unicode MS Regular\"\n\t\t],\n\t\tdoc: \"Font stack to use for displaying text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandro
 id: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-size\": {\n\t\ttype: \"number\",\n\t\t\"default\": 16,\n\t\tminimum: 0,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Font size.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-max-width\": {\n\t\ttype: \"number\",\n\t\t\"default\":
  10,\n\t\tminimum: 0,\n\t\tunits: \"ems\",\n\t\tdoc: \"The maximum line width for text wrapping.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-line-height\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1.2,\n\t\tunits: \"ems\",\n\t\tdoc: \"Text leading value for multi-line text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"
 0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-letter-spacing\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tunits: \"ems\",\n\t\tdoc: \"Text tracking amount.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-justify\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tauto: {\n\t\t\t\tdoc: \"The text is aligned towards the anchor position.\"\n\t
 \t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The text is aligned to the left.\"\n\t\t\t},\n\t\t\tcenter: {\n\t\t\t\tdoc: \"The text is centered.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The text is aligned to the right.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\tdoc: \"Text justification options.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-
 radial-offset\": {\n\t\ttype: \"number\",\n\t\tunits: \"ems\",\n\t\t\"default\": 0,\n\t\tdoc: \"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"property-type\": \"data-driven\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t}\n\t},\n\t\"text-variable-anchor\": {\n\t\ttype: \"array\",\n\t\tvalue: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t\tdoc: \"The center of the text is placed closest
  to the anchor.\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The left side of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The right side of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\ttop: {\n\t\t\t\tdoc: \"The top of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t\tdoc: \"The bottom of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-left\": {\n\t\t\t\tdoc: \"The top left corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t\tdoc: \"The top right corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t\tdoc: \"The bottom left corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t\tdoc: \"The bottom right corner of the text is placed closest to the anchor.\"\n\t\t\t}\n\t\t},\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": 
 [\n\t\t\t\t\t\"point\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\tdoc: \"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t\tdoc: \"The center of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The left side of t
 he text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The right side of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\ttop: {\n\t\t\t\tdoc: \"The top of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t\tdoc: \"The bottom of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-left\": {\n\t\t\t\tdoc: \"The top left corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t\tdoc: \"The top right corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t\tdoc: \"The bottom left corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t\tdoc: \"The bottom right corner of the text is placed closest to the anchor.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\tdoc: \"Part of the text placed closest to the anchor.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"!\": 
 \"text-variable-anchor\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-max-angle\": {\n\t\ttype: \"number\",\n\t\t\"default\": 45,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Maximum angle change between adjacent characters.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\
 n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-writing-mode\": {\n\t\ttype: \"array\",\n\t\tvalue: \"enum\",\n\t\tvalues: {\n\t\t\thorizontal: {\n\t\t\t\tdoc: \"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally.\"\n\t\t\t},\n\t\t\tvertical: {\n\t\t\t\tdoc: \"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array
  define priority order for the placement of an orientation variant.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"point\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.3.0\",\n\t\t\t\tandroid: \"8.3.0\",\n\t\t\t\tios: \"5.3.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Rotates the text clockwise.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\
 t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-padding\": {\n\t\ttype: \"number\",\n\t\t\"default\": 2,\n\t\tminimum: 0,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Size of the additional area around the text bounding box used for detecting symbol collisions.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-keep-upright\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\tdoc: \"If true, the text may be flipped vertically to prevent it from being rendered up
 side-down.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"text-rotation-alignment\": \"map\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-transform\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tnone: {\n\t\t\t\tdoc: \"The text is not altered.\"\n\t\t\t},\n\t\t\tuppercase: {\n\t\t\t\tdoc: \"Forces all letters to be displayed in uppercase.\"\n\t\t\t},\n\t\t\tlowercase: {\n\t\t\t\tdoc: \"Forces all letters to be displayed in lowercase.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"none\",\n\t\tdoc: \"Specifies how to capitalize text, similar to the CSS `text-
 transform` property.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-offset\": {\n\t\ttype: \"array\",\n\t\tdoc: \"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.\",\n\t\tvalue: \"number\",\n\t\tunits: \"ems\",\n\t\tlength: 2,\n\t\t\
 "default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"!\": \"text-radial-offset\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-allow-overlap\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the text will be visible even if it collides with other previously drawn symbols.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t
 ios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-ignore-placement\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, other symbols can be visible even if they collide with the text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-optional\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.\",\n\t\trequires: [\n\t\t\t\
 "text-field\",\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_raster = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is 
 shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_hillshade = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar filter = {\n\ttype: \"array\",\n\tvalue: \"*\",\n\tdoc: \"A filter sel
 ects specific features from a layer.\"\n};\nvar filter_operator = {\n\ttype: \"enum\",\n\tvalues: {\n\t\t\"==\": {\n\t\t\tdoc: \"`[\\\"==\\\", key, value]` equality: `feature[key] = value`\"\n\t\t},\n\t\t\"!=\": {\n\t\t\tdoc: \"`[\\\"!=\\\", key, value]` inequality: `feature[key] ≠ value`\"\n\t\t},\n\t\t\">\": {\n\t\t\tdoc: \"`[\\\">\\\", key, value]` greater than: `feature[key] > value`\"\n\t\t},\n\t\t\">=\": {\n\t\t\tdoc: \"`[\\\">=\\\", key, value]` greater than or equal: `feature[key] ≥ value`\"\n\t\t},\n\t\t\"<\": {\n\t\t\tdoc: \"`[\\\"<\\\", key, value]` less than: `feature[key] < value`\"\n\t\t},\n\t\t\"<=\": {\n\t\t\tdoc: \"`[\\\"<=\\\", key, value]` less than or equal: `feature[key] ≤ value`\"\n\t\t},\n\t\t\"in\": {\n\t\t\tdoc: \"`[\\\"in\\\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`\"\n\t\t},\n\t\t\"!in\": {\n\t\t\tdoc: \"`[\\\"!in\\\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`\"\n\t\t},\n\t\tall: {\n\t\t\tdoc: \"`[\
 \\"all\\\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`\"\n\t\t},\n\t\tany: {\n\t\t\tdoc: \"`[\\\"any\\\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`\"\n\t\t},\n\t\tnone: {\n\t\t\tdoc: \"`[\\\"none\\\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`\"\n\t\t},\n\t\thas: {\n\t\t\tdoc: \"`[\\\"has\\\", key]` `feature[key]` exists\"\n\t\t},\n\t\t\"!has\": {\n\t\t\tdoc: \"`[\\\"!has\\\", key]` `feature[key]` does not exist\"\n\t\t},\n\t\twithin: {\n\t\t\tdoc: \"`[\\\"within\\\", object]` feature geometry is within object geometry\"\n\t\t}\n\t},\n\tdoc: \"The filter operator.\"\n};\nvar geometry_type = {\n\ttype: \"enum\",\n\tvalues: {\n\t\tPoint: {\n\t\t\tdoc: \"Filter to point geometries.\"\n\t\t},\n\t\tLineString: {\n\t\t\tdoc: \"Filter to line geometries.\"\n\t\t},\n\t\tPolygon: {\n\t\t\tdoc: \"Filter to polygon geometries.\"\n\t\t}\n\t},\n\tdoc: \"The geometry type for the filter to select.\"\n};\nvar function_stop = {\n\ttype: \"array\",\n\tminimum: 0,\n\tmaximum: 24
 ,\n\tvalue: [\n\t\t\"number\",\n\t\t\"color\"\n\t],\n\tlength: 2,\n\tdoc: \"Zoom level and value pair.\"\n};\nvar expression = {\n\ttype: \"array\",\n\tvalue: \"*\",\n\tminimum: 1,\n\tdoc: \"An expression defines a function that can be used for data-driven style properties or feature filters.\"\n};\nvar expression_name = {\n\tdoc: \"\",\n\ttype: \"enum\",\n\tvalues: {\n\t\t\"let\": {\n\t\t\tdoc: \"Binds expressions to named variables, which can then be referenced in the result expression using [\\\"var\\\", \\\"variable_name\\\"].\",\n\t\t\tgroup: \"Variable binding\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"var\": {\n\t\t\tdoc: \"References variable bound using \\\"let\\\".\",\n\t\t\tgroup: \"Variable binding\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandr
 oid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tliteral: {\n\t\t\tdoc: \"Provides a literal array or object value.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tarray: {\n\t\t\tdoc: \"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tat: {\n\t\t\tdoc: \"Retrieves an item from an array.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-suppor
 t\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"in\": {\n\t\t\tdoc: \"Determines whether an item exists in an array or a substring exists in a string.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.6.0\",\n\t\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\t\tios: \"5.8.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"index-of\": {\n\t\t\tdoc: \"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.10.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tslice: {\n\t\t\tdoc: \"Returns an item from an array or a substring from a strin
 g from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.10.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"case\": {\n\t\t\tdoc: \"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmatch: {\n\t\t\tdoc: \"Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `[\\\"get\\\", \\\"building_type\\\"]`). Each label must be either:\\n - a single literal value; or\\n - an array of literal values, whose values 
 must be all strings or all numbers (e.g. `[100, 101]` or `[\\\"c\\\", \\\"b\\\"]`). The input matches if any of the values in the array matches, similar to the `\\\"in\\\"` operator.\\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcoalesce: {\n\t\t\tdoc: \"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tstep: {\n\t\t\tdoc: \"Produces discrete, stepped results by evaluating a piecewise-
 constant function defined by pairs of input and output values (\\\"stops\\\"). The `input` may be any numeric expression (e.g., `[\\\"get\\\", \\\"population\\\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.42.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tinterpolate: {\n\t\t\tdoc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). The `input` may be any numeric expression (e.g., `[\\\"get\\\", \\\"population\\\"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\\n\\nInterpolation types:\\n- `[
 \\\"linear\\\"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\\n- `[\\\"exponential\\\", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\\n- `[\\\"cubic-bezier\\\", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.42.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"interpolate-hcl\": {\n\t\t\tdoc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). Works like `interpolate`, but the output 
 type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.49.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"interpolate-lab\": {\n\t\t\tdoc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.49.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tln2: {\n\t\t\tdoc: \"Returns mathematical constant ln(2).\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tpi:
  {\n\t\t\tdoc: \"Returns the mathematical constant pi.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\te: {\n\t\t\tdoc: \"Returns the mathematical constant e.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"typeof\": {\n\t\t\tdoc: \"Returns a string describing the type of the given value.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tstring: {\n\t\t\tdoc: \"Asserts that the input value is a string. If multiple values are provid
 ed, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tnumber: {\n\t\t\tdoc: \"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tboolean: {\n\t\t\tdoc: \"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the in
 puts are booleans, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tobject: {\n\t\t\tdoc: \"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcollator: {\n\t\t\tdoc: \"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If non
 e is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tformat: {\n\t\t\tdoc: \"Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`'image'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\\n- `\\\"text-font\\\"`: Overrides the font stack specified by the root layout property.\\n- `\\\"text-color\\\"`: Overrides the color specified by the root paint property.\\n- `\\\"font-scale\\\"`: Applies a scaling factor on `text-si
 ze` as specified by the root layout property.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.48.0\",\n\t\t\t\t\tandroid: \"6.7.0\",\n\t\t\t\t\tios: \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t},\n\t\t\t\t\"text-font\": {\n\t\t\t\t\tjs: \"0.48.0\",\n\t\t\t\t\tandroid: \"6.7.0\",\n\t\t\t\t\tios: \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t},\n\t\t\t\t\"font-scale\": {\n\t\t\t\t\tjs: \"0.48.0\",\n\t\t\t\t\tandroid: \"6.7.0\",\n\t\t\t\t\tios: \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t},\n\t\t\t\t\"text-color\": {\n\t\t\t\t\tjs: \"1.3.0\",\n\t\t\t\t\tandroid: \"7.3.0\",\n\t\t\t\t\tios: \"4.10.0\",\n\t\t\t\t\tmacos: \"0.14.0\"\n\t\t\t\t},\n\t\t\t\timage: {\n\t\t\t\t\tjs: \"1.6.0\",\n\t\t\t\t\tandroid: \"8.6.0\",\n\t\t\t\t\tios: \"5.7.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\timage: {\n\t\t\tdoc: \"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in t
 he `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.4.0\",\n\t\t\t\t\tandroid: \"8.6.0\",\n\t\t\t\t\tios: \"5.7.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"number-format\": {\n\t\t\tdoc: \"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify t
 he minimum and maximum number of fractional digits to include.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.54.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-string\": {\n\t\t\tdoc: \"Converts the input value to a string. If the input is `null`, the result is `\\\"\\\"`. If the input is a boolean, the result is `\\\"true\\\"` or `\\\"false\\\"`. If the input is a number, it is converted to a string as specified by the [\\\"NumberToString\\\" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `\\\"rgba(r,g,b,a)\\\"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Spec
 ification.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-number\": {\n\t\t\tdoc: \"Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the [\\\"ToNumber Applied to the String Type\\\" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",
 \n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-boolean\": {\n\t\t\tdoc: \"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-rgba\": {\n\t\t\tdoc: \"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.\",\n\t\t\tgroup: \"Color\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-color\": {\n\t\t\tdoc: \"Converts the input value to a color. If multiple values are provided, each one is
  evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\trgb: {\n\t\t\tdoc: \"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.\",\n\t\t\tgroup: \"Color\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\trgba: {\n\t\t\tdoc: \"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any 
 component is out of range, the expression is an error.\",\n\t\t\tgroup: \"Color\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tget: {\n\t\t\tdoc: \"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: {\n\t\t\tdoc: \"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\
 ",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tlength: {\n\t\t\tdoc: \"Gets the length of an array or string.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tproperties: {\n\t\t\tdoc: \"Gets the feature properties object.  Note that in some cases, it may be more efficient to use [\\\"get\\\", \\\"property_name\\\"] directly.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"feature-state\": {\n\t\t\tdoc: \"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the featur
 e's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\\\"feature-state\\\"] can only be used with paint properties that support data-driven styling.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.46.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"geometry-type\": {\n\t\t\tdoc: \"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tid: {\n\t\t\tdoc: \"Gets the feature's id, if it has one.\",\n\t\t\tgroup: \"Feature data\",\n
 \t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tzoom: {\n\t\t\tdoc: \"Gets the current zoom level.  Note that in style layout and paint properties, [\\\"zoom\\\"] may only appear as the input to a top-level \\\"step\\\" or \\\"interpolate\\\" expression.\",\n\t\t\tgroup: \"Zoom\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"heatmap-density\": {\n\t\t\tdoc: \"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.\",\n\t\t\tgroup: \"Heatmap\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tj
 s: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"line-progress\": {\n\t\t\tdoc: \"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\taccumulated: {\n\t\t\tdoc: \"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.53.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"+\": {\n\t\t\tdoc: \"Returns the sum of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",
 \n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"*\": {\n\t\t\tdoc: \"Returns the product of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"-\": {\n\t\t\tdoc: \"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"/\": {\n\t\t\tdoc: \"Returns the result of floating point division of the first input by the second.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic funct
 ionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"%\": {\n\t\t\tdoc: \"Returns the remainder after integer division of the first input by the second.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"^\": {\n\t\t\tdoc: \"Returns the result of raising the first input to the power specified by the second.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tsqrt: {\n\t\t\tdoc: \"Returns the square root of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t
 \tjs: \"0.42.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tlog10: {\n\t\t\tdoc: \"Returns the base-ten logarithm of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tln: {\n\t\t\tdoc: \"Returns the natural logarithm of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tlog2: {\n\t\t\tdoc: \"Returns the base-two logarithm of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos:
  \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tsin: {\n\t\t\tdoc: \"Returns the sine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcos: {\n\t\t\tdoc: \"Returns the cosine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttan: {\n\t\t\tdoc: \"Returns the tangent of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasin: {\n\t\t\tdoc: \"Returns the arcsine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\
 t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tacos: {\n\t\t\tdoc: \"Returns the arccosine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tatan: {\n\t\t\tdoc: \"Returns the arctangent of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmin: {\n\t\t\tdoc: \"Returns the minimum value of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\
 ",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmax: {\n\t\t\tdoc: \"Returns the maximum value of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tround: {\n\t\t\tdoc: \"Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `[\\\"round\\\", -1.5]` evaluates to -2.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tabs: {\n\t\t\tdoc: \"Returns the absolute value of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\
 t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tceil: {\n\t\t\tdoc: \"Returns the smallest integer that is greater than or equal to the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tfloor: {\n\t\t\tdoc: \"Returns the largest integer that is less than or equal to the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdistance: {\n\t\t\tdoc: \"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Featu
 re`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\t\tios: \"5.9.0\",\n\t\t\t\t\tmacos: \"0.16.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"==\": {\n\t\t\tdoc: \"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollato
 r: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"!=\": {\n\t\t\tdoc: \"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\">\": {\n\t\t\tdoc: \"Returns `true` if the first input is stri
 ctly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"<\": {\n\t\t\tdoc: \"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are 
 not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\">=\": {\n\t\t\tdoc: \"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will 
 produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"<=\": {\n\t\t\tdoc: \"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t
 \t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tall: {\n\t\t\tdoc: \"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tany: {\n\t\t\tdoc: \"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluat
 ion is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"!\": {\n\t\t\tdoc: \"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\twithin: {\n\t\t\tdoc: \"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported 
 features for evaluation:\\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.9.0\",\n\t\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\t\tios: \"5.8.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"is-supported-script\": {\n\t\t\tdoc: \"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0
 \",\n\t\t\t\t\tandroid: \"6.6.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tupcase: {\n\t\t\tdoc: \"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdowncase: {\n\t\t\tdoc: \"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tconcat: {\n\t\t\tdoc: \"Returns a `string` consi
 sting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"resolved-locale\": {\n\t\t\tdoc: \"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\nvar light = {\n\tanchor: {\n\t\ttype: \"enum\",\n\t\t\"default\": \"viewport\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The position of the light source is aligned to the rot
 ation of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The position of the light source is aligned to the rotation of the viewport.\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"data-constant\",\n\t\ttransition: false,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\tdoc: \"Whether extruded geometries are lit relative to the map or viewport.\",\n\t\texample: \"map\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t},\n\tposition: {\n\t\ttype: \"array\",\n\t\t\"default\": [\n\t\t\t1.15,\n\t\t\t210,\n\t\t\t30\n\t\t],\n\t\tlength: 3,\n\t\tvalue: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\tdoc: \"Position of the light source relative to lit (extruded
 ) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).\",\n\t\texample: [\n\t\t\t1.5,\n\t\t\t90,\n\t\t\t80\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t},\n\tcolor: {\n\t\ttype: \"color\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": \"#ffffff\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true,\n\t\tdoc: \"Color tint fo
 r lighting extruded geometries.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t},\n\tintensity: {\n\t\ttype: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": 0.5,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true,\n\t\tdoc: \"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t}\n};\nvar paint = [\n\t\"paint_fill\",\n\t\"paint_line\",\n\t\"paint_circle\",\n\t\"paint_heatmap\",\n\t\"paint_fill-extrusion\",\n\t\"paint_symbol\",\n\t\"paint_raster\",\n\t\"paint_hillshade\",\n\t\"paint_backgr
 ound\"\n];\nvar paint_fill = {\n\t\"fill-antialias\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\tdoc: \"Whether or not the fill should be antialiased.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\tdoc: \"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\
 n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"fill-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.19.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tma
 cos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-outline-color\": {\n\t\ttype: \"color\",\n\t\tdoc: \"The outline color of the fill. Matches the value of `fill-color` if unspecified.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"fill-pattern\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"fill-antialias\": true\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.19.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\
 t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The fill is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The fill is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `fill-translat
 e`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"fill-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.5.0\"
 ,\n\t\t\t\tmacos: \"0.11.0\",\n\t\t\t\tios: \"4.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t}\n};\nvar paint_line = {\n\t\"line-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the line will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line
 -color\": {\n\t\ttype: \"color\",\n\t\tdoc: \"The color with which the line will be drawn.\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.23.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negati
 ves indicate left and up, respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The line is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The line is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `line-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"line-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: 
 false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Stroke thickness.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-gap-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tdoc: \"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.\",
 \n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-offset\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.\",\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\t\"sdk-support\": {\n\t\t\
 t\"basic functionality\": {\n\t\t\t\tjs: \"0.12.1\",\n\t\t\t\tandroid: \"3.0.0\",\n\t\t\t\tios: \"3.1.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Blur applied to the line, in pixels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}
 \n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-dasharray\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tdoc: \"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"line widths\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t
 \tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded\"\n\t},\n\t\"line-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\tmacos: \"0.11.0\",\n\t\t\t\tios: \"4.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\
 t\t\"property-type\": \"cross-faded-data-driven\"\n\t},\n\t\"line-gradient\": {\n\t\ttype: \"color\",\n\t\tdoc: \"Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\\\"lineMetrics\\\": true`.\",\n\t\ttransition: false,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-dasharray\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tsource: \"geojson\",\n\t\t\t\thas: {\n\t\t\t\t\tlineMetrics: true\n\t\t\t\t}\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.45.0\",\n\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\tios: \"4.4.0\",\n\t\t\t\tmacos: \"0.11.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"line-progress\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"color-ramp\"\n\t}\n};\nvar paint_circle = {\n\t\"circle-radius\": {\n\t\ttype: \"number\",\n\t\t\"default\": 5,\n\t\tminimum
 : 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Circle radius.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.18.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The fill color of the circle.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.18.0\",\n\t\t\t\tand
 roid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.20.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driv
 en\"\n\t},\n\t\"circle-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the circle will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.20.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negatives indicate left and u
 p, respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The circle is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The circle is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `circle-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"circle-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\
 tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-pitch-scale\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"Circles are scaled according to their apparent distance to the camera.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Circles are not scaled.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"map\",\n\t\tdoc: \"Controls the scaling behavior of the circle when the map is pitched.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The circle is aligned to the plane of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The circ
 le is aligned to the plane of the viewport.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"viewport\",\n\t\tdoc: \"Orientation of circle when map is pitched.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-stroke-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: 
 \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-stroke-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The stroke color of the circle.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-stroke-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: 
 \"The opacity of the circle's stroke.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t}\n};\nvar paint_heatmap = {\n\t\"heatmap-radius\": {\n\t\ttype: \"number\",\n\t\t\"default\": 30,\n\t\tminimum: 1,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": 
 {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"heatmap-weight\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransition: false,\n\t\tdoc: \"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t},\n\t\t\t\"data-driven styl
 ing\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"heatmap-intensity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tdoc: \"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"heatmap-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": [\n\t
 \t\t\"interpolate\",\n\t\t\t[\n\t\t\t\t\"linear\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"heatmap-density\"\n\t\t\t],\n\t\t\t0,\n\t\t\t\"rgba(0, 0, 255, 0)\",\n\t\t\t0.1,\n\t\t\t\"royalblue\",\n\t\t\t0.3,\n\t\t\t\"cyan\",\n\t\t\t0.5,\n\t\t\t\"lime\",\n\t\t\t0.7,\n\t\t\t\"yellow\",\n\t\t\t1,\n\t\t\t\"red\"\n\t\t],\n\t\tdoc: \"Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `[\\\"heatmap-density\\\"]` as input.\",\n\t\ttransition: false,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"heatmap-density\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"color-ramp\"\n\t},\n\t\"heatmap-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The global opacity at which the heatmap layer will be drawn.\",\
 n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_symbol = {\n\t\"icon-opacity\": {\n\t\tdoc: \"The opacity at which the icon will be drawn.\",\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\
 texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\tdoc: \"The color of the icon. This can only be used with sdf icons.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-color\": {\n\t\ttype: \"color\",\n\t\t\"d
 efault\": \"rgba(0, 0, 0, 0)\",\n\t\ttransition: true,\n\t\tdoc: \"The color of the icon's halo. Icon halos can only be used with SDF icons.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance of halo to the icon outline.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functi
 onality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Fade out the halo towards the outside.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.
 0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-translate-anc
 hor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"Icons are translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Icons are translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `icon-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"icon-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the text will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"ba
 sic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-color\": {\n\t\ttype: \"color\",\n\t\tdoc: \"The color with which the text will be drawn.\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\toverridable: true,\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"
 3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-halo-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"rgba(0, 0, 0, 0)\",\n\t\ttransition: true,\n\t\tdoc: \"The color of the text's halo, which helps it stand out from backgrounds.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type
 \": \"data-driven\"\n\t},\n\t\"text-halo-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-halo-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The halo's fadeout d
 istance towards the outside.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n
 \t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The text is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The text is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `text-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t\"text-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\
 tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_raster = {\n\t\"raster-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the image will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-hue-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\ttransition: true,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Rotates hues around the color wheel.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\
 t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-brightness-min\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the brightness of the image. The value is the minimum brightness.\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-brightness-max\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the brightness of the image. The value is the maximum brightness.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic
  functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-saturation\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the saturation of the image.\",\n\t\t\"default\": 0,\n\t\tminimum: -1,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-contrast\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the contrast of the image.\",\n\t\t\"default\": 0,\n\t\tminimum: -1,\n\t\tmaximum: 1,\n\t\ttransition:
  true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-resampling\": {\n\t\ttype: \"enum\",\n\t\tdoc: \"The resampling/interpolation method to use for overscaling, also known as texture magnification filter\",\n\t\tvalues: {\n\t\t\tlinear: {\n\t\t\t\tdoc: \"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled\"\n\t\t\t},\n\t\t\tnearest: {\n\t\t\t\tdoc: \"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"linear\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic
  functionality\": {\n\t\t\t\tjs: \"0.47.0\",\n\t\t\t\tandroid: \"6.3.0\",\n\t\t\t\tios: \"4.2.0\",\n\t\t\t\tmacos: \"0.9.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-fade-duration\": {\n\t\ttype: \"number\",\n\t\t\"default\": 300,\n\t\tminimum: 0,\n\t\ttransition: false,\n\t\tunits: \"milliseconds\",\n\t\tdoc: \"Fade duration when a new tile is added.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_hillshade = {\n\t\"hillshade-illumination-direction\": {\n\t\ttype: \"number\",\n\t\t\"default\": 335,\n\t\tminimum: 0,\n\t\tmaximum: 359,\n\t\tdoc: \"The di
 rection of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.\",\n\t\ttransition: false,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-illumination-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The hillshade illumination is relative to the north direction.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The hillshade illumination is relative to the top of the viewport.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"viewport\",\n\t\tdoc: \"Direction of light source when map is rotated.\",\n\t\t\"sdk-support\": {\n\t
 \t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-exaggeration\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Intensity of the hillshade\",\n\t\t\"default\": 0.5,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-shadow-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The shading color of areas that face away from the light source.\",\n\t\ttransition: tr
 ue,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-highlight-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#FFFFFF\",\n\t\tdoc: \"The shading color of areas that faces towards the light source.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-accent-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The shading color used to accentuate rugged 
 terrain like sharp cliffs and gorges.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_background = {\n\t\"background-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The color with which the background will be drawn.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"background-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"
 \n\t},\n\t\"background-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded\"\n\t},\n\t\"background-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\tdoc: \"The opacity at which the background will be drawn.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\
 t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar transition = {\n\tduration: {\n\t\ttype: \"number\",\n\t\t\"default\": 300,\n\t\tminimum: 0,\n\t\tunits: \"milliseconds\",\n\t\tdoc: \"Time allotted for transitions to complete.\"\n\t},\n\tdelay: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"milliseconds\",\n\t\tdoc: \"Length of time before a transition begins.\"\n\t}\n};\nvar promoteId = {\n\t\"*\": {\n\t\ttype: \"string\",\n\t\tdoc: \"A name of a feature property to use as ID for feature state.\"\n\t}\n};\nvar v8 = {\n\t$version: $version,\n\t$root: $root,\n\tsources: sources,\n\tsource: source,\n\tsource_vector: source_vector,\n\tsource_raster: source_raster,\n\tsource_raster_dem: source_raster_dem,\n\tsource_geojson: source_geojson,\n\tsource_video: 
 source_video,\n\tsource_image: source_image,\n\tlayer: layer,\n\tlayout: layout,\n\tlayout_background: layout_background,\n\tlayout_fill: layout_fill,\n\tlayout_circle: layout_circle,\n\tlayout_heatmap: layout_heatmap,\n\t\"layout_fill-extrusion\": {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n},\n\tlayout_line: layout_line,\n\tlayout_symbol: layout_symbol,\n\tlayout_raster: layout_raster,\n\tlayout_hillshade: layout_hillshade,\n\tfilter: filter,\n\tfilter_operator: filter_operator,\n\tgeometry_type: geometry_type,\n\t\"function\": {\n\texp
 ression: {\n\t\ttype: \"expression\",\n\t\tdoc: \"An expression.\"\n\t},\n\tstops: {\n\t\ttype: \"array\",\n\t\tdoc: \"An array of stops.\",\n\t\tvalue: \"function_stop\"\n\t},\n\tbase: {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tdoc: \"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly.\"\n\t},\n\tproperty: {\n\t\ttype: \"string\",\n\t\tdoc: \"The name of a feature property to use as the function input.\",\n\t\t\"default\": \"$zoom\"\n\t},\n\ttype: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tidentity: {\n\t\t\t\tdoc: \"Return the input value as the output value.\"\n\t\t\t},\n\t\t\texponential: {\n\t\t\t\tdoc: \"Generate an output by interpolating between stops just less than and just greater than the function input.\"\n\t\t\t},\n\t\t\tinterval: {\n\t\t\t\tdoc: \"Return the output value 
 of the stop just less than the function input.\"\n\t\t\t},\n\t\t\tcategorical: {\n\t\t\t\tdoc: \"Return the output value of the stop equal to the function input.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The interpolation strategy to use in function evaluation.\",\n\t\t\"default\": \"exponential\"\n\t},\n\tcolorSpace: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\trgb: {\n\t\t\t\tdoc: \"Use the RGB color space to interpolate color values\"\n\t\t\t},\n\t\t\tlab: {\n\t\t\t\tdoc: \"Use the LAB color space to interpolate color values.\"\n\t\t\t},\n\t\t\thcl: {\n\t\t\t\tdoc: \"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.\",\n\t\t\"default\
 ": \"rgb\"\n\t},\n\t\"default\": {\n\t\ttype: \"*\",\n\t\trequired: false,\n\t\tdoc: \"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\\n* In categorical functions, when the feature value does not match any of the stop domain values.\\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\\nIf no default is provided, the style property's default is used in these circumstances.\"\n\t}\n},\n\tfunction_stop: function_stop,\n\texpression: expression,\n\texpression_name: expression_name,\n\tlight: light,\n\tpain
 t: paint,\n\tpaint_fill: paint_fill,\n\t\"paint_fill-extrusion\": {\n\t\"fill-extrusion-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\tdoc: \"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha 
 component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"fill-extrusion-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negatives
  indicate left and up (on the flat plane), respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The fill extrusion is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The fill extrusion is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `fill-extrusion-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"fill-extrusion-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: 
 \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\tmacos: \"0.11.0\",\n\t\t\t\tios: \"4.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-typ
 e\": \"cross-faded-data-driven\"\n\t},\n\t\"fill-extrusion-height\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"meters\",\n\t\tdoc: \"The height with which to extrude this layer.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-base\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"meters\",\n\t\tdoc: \"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-h
 eight`.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"fill-extrusion-height\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-vertical-gradient\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\tdoc: \"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.\",\n\t\ttransition: false,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.50.0\",\n\t\t\t\tios: \"4.7.0\",\n\t
 \t\t\tmacos: \"0.13.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n},\n\tpaint_line: paint_line,\n\tpaint_circle: paint_circle,\n\tpaint_heatmap: paint_heatmap,\n\tpaint_symbol: paint_symbol,\n\tpaint_raster: paint_raster,\n\tpaint_hillshade: paint_hillshade,\n\tpaint_background: paint_background,\n\ttransition: transition,\n\t\"property-type\": {\n\t\"data-driven\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is interpolable and can be represented using a property expression.\"\n\t},\n\t\"cross-faded\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms.\"\n\t},\n\t\"cross-faded-data-driven\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zo
 oms. It can be represented using a property expression.\"\n\t},\n\t\"color-ramp\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation.\"\n\t},\n\t\"data-constant\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is interpolable but cannot be represented using a property expression.\"\n\t},\n\tconstant: {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is constant across all zoom levels and property values.\"\n\t}\n},\n\tpromoteId: promoteId\n};\n\n// Note: This regex matches even invalid JSON strings, but since we’re\n// working on the output of `JSON.stringify` we know that only valid strings\n// are present (unless the user supplied a weird `options.indent` but in\n// that case we don’t care since the output would be invalid anyway).\nvar stringOrChar = /(\"(?:[^\\\\\"]|\\\\.)*\")|[:,]/g;\n\nvar jsonStringifyPrettyCompact = function stringify(passedObj, 
 options) {\n  var indent, maxLength, replacer;\n\n  options = options || {};\n  indent = JSON.stringify(\n    [1],\n    undefined,\n    options.indent === undefined ? 2 : options.indent\n  ).slice(2, -3);\n  maxLength =\n    indent === \"\"\n      ? Infinity\n      : options.maxLength === undefined\n      ? 80\n      : options.maxLength;\n  replacer = options.replacer;\n\n  return (function _stringify(obj, currentIndent, reserved) {\n    // prettier-ignore\n    var end, index, items, key, keyPart, keys, length, nextIndent, prettified, start, string, value;\n\n    if (obj && typeof obj.toJSON === \"function\") {\n      obj = obj.toJSON();\n    }\n\n    string = JSON.stringify(obj, replacer);\n\n    if (string === undefined) {\n      return string;\n    }\n\n    length = maxLength - currentIndent.length - reserved;\n\n    if (string.length <= length) {\n      prettified = string.replace(stringOrChar, function(match, stringLiteral) {\n        return stringLiteral || match + \" \";\n   
    });\n      if (prettified.length <= length) {\n        return prettified;\n      }\n    }\n\n    if (replacer != null) {\n      obj = JSON.parse(string);\n      replacer = undefined;\n    }\n\n    if (typeof obj === \"object\" && obj !== null) {\n      nextIndent = currentIndent + indent;\n      items = [];\n      index = 0;\n\n      if (Array.isArray(obj)) {\n        start = \"[\";\n        end = \"]\";\n        length = obj.length;\n        for (; index < length; index++) {\n          items.push(\n            _stringify(obj[index], nextIndent, index === length - 1 ? 0 : 1) ||\n              \"null\"\n          );\n        }\n      } else {\n        start = \"{\";\n        end = \"}\";\n        keys = Object.keys(obj);\n        length = keys.length;\n        for (; index < length; index++) {\n          key = keys[index];\n          keyPart = JSON.stringify(key) + \": \";\n          value = _stringify(\n            obj[key],\n            nextIndent,\n            keyPart.length + 
 (index === length - 1 ? 0 : 1)\n          );\n          if (value !== undefined) {\n            items.push(keyPart + value);\n          }\n        }\n      }\n\n      if (items.length > 0) {\n        return [start, indent + items.join(\",\\n\" + nextIndent), end].join(\n          \"\\n\" + currentIndent\n        );\n      }\n    }\n\n    return string;\n  })(passedObj, \"\", 0);\n};\n\nfunction sortKeysBy(obj, reference) {\n    var result = {};\n    for (var key in reference) {\n        if (obj[key] !== undefined) {\n            result[key] = obj[key];\n        }\n    }\n    for (var key$1 in obj) {\n        if (result[key$1] === undefined) {\n            result[key$1] = obj[key$1];\n        }\n    }\n    return result;\n}\nfunction format(style, space) {\n    if (space === void 0)\n        space = 2;\n    style = sortKeysBy(style, v8.$root);\n    if (style.layers) {\n        style.layers = style.layers.map(function (layer) {\n            return sortKeysBy(layer, v8.layer);\n       
  });\n    }\n    return jsonStringifyPrettyCompact(style, { indent: space });\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar punycode = createCommonjsModule(function (module, exports) {\n(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports =  exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule =  module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n
 \t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\
 n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @
 param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pa
 ir of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t    counter = 0,\n\t\t    length = string.length,\n\t\t    value,\n\t\t    extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append t
 his code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @p
 rivate\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavio
 r is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t//  0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @ret
 urns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t    inputLength = input.length,\n\t\t    out,\n\t\t    i = 0,\n\t\t    n = initialN,\n\t\t    bias = initialBias,\n\t\t    basic,\n\t\t    j,\n\t\t    index,\n\t\t    oldi,\n\t\t    w,\n\t\t    k,\n\t\t    digit,\n\t\t    t,\n\t\t    /** Cached calculation results */\n\t\t    baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delim
 iter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tba
 seMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t    delta,\n\t\t    handledCPCount,\n\t\t 
    basicLength,\n\t\t    bias,\n\t\t    j,\n\t\t    m,\n\t\t    q,\n\t\t    k,\n\t\t    t,\n\t\t    currentValue,\n\t\t    output = [],\n\t\t    /** `inputLength` will hold the number of code points in `input`. */\n\t\t    inputLength,\n\t\t    /** Cached calculation results */\n\t\t    handledCPCountPlusOne,\n\t\t    baseMinusT,\n\t\t    qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t
 // Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('ov
 erflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punyco
 ded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode represe
 ntation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode
 \n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(commonjsGlobal));\n});\n\nvar util = {\n  isString: function(arg) {\n    return typeof(arg) === 'string';\n  },\n  isObject: function(arg) {\n    return typeof(arg) === 'object' && arg !== null;\n  },\n  isNull: function(arg) {\n    return arg === null;\n  },\n  isNullOrUndefined: function(arg) {\n    return arg == null;\n  }\n};\n\n// Copyright Joyent, Inc. and other Node contributors.\n\n// If obj.hasOwnProperty has been overridden, then callin
 g\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar decode = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n  var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  // maxKeys <= 0 means that we should not limit keys count\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURI
 Component(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (Array.isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n\n// Copyright Joyent, Inc. and other Node contributors.\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nvar encode = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return Object.keys(obj).map(function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (Array.isArray(obj[k])) {\n        return obj[k].map(function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n
         }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).join(sep);\n\n  }\n\n  if (!name) { return ''; }\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar querystring = createCommonjsModule(function (module, exports) {\n\nexports.decode = exports.parse = decode;\nexports.encode = exports.stringify = encode;\n});\nvar querystring_1 = querystring.decode;\nvar querystring_2 = querystring.parse;\nvar querystring_3 = querystring.encode;\nvar querystring_4 = querystring.stringify;\n\nvar parse = urlParse;\nvar resolve = urlResolve;\nvar resolveObject = urlResolveObject;\nvar format$1 = urlFormat;\n\nvar Url_1 = Url;\n\nfunction Url() {\n  this.protocol = null;\n  this.slashes = null;\n  this.auth = null;\n  this.host = null;\n  this.port = null;\n  this.hostname = null;\n  this.hash = null;\n  this.search = null;\n  this.query = null;\n  this.pa
 thname = null;\n  this.path = null;\n  this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n    portPattern = /:[0-9]*$/,\n\n    // Special case for a simple path URL\n    simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n    // RFC 2396: characters reserved for delimiting URLs.\n    // We actually just auto-escape these.\n    delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n    // RFC 2396: characters not allowed for various reasons.\n    unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n    // Allowed by RFCs, but cause of XSS attacks.  Always escape these.\n    autoEscape = ['\\''].concat(unwise),\n    // Characters that are never ever allowed in a hostname.\n    // Note that any invalid chars are also handled, but these\n    // are the ones that are *expected* to be seen, so we fa
 st-path\n    // them.\n    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n    hostEndingChars = ['/', '?', '#'],\n    hostnameMaxLen = 255,\n    hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n    hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n    // protocols that can allow \"unsafe\" and \"unwise\" chars.\n    unsafeProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that never have a hostname.\n    hostlessProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that always contain a // bit.\n    slashedProtocol = {\n      'http': true,\n      'https': true,\n      'ftp': true,\n      'gopher': true,\n      'file': true,\n      'http:': true,\n      'https:': true,\n      'ftp:': true,\n      'gopher:': true,\n      'file:': true\n    };\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n  if (url && util.isObject(url) && url instanceof Url) { return url; }\n\n  var u
  = new Url;\n  u.parse(url, parseQueryString, slashesDenoteHost);\n  return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n  if (!util.isString(url)) {\n    throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n  }\n\n  // Copy chrome, IE, opera backslash-handling behavior.\n  // Back slashes before the query string get converted to forward slashes\n  // See: https://code.google.com/p/chromium/issues/detail?id=25916\n  var queryIndex = url.indexOf('?'),\n      splitter =\n          (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n      uSplit = url.split(splitter),\n      slashRegex = /\\\\/g;\n  uSplit[0] = uSplit[0].replace(slashRegex, '/');\n  url = uSplit.join(splitter);\n\n  var rest = url;\n\n  // trim before proceeding.\n  // This is to support parse stuff like \"  http://foo.com  \\n\"\n  rest = rest.trim();\n\n  if (!slashesDenoteHost && url.split('#').length === 1) {\n    // Try fast path rege
 xp\n    var simplePath = simplePathPattern.exec(rest);\n    if (simplePath) {\n      this.path = rest;\n      this.href = rest;\n      this.pathname = simplePath[1];\n      if (simplePath[2]) {\n        this.search = simplePath[2];\n        if (parseQueryString) {\n          this.query = querystring.parse(this.search.substr(1));\n        } else {\n          this.query = this.search.substr(1);\n        }\n      } else if (parseQueryString) {\n        this.search = '';\n        this.query = {};\n      }\n      return this;\n    }\n  }\n\n  var proto = protocolPattern.exec(rest);\n  if (proto) {\n    proto = proto[0];\n    var lowerProto = proto.toLowerCase();\n    this.protocol = lowerProto;\n    rest = rest.substr(proto.length);\n  }\n\n  // figure out if it's got a host\n  // user at server is *always* interpreted as a hostname, and url\n  // resolution will treat //foo/bar as host=foo,path=bar because that's\n  // how the browser resolves relative URLs.\n  if (slashesDenoteHost || pro
 to || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n    var slashes = rest.substr(0, 2) === '//';\n    if (slashes && !(proto && hostlessProtocol[proto])) {\n      rest = rest.substr(2);\n      this.slashes = true;\n    }\n  }\n\n  if (!hostlessProtocol[proto] &&\n      (slashes || (proto && !slashedProtocol[proto]))) {\n\n    // there's a hostname.\n    // the first instance of /, ?, ;, or # ends the host.\n    //\n    // If there is an @ in the hostname, then non-host chars *are* allowed\n    // to the left of the last @ sign, unless some host-ending character\n    // comes *before* the @-sign.\n    // URLs are obnoxious.\n    //\n    // ex:\n    // http://a@b@c/ => user:a at b host:c\n    // http://a@b?@c => user:a host:c path:/?@c\n\n    // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n    // Review our test case against browsers more comprehensively.\n\n    // find the first instance of any hostEndingChars\n    var hostEnd = -1;\n    for (var i = 0; i < hostEndingCha
 rs.length; i++) {\n      var hec = rest.indexOf(hostEndingChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        { hostEnd = hec; }\n    }\n\n    // at this point, either we have an explicit point where the\n    // auth portion cannot go past, or the last @ char is the decider.\n    var auth, atSign;\n    if (hostEnd === -1) {\n      // atSign can be anywhere.\n      atSign = rest.lastIndexOf('@');\n    } else {\n      // atSign must be in auth portion.\n      // http://a@b/c@d => host:b auth:a path:/c at d\n      atSign = rest.lastIndexOf('@', hostEnd);\n    }\n\n    // Now we have a portion which is definitely the auth.\n    // Pull that off.\n    if (atSign !== -1) {\n      auth = rest.slice(0, atSign);\n      rest = rest.slice(atSign + 1);\n      this.auth = decodeURIComponent(auth);\n    }\n\n    // the host is the remaining to the left of the first non-host char\n    hostEnd = -1;\n    for (var i = 0; i < nonHostChars.length; i++) {\n      var hec = rest.
 indexOf(nonHostChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        { hostEnd = hec; }\n    }\n    // if we still have not hit it, then the entire thing is a host.\n    if (hostEnd === -1)\n      { hostEnd = rest.length; }\n\n    this.host = rest.slice(0, hostEnd);\n    rest = rest.slice(hostEnd);\n\n    // pull out port.\n    this.parseHost();\n\n    // we've indicated that there is a hostname,\n    // so even if it's empty, it has to be present.\n    this.hostname = this.hostname || '';\n\n    // if hostname begins with [ and ends with ]\n    // assume that it's an IPv6 address.\n    var ipv6Hostname = this.hostname[0] === '[' &&\n        this.hostname[this.hostname.length - 1] === ']';\n\n    // validate a little.\n    if (!ipv6Hostname) {\n      var hostparts = this.hostname.split(/\\./);\n      for (var i = 0, l = hostparts.length; i < l; i++) {\n        var part = hostparts[i];\n        if (!part) { continue; }\n        if (!part.match(hostnamePartPa
 ttern)) {\n          var newpart = '';\n          for (var j = 0, k = part.length; j < k; j++) {\n            if (part.charCodeAt(j) > 127) {\n              // we replace non-ASCII char with a temporary placeholder\n              // we need this to make sure size of hostname is not\n              // broken by replacing non-ASCII by nothing\n              newpart += 'x';\n            } else {\n              newpart += part[j];\n            }\n          }\n          // we test again with ASCII char only\n          if (!newpart.match(hostnamePartPattern)) {\n            var validParts = hostparts.slice(0, i);\n            var notHost = hostparts.slice(i + 1);\n            var bit = part.match(hostnamePartStart);\n            if (bit) {\n              validParts.push(bit[1]);\n              notHost.unshift(bit[2]);\n            }\n            if (notHost.length) {\n              rest = '/' + notHost.join('.') + rest;\n            }\n            this.hostname = validParts.join('.');\n   
          break;\n          }\n        }\n      }\n    }\n\n    if (this.hostname.length > hostnameMaxLen) {\n      this.hostname = '';\n    } else {\n      // hostnames are always lower case.\n      this.hostname = this.hostname.toLowerCase();\n    }\n\n    if (!ipv6Hostname) {\n      // IDNA Support: Returns a punycoded representation of \"domain\".\n      // It only converts parts of the domain name that\n      // have non-ASCII characters, i.e. it doesn't matter if\n      // you call it with a domain that already is ASCII-only.\n      this.hostname = punycode.toASCII(this.hostname);\n    }\n\n    var p = this.port ? ':' + this.port : '';\n    var h = this.hostname || '';\n    this.host = h + p;\n    this.href += this.host;\n\n    // strip [ and ] from the hostname\n    // the host field still retains them, though\n    if (ipv6Hostname) {\n      this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n      if (rest[0] !== '/') {\n        rest = '/' + rest;\n      }\n  
   }\n  }\n\n  // now rest is set to the post-host stuff.\n  // chop off any delim chars.\n  if (!unsafeProtocol[lowerProto]) {\n\n    // First, make 100% sure that any \"autoEscape\" chars get\n    // escaped, even if encodeURIComponent doesn't think they\n    // need to be.\n    for (var i = 0, l = autoEscape.length; i < l; i++) {\n      var ae = autoEscape[i];\n      if (rest.indexOf(ae) === -1)\n        { continue; }\n      var esc = encodeURIComponent(ae);\n      if (esc === ae) {\n        esc = escape(ae);\n      }\n      rest = rest.split(ae).join(esc);\n    }\n  }\n\n\n  // chop off from the tail first.\n  var hash = rest.indexOf('#');\n  if (hash !== -1) {\n    // got a fragment string.\n    this.hash = rest.substr(hash);\n    rest = rest.slice(0, hash);\n  }\n  var qm = rest.indexOf('?');\n  if (qm !== -1) {\n    this.search = rest.substr(qm);\n    this.query = rest.substr(qm + 1);\n    if (parseQueryString) {\n      this.query = querystring.parse(this.query);\n    }\n    r
 est = rest.slice(0, qm);\n  } else if (parseQueryString) {\n    // no query string, but parseQueryString still requested\n    this.search = '';\n    this.query = {};\n  }\n  if (rest) { this.pathname = rest; }\n  if (slashedProtocol[lowerProto] &&\n      this.hostname && !this.pathname) {\n    this.pathname = '/';\n  }\n\n  //to support http.request\n  if (this.pathname || this.search) {\n    var p = this.pathname || '';\n    var s = this.search || '';\n    this.path = p + s;\n  }\n\n  // finally, reconstruct the href based on what has been validated.\n  this.href = this.format();\n  return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n  // ensure it's an object, and not a string url.\n  // If it's an obj, this is a no-op.\n  // this way, you can call url_format() on strings\n  // to clean up potentially wonky urls.\n  if (util.isString(obj)) { obj = urlParse(obj); }\n  if (!(obj instanceof Url)) { return Url.prototype.format.call(obj); }\n  re
 turn obj.format();\n}\n\nUrl.prototype.format = function() {\n  var auth = this.auth || '';\n  if (auth) {\n    auth = encodeURIComponent(auth);\n    auth = auth.replace(/%3A/i, ':');\n    auth += '@';\n  }\n\n  var protocol = this.protocol || '',\n      pathname = this.pathname || '',\n      hash = this.hash || '',\n      host = false,\n      query = '';\n\n  if (this.host) {\n    host = auth + this.host;\n  } else if (this.hostname) {\n    host = auth + (this.hostname.indexOf(':') === -1 ?\n        this.hostname :\n        '[' + this.hostname + ']');\n    if (this.port) {\n      host += ':' + this.port;\n    }\n  }\n\n  if (this.query &&\n      util.isObject(this.query) &&\n      Object.keys(this.query).length) {\n    query = querystring.stringify(this.query);\n  }\n\n  var search = this.search || (query && ('?' + query)) || '';\n\n  if (protocol && protocol.substr(-1) !== ':') { protocol += ':'; }\n\n  // only the slashedProtocols get the //.  Not mailto:, xmpp:, etc.\n  // unles
 s they had them to begin with.\n  if (this.slashes ||\n      (!protocol || slashedProtocol[protocol]) && host !== false) {\n    host = '//' + (host || '');\n    if (pathname && pathname.charAt(0) !== '/') { pathname = '/' + pathname; }\n  } else if (!host) {\n    host = '';\n  }\n\n  if (hash && hash.charAt(0) !== '#') { hash = '#' + hash; }\n  if (search && search.charAt(0) !== '?') { search = '?' + search; }\n\n  pathname = pathname.replace(/[?#]/g, function(match) {\n    return encodeURIComponent(match);\n  });\n  search = search.replace('#', '%23');\n\n  return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n  return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n  return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n  if (!source) { return relative; }\n  return urlParse(source, false, true).resolveObject(relative
 );\n}\n\nUrl.prototype.resolveObject = function(relative) {\n  if (util.isString(relative)) {\n    var rel = new Url();\n    rel.parse(relative, false, true);\n    relative = rel;\n  }\n\n  var result = new Url();\n  var tkeys = Object.keys(this);\n  for (var tk = 0; tk < tkeys.length; tk++) {\n    var tkey = tkeys[tk];\n    result[tkey] = this[tkey];\n  }\n\n  // hash is always overridden, no matter what.\n  // even href=\"\" will remove it.\n  result.hash = relative.hash;\n\n  // if the relative url is empty, then there's nothing left to do here.\n  if (relative.href === '') {\n    result.href = result.format();\n    return result;\n  }\n\n  // hrefs like //foo/bar always cut to the protocol.\n  if (relative.slashes && !relative.protocol) {\n    // take everything except the protocol from relative\n    var rkeys = Object.keys(relative);\n    for (var rk = 0; rk < rkeys.length; rk++) {\n      var rkey = rkeys[rk];\n      if (rkey !== 'protocol')\n        { result[rkey] = relative[r
 key]; }\n    }\n\n    //urlParse appends trailing / to urls like http://www.example.com\n    if (slashedProtocol[result.protocol] &&\n        result.hostname && !result.pathname) {\n      result.path = result.pathname = '/';\n    }\n\n    result.href = result.format();\n    return result;\n  }\n\n  if (relative.protocol && relative.protocol !== result.protocol) {\n    // if it's a known url protocol, then changing\n    // the protocol does weird things\n    // first, if it's not file:, then we MUST have a host,\n    // and if there was a path\n    // to begin with, then we MUST have a path.\n    // if it is file:, then the host is dropped,\n    // because that's known to be hostless.\n    // anything else is assumed to be absolute.\n    if (!slashedProtocol[relative.protocol]) {\n      var keys = Object.keys(relative);\n      for (var v = 0; v < keys.length; v++) {\n        var k = keys[v];\n        result[k] = relative[k];\n      }\n      result.href = result.format();\n      retur
 n result;\n    }\n\n    result.protocol = relative.protocol;\n    if (!relative.host && !hostlessProtocol[relative.protocol]) {\n      var relPath = (relative.pathname || '').split('/');\n      while (relPath.length && !(relative.host = relPath.shift())){ }\n      if (!relative.host) { relative.host = ''; }\n      if (!relative.hostname) { relative.hostname = ''; }\n      if (relPath[0] !== '') { relPath.unshift(''); }\n      if (relPath.length < 2) { relPath.unshift(''); }\n      result.pathname = relPath.join('/');\n    } else {\n      result.pathname = relative.pathname;\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    result.host = relative.host || '';\n    result.auth = relative.auth;\n    result.hostname = relative.hostname || relative.host;\n    result.port = relative.port;\n    // to support http.request\n    if (result.pathname || result.search) {\n      var p = result.pathname || '';\n      var s = result.search || '';\n      result.pat
 h = p + s;\n    }\n    result.slashes = result.slashes || relative.slashes;\n    result.href = result.format();\n    return result;\n  }\n\n  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n      isRelAbs = (\n          relative.host ||\n          relative.pathname && relative.pathname.charAt(0) === '/'\n      ),\n      mustEndAbs = (isRelAbs || isSourceAbs ||\n                    (result.host && relative.pathname)),\n      removeAllDots = mustEndAbs,\n      srcPath = result.pathname && result.pathname.split('/') || [],\n      relPath = relative.pathname && relative.pathname.split('/') || [],\n      psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n  // if the url is a non-slashed url, then relative\n  // links like ../.. should be able\n  // to crawl up to the hostname, as well.  This is strange.\n  // result.protocol has already been set by now.\n  // Later on, put the first path part into the host field.\n  if (psychotic) {\n    resul
 t.hostname = '';\n    result.port = null;\n    if (result.host) {\n      if (srcPath[0] === '') { srcPath[0] = result.host; }\n      else { srcPath.unshift(result.host); }\n    }\n    result.host = '';\n    if (relative.protocol) {\n      relative.hostname = null;\n      relative.port = null;\n      if (relative.host) {\n        if (relPath[0] === '') { relPath[0] = relative.host; }\n        else { relPath.unshift(relative.host); }\n      }\n      relative.host = null;\n    }\n    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n  }\n\n  if (isRelAbs) {\n    // it's absolute.\n    result.host = (relative.host || relative.host === '') ?\n                  relative.host : result.host;\n    result.hostname = (relative.hostname || relative.hostname === '') ?\n                      relative.hostname : result.hostname;\n    result.search = relative.search;\n    result.query = relative.query;\n    srcPath = relPath;\n    // fall through to the dot-handling below.\n  } 
 else if (relPath.length) {\n    // it's relative\n    // throw away the existing file, and take the new path instead.\n    if (!srcPath) { srcPath = []; }\n    srcPath.pop();\n    srcPath = srcPath.concat(relPath);\n    result.search = relative.search;\n    result.query = relative.query;\n  } else if (!util.isNullOrUndefined(relative.search)) {\n    // just pull out the search.\n    // like href='?foo'.\n    // Put this after the other two cases because it simplifies the booleans\n    if (psychotic) {\n      result.hostname = result.host = srcPath.shift();\n      //occationaly the auth can get stuck only in host\n      //this especially happens in cases like\n      //url.resolveObject('mailto:local1 at domain1', 'local2 at domain2')\n      var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                       result.host.split('@') : false;\n      if (authInHost) {\n        result.auth = authInHost.shift();\n        result.host = result.hostname = authInHost.shift();\n    
   }\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    //to support http.request\n    if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n      result.path = (result.pathname ? result.pathname : '') +\n                    (result.search ? result.search : '');\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  if (!srcPath.length) {\n    // no path at all.  easy.\n    // we've already handled the other stuff above.\n    result.pathname = null;\n    //to support http.request\n    if (result.search) {\n      result.path = '/' + result.search;\n    } else {\n      result.path = null;\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  // if a url ENDs in . or .., then it must get a trailing slash.\n  // however, if it ends in anything else non-slashy,\n  // then it must NOT get a trailing slash.\n  var last = srcPath.slice(-1)[0];\n  var hasTrailingSlash = (\n      (result.host || relative.hos
 t || srcPath.length > 1) &&\n      (last === '.' || last === '..') || last === '');\n\n  // strip single dots, resolve double dots to parent dir\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = srcPath.length; i >= 0; i--) {\n    last = srcPath[i];\n    if (last === '.') {\n      srcPath.splice(i, 1);\n    } else if (last === '..') {\n      srcPath.splice(i, 1);\n      up++;\n    } else if (up) {\n      srcPath.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (!mustEndAbs && !removeAllDots) {\n    for (; up--; up) {\n      srcPath.unshift('..');\n    }\n  }\n\n  if (mustEndAbs && srcPath[0] !== '' &&\n      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n    srcPath.unshift('');\n  }\n\n  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n    srcPath.push('');\n  }\n\n  var isAbsolute = srcPath[0] === '' ||\n      (srcPath[0] && srcPath[0].charAt(0) ===
  '/');\n\n  // put the host back\n  if (psychotic) {\n    result.hostname = result.host = isAbsolute ? '' :\n                                    srcPath.length ? srcPath.shift() : '';\n    //occationaly the auth can get stuck only in host\n    //this especially happens in cases like\n    //url.resolveObject('mailto:local1 at domain1', 'local2 at domain2')\n    var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                     result.host.split('@') : false;\n    if (authInHost) {\n      result.auth = authInHost.shift();\n      result.host = result.hostname = authInHost.shift();\n    }\n  }\n\n  mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n  if (mustEndAbs && !isAbsolute) {\n    srcPath.unshift('');\n  }\n\n  if (!srcPath.length) {\n    result.pathname = null;\n    result.path = null;\n  } else {\n    result.pathname = srcPath.join('/');\n  }\n\n  //to support request.http\n  if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n    result
 .path = (result.pathname ? result.pathname : '') +\n                  (result.search ? result.search : '');\n  }\n  result.auth = relative.auth || result.auth;\n  result.slashes = result.slashes || relative.slashes;\n  result.href = result.format();\n  return result;\n};\n\nUrl.prototype.parseHost = function() {\n  var host = this.host;\n  var port = portPattern.exec(host);\n  if (port) {\n    port = port[0];\n    if (port !== ':') {\n      this.port = port.substr(1);\n    }\n    host = host.substr(0, host.length - port.length);\n  }\n  if (host) { this.hostname = host; }\n};\n\nvar url = {\n\tparse: parse,\n\tresolve: resolve,\n\tresolveObject: resolveObject,\n\tformat: format$1,\n\tUrl: Url_1\n};\n\nfunction getPropertyReference(propertyName) {\n    for (var i = 0; i < v8.layout.length; i++) {\n        for (var key in v8[v8.layout[i]]) {\n            if (key === propertyName) {\n                return v8[v8.layout[i]][key];\n            }\n        }\n    }\n    for (var i$1 = 0; i
 $1 < v8.paint.length; i$1++) {\n        for (var key$1 in v8[v8.paint[i$1]]) {\n            if (key$1 === propertyName) {\n                return v8[v8.paint[i$1]][key$1];\n            }\n        }\n    }\n    return null;\n}\nfunction eachSource(style, callback) {\n    for (var k in style.sources) {\n        callback(style.sources[k]);\n    }\n}\nfunction eachLayer(style, callback) {\n    for (var i = 0, list = style.layers; i < list.length; i += 1) {\n        var layer = list[i];\n        callback(layer);\n    }\n}\nfunction eachProperty(style, options, callback) {\n    function inner(layer, propertyType) {\n        var properties = layer[propertyType];\n        if (!properties) {\n            return;\n        }\n        Object.keys(properties).forEach(function (key) {\n            callback({\n                path: [\n                    layer.id,\n                    propertyType,\n                    key\n                ],\n                key: key,\n                value: prop
 erties[key],\n                reference: getPropertyReference(key),\n                set: function set(x) {\n                    properties[key] = x;\n                }\n            });\n        });\n    }\n    eachLayer(style, function (layer) {\n        if (options.paint) {\n            inner(layer, 'paint');\n        }\n        if (options.layout) {\n            inner(layer, 'layout');\n        }\n    });\n}\n\nfunction eachLayout(layer, callback) {\n    for (var k in layer) {\n        if (k.indexOf('layout') === 0) {\n            callback(layer[k], k);\n        }\n    }\n}\nfunction eachPaint(layer, callback) {\n    for (var k in layer) {\n        if (k.indexOf('paint') === 0) {\n            callback(layer[k], k);\n        }\n    }\n}\nfunction resolveConstant(style, value) {\n    if (typeof value === 'string' && value[0] === '@') {\n        return resolveConstant(style, style.constants[value]);\n    } else {\n        return value;\n    }\n}\nfunction isFunction(value) {\n    re
 turn Array.isArray(value.stops);\n}\nfunction renameProperty(obj, from, to) {\n    obj[to] = obj[from];\n    delete obj[from];\n}\nfunction migrateToV8 (style) {\n    style.version = 8;\n    eachSource(style, function (source) {\n        if (source.type === 'video' && source.url !== undefined) {\n            renameProperty(source, 'url', 'urls');\n        }\n        if (source.type === 'video') {\n            source.coordinates.forEach(function (coord) {\n                return coord.reverse();\n            });\n        }\n    });\n    eachLayer(style, function (layer) {\n        eachLayout(layer, function (layout) {\n            if (layout['symbol-min-distance'] !== undefined) {\n                renameProperty(layout, 'symbol-min-distance', 'symbol-spacing');\n            }\n        });\n        eachPaint(layer, function (paint) {\n            if (paint['background-image'] !== undefined) {\n                renameProperty(paint, 'background-image', 'background-pattern');\n          
   }\n            if (paint['line-image'] !== undefined) {\n                renameProperty(paint, 'line-image', 'line-pattern');\n            }\n            if (paint['fill-image'] !== undefined) {\n                renameProperty(paint, 'fill-image', 'fill-pattern');\n            }\n        });\n    });\n    eachProperty(style, {\n        paint: true,\n        layout: true\n    }, function (property) {\n        var value = resolveConstant(style, property.value);\n        if (isFunction(value)) {\n            value.stops.forEach(function (stop) {\n                stop[1] = resolveConstant(style, stop[1]);\n            });\n        }\n        property.set(value);\n    });\n    delete style.constants;\n    eachLayer(style, function (layer) {\n        eachLayout(layer, function (layout) {\n            delete layout['text-max-size'];\n            delete layout['icon-max-size'];\n        });\n        eachPaint(layer, function (paint) {\n            if (paint['text-size']) {\n              
   if (!layer.layout) {\n                    layer.layout = {};\n                }\n                layer.layout['text-size'] = paint['text-size'];\n                delete paint['text-size'];\n            }\n            if (paint['icon-size']) {\n                if (!layer.layout) {\n                    layer.layout = {};\n                }\n                layer.layout['icon-size'] = paint['icon-size'];\n                delete paint['icon-size'];\n            }\n        });\n    });\n    function migrateFontstackURL(input) {\n        var inputParsed = url.parse(input);\n        var inputPathnameParts = inputParsed.pathname.split('/');\n        if (inputParsed.protocol !== 'mapbox:') {\n            return input;\n        } else if (inputParsed.hostname === 'fontstack') {\n            return 'mapbox://fonts/mapbox/{fontstack}/{range}.pbf';\n        } else if (inputParsed.hostname === 'fonts') {\n            return 'mapbox://fonts/' + inputPathnameParts[2] + '/{fontstack}/{range}.pbf';
 \n        }\n    }\n    if (style.glyphs) {\n        style.glyphs = migrateFontstackURL(style.glyphs);\n    }\n    function migrateFontStack(font) {\n        function splitAndTrim(string) {\n            return string.split(',').map(function (s) {\n                return s.trim();\n            });\n        }\n        if (Array.isArray(font)) {\n            return font;\n        } else if (typeof font === 'string') {\n            return splitAndTrim(font);\n        } else if (typeof font === 'object') {\n            font.stops.forEach(function (stop) {\n                stop[1] = splitAndTrim(stop[1]);\n            });\n            return font;\n        } else {\n            throw new Error('unexpected font value');\n        }\n    }\n    eachLayer(style, function (layer) {\n        eachLayout(layer, function (layout) {\n            if (layout['text-font']) {\n                layout['text-font'] = migrateFontStack(layout['text-font']);\n            }\n        });\n    });\n    var firs
 tSymbolLayer = 0;\n    for (var i = style.layers.length - 1; i >= 0; i--) {\n        var layer = style.layers[i];\n        if (layer.type !== 'symbol') {\n            firstSymbolLayer = i + 1;\n            break;\n        }\n    }\n    var symbolLayers = style.layers.splice(firstSymbolLayer);\n    symbolLayers.reverse();\n    style.layers = style.layers.concat(symbolLayers);\n    return style;\n}\n\nfunction extend (output) {\n    var inputs = [], len = arguments.length - 1;\n    while (len-- > 0)\n        inputs[len] = arguments[len + 1];\n    for (var i = 0, list = inputs; i < list.length; i += 1) {\n        var input = list[i];\n        for (var k in input) {\n            output[k] = input[k];\n        }\n    }\n    return output;\n}\n\nvar ParsingError = function (Error) {\n    function ParsingError(key, message) {\n        Error.call(this, message);\n        this.message = message;\n        this.key = key;\n    }\n    if (Error)\n        ParsingError.__proto__ = Error;\n    Par
 singError.prototype = Object.create(Error && Error.prototype);\n    ParsingError.prototype.constructor = ParsingError;\n    return ParsingError;\n}(Error);\n\nvar Scope = function Scope(parent, bindings) {\n    if (bindings === void 0)\n        bindings = [];\n    this.parent = parent;\n    this.bindings = {};\n    for (var i = 0, list = bindings; i < list.length; i += 1) {\n        var ref = list[i];\n        var name = ref[0];\n        var expression = ref[1];\n        this.bindings[name] = expression;\n    }\n};\nScope.prototype.concat = function concat(bindings) {\n    return new Scope(this, bindings);\n};\nScope.prototype.get = function get(name) {\n    if (this.bindings[name]) {\n        return this.bindings[name];\n    }\n    if (this.parent) {\n        return this.parent.get(name);\n    }\n    throw new Error(name + ' not found in scope.');\n};\nScope.prototype.has = function has(name) {\n    if (this.bindings[name]) {\n        return true;\n    }\n    return this.parent ? t
 his.parent.has(name) : false;\n};\n\nvar NullType = { kind: 'null' };\nvar NumberType = { kind: 'number' };\nvar StringType = { kind: 'string' };\nvar BooleanType = { kind: 'boolean' };\nvar ColorType = { kind: 'color' };\nvar ObjectType = { kind: 'object' };\nvar ValueType = { kind: 'value' };\nvar ErrorType = { kind: 'error' };\nvar CollatorType = { kind: 'collator' };\nvar FormattedType = { kind: 'formatted' };\nvar ResolvedImageType = { kind: 'resolvedImage' };\nfunction array(itemType, N) {\n    return {\n        kind: 'array',\n        itemType: itemType,\n        N: N\n    };\n}\nfunction toString(type) {\n    if (type.kind === 'array') {\n        var itemType = toString(type.itemType);\n        return typeof type.N === 'number' ? 'array<' + itemType + ', ' + type.N + '>' : type.itemType.kind === 'value' ? 'array' : 'array<' + itemType + '>';\n    } else {\n        return type.kind;\n    }\n}\nvar valueMemberTypes = [\n    NullType,\n    NumberType,\n    StringType,\n    Bool
 eanType,\n    ColorType,\n    FormattedType,\n    ObjectType,\n    array(ValueType),\n    ResolvedImageType\n];\nfunction checkSubtype(expected, t) {\n    if (t.kind === 'error') {\n        return null;\n    } else if (expected.kind === 'array') {\n        if (t.kind === 'array' && (t.N === 0 && t.itemType.kind === 'value' || !checkSubtype(expected.itemType, t.itemType)) && (typeof expected.N !== 'number' || expected.N === t.N)) {\n            return null;\n        }\n    } else if (expected.kind === t.kind) {\n        return null;\n    } else if (expected.kind === 'value') {\n        for (var i = 0, list = valueMemberTypes; i < list.length; i += 1) {\n            var memberType = list[i];\n            if (!checkSubtype(memberType, t)) {\n                return null;\n            }\n        }\n    }\n    return 'Expected ' + toString(expected) + ' but found ' + toString(t) + ' instead.';\n}\nfunction isValidType(provided, allowedTypes) {\n    return allowedTypes.some(function (t) {\
 n        return t.kind === provided.kind;\n    });\n}\nfunction isValidNativeType(provided, allowedTypes) {\n    return allowedTypes.some(function (t) {\n        if (t === 'null') {\n            return provided === null;\n        } else if (t === 'array') {\n            return Array.isArray(provided);\n        } else if (t === 'object') {\n            return provided && !Array.isArray(provided) && typeof provided === 'object';\n        } else {\n            return t === typeof provided;\n        }\n    });\n}\n\nvar csscolorparser = createCommonjsModule(function (module, exports) {\n// (c) Dean McNamee <dean at gmail.com>, 2012.\n//\n// https://github.com/deanm/css-color-parser-js\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublic
 ense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n\n// http://www.w3.org/TR/css3-color/\nvar kCSSColorTable = {\n  \"transparent\": [0,0,0,0], \"aliceblue\": [240,248,255,1],\n  \"antiquewhite\": [250,235,215,1], \"aqua\": [0,255,255,1],\n  \"aquamarine\": [1
 27,255,212,1], \"azure\": [240,255,255,1],\n  \"beige\": [245,245,220,1], \"bisque\": [255,228,196,1],\n  \"black\": [0,0,0,1], \"blanchedalmond\": [255,235,205,1],\n  \"blue\": [0,0,255,1], \"blueviolet\": [138,43,226,1],\n  \"brown\": [165,42,42,1], \"burlywood\": [222,184,135,1],\n  \"cadetblue\": [95,158,160,1], \"chartreuse\": [127,255,0,1],\n  \"chocolate\": [210,105,30,1], \"coral\": [255,127,80,1],\n  \"cornflowerblue\": [100,149,237,1], \"cornsilk\": [255,248,220,1],\n  \"crimson\": [220,20,60,1], \"cyan\": [0,255,255,1],\n  \"darkblue\": [0,0,139,1], \"darkcyan\": [0,139,139,1],\n  \"darkgoldenrod\": [184,134,11,1], \"darkgray\": [169,169,169,1],\n  \"darkgreen\": [0,100,0,1], \"darkgrey\": [169,169,169,1],\n  \"darkkhaki\": [189,183,107,1], \"darkmagenta\": [139,0,139,1],\n  \"darkolivegreen\": [85,107,47,1], \"darkorange\": [255,140,0,1],\n  \"darkorchid\": [153,50,204,1], \"darkred\": [139,0,0,1],\n  \"darksalmon\": [233,150,122,1], \"darkseagreen\": [143,188,143,1],\n 
  \"darkslateblue\": [72,61,139,1], \"darkslategray\": [47,79,79,1],\n  \"darkslategrey\": [47,79,79,1], \"darkturquoise\": [0,206,209,1],\n  \"darkviolet\": [148,0,211,1], \"deeppink\": [255,20,147,1],\n  \"deepskyblue\": [0,191,255,1], \"dimgray\": [105,105,105,1],\n  \"dimgrey\": [105,105,105,1], \"dodgerblue\": [30,144,255,1],\n  \"firebrick\": [178,34,34,1], \"floralwhite\": [255,250,240,1],\n  \"forestgreen\": [34,139,34,1], \"fuchsia\": [255,0,255,1],\n  \"gainsboro\": [220,220,220,1], \"ghostwhite\": [248,248,255,1],\n  \"gold\": [255,215,0,1], \"goldenrod\": [218,165,32,1],\n  \"gray\": [128,128,128,1], \"green\": [0,128,0,1],\n  \"greenyellow\": [173,255,47,1], \"grey\": [128,128,128,1],\n  \"honeydew\": [240,255,240,1], \"hotpink\": [255,105,180,1],\n  \"indianred\": [205,92,92,1], \"indigo\": [75,0,130,1],\n  \"ivory\": [255,255,240,1], \"khaki\": [240,230,140,1],\n  \"lavender\": [230,230,250,1], \"lavenderblush\": [255,240,245,1],\n  \"lawngreen\": [124,252,0,1], \"lemo
 nchiffon\": [255,250,205,1],\n  \"lightblue\": [173,216,230,1], \"lightcoral\": [240,128,128,1],\n  \"lightcyan\": [224,255,255,1], \"lightgoldenrodyellow\": [250,250,210,1],\n  \"lightgray\": [211,211,211,1], \"lightgreen\": [144,238,144,1],\n  \"lightgrey\": [211,211,211,1], \"lightpink\": [255,182,193,1],\n  \"lightsalmon\": [255,160,122,1], \"lightseagreen\": [32,178,170,1],\n  \"lightskyblue\": [135,206,250,1], \"lightslategray\": [119,136,153,1],\n  \"lightslategrey\": [119,136,153,1], \"lightsteelblue\": [176,196,222,1],\n  \"lightyellow\": [255,255,224,1], \"lime\": [0,255,0,1],\n  \"limegreen\": [50,205,50,1], \"linen\": [250,240,230,1],\n  \"magenta\": [255,0,255,1], \"maroon\": [128,0,0,1],\n  \"mediumaquamarine\": [102,205,170,1], \"mediumblue\": [0,0,205,1],\n  \"mediumorchid\": [186,85,211,1], \"mediumpurple\": [147,112,219,1],\n  \"mediumseagreen\": [60,179,113,1], \"mediumslateblue\": [123,104,238,1],\n  \"mediumspringgreen\": [0,250,154,1], \"mediumturquoise\": [72,
 209,204,1],\n  \"mediumvioletred\": [199,21,133,1], \"midnightblue\": [25,25,112,1],\n  \"mintcream\": [245,255,250,1], \"mistyrose\": [255,228,225,1],\n  \"moccasin\": [255,228,181,1], \"navajowhite\": [255,222,173,1],\n  \"navy\": [0,0,128,1], \"oldlace\": [253,245,230,1],\n  \"olive\": [128,128,0,1], \"olivedrab\": [107,142,35,1],\n  \"orange\": [255,165,0,1], \"orangered\": [255,69,0,1],\n  \"orchid\": [218,112,214,1], \"palegoldenrod\": [238,232,170,1],\n  \"palegreen\": [152,251,152,1], \"paleturquoise\": [175,238,238,1],\n  \"palevioletred\": [219,112,147,1], \"papayawhip\": [255,239,213,1],\n  \"peachpuff\": [255,218,185,1], \"peru\": [205,133,63,1],\n  \"pink\": [255,192,203,1], \"plum\": [221,160,221,1],\n  \"powderblue\": [176,224,230,1], \"purple\": [128,0,128,1],\n  \"rebeccapurple\": [102,51,153,1],\n  \"red\": [255,0,0,1], \"rosybrown\": [188,143,143,1],\n  \"royalblue\": [65,105,225,1], \"saddlebrown\": [139,69,19,1],\n  \"salmon\": [250,128,114,1], \"sandybrown\": [
 244,164,96,1],\n  \"seagreen\": [46,139,87,1], \"seashell\": [255,245,238,1],\n  \"sienna\": [160,82,45,1], \"silver\": [192,192,192,1],\n  \"skyblue\": [135,206,235,1], \"slateblue\": [106,90,205,1],\n  \"slategray\": [112,128,144,1], \"slategrey\": [112,128,144,1],\n  \"snow\": [255,250,250,1], \"springgreen\": [0,255,127,1],\n  \"steelblue\": [70,130,180,1], \"tan\": [210,180,140,1],\n  \"teal\": [0,128,128,1], \"thistle\": [216,191,216,1],\n  \"tomato\": [255,99,71,1], \"turquoise\": [64,224,208,1],\n  \"violet\": [238,130,238,1], \"wheat\": [245,222,179,1],\n  \"white\": [255,255,255,1], \"whitesmoke\": [245,245,245,1],\n  \"yellow\": [255,255,0,1], \"yellowgreen\": [154,205,50,1]};\n\nfunction clamp_css_byte(i) {  // Clamp to integer 0 .. 255.\n  i = Math.round(i);  // Seems to be what Chrome does (vs truncation).\n  return i < 0 ? 0 : i > 255 ? 255 : i;\n}\n\nfunction clamp_css_float(f) {  // Clamp to float 0.0 .. 1.0.\n  return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse
 _css_int(str) {  // int or percentage.\n  if (str[str.length - 1] === '%')\n    { return clamp_css_byte(parseFloat(str) / 100 * 255); }\n  return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) {  // float or percentage.\n  if (str[str.length - 1] === '%')\n    { return clamp_css_float(parseFloat(str) / 100); }\n  return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n  if (h < 0) { h += 1; }\n  else if (h > 1) { h -= 1; }\n\n  if (h * 6 < 1) { return m1 + (m2 - m1) * h * 6; }\n  if (h * 2 < 1) { return m2; }\n  if (h * 3 < 2) { return m1 + (m2 - m1) * (2/3 - h) * 6; }\n  return m1;\n}\n\nfunction parseCSSColor(css_str) {\n  // Remove all whitespace, not compliant, but should just be more accepting.\n  var str = css_str.replace(/ /g, '').toLowerCase();\n\n  // Color keywords (and transparent) lookup.\n  if (str in kCSSColorTable) { return kCSSColorTable[str].slice(); }  // dup.\n\n  // #abc and #abc123 syntax.\n  if (str[0] === '#') {
 \n    if (str.length === 4) {\n      var iv = parseInt(str.substr(1), 16);  // TODO(deanm): Stricter parsing.\n      if (!(iv >= 0 && iv <= 0xfff)) { return null; }  // Covers NaN.\n      return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n              (iv & 0xf0) | ((iv & 0xf0) >> 4),\n              (iv & 0xf) | ((iv & 0xf) << 4),\n              1];\n    } else if (str.length === 7) {\n      var iv = parseInt(str.substr(1), 16);  // TODO(deanm): Stricter parsing.\n      if (!(iv >= 0 && iv <= 0xffffff)) { return null; }  // Covers NaN.\n      return [(iv & 0xff0000) >> 16,\n              (iv & 0xff00) >> 8,\n              iv & 0xff,\n              1];\n    }\n\n    return null;\n  }\n\n  var op = str.indexOf('('), ep = str.indexOf(')');\n  if (op !== -1 && ep + 1 === str.length) {\n    var fname = str.substr(0, op);\n    var params = str.substr(op+1, ep-(op+1)).split(',');\n    var alpha = 1;  // To allow case fallthrough.\n    switch (fname) {\n      case 'rgba':\n        if (par
 ams.length !== 4) { return null; }\n        alpha = parse_css_float(params.pop());\n        // Fall through.\n      case 'rgb':\n        if (params.length !== 3) { return null; }\n        return [parse_css_int(params[0]),\n                parse_css_int(params[1]),\n                parse_css_int(params[2]),\n                alpha];\n      case 'hsla':\n        if (params.length !== 4) { return null; }\n        alpha = parse_css_float(params.pop());\n        // Fall through.\n      case 'hsl':\n        if (params.length !== 3) { return null; }\n        var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360;  // 0 .. 1\n        // NOTE(deanm): According to the CSS spec s/l should only be\n        // percentages, but we don't bother and let float or percentage.\n        var s = parse_css_float(params[1]);\n        var l = parse_css_float(params[2]);\n        var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n        var m1 = l * 2 - m2;\n        return [clamp_css_byte(css_hue_to_rgb
 (m1, m2, h+1/3) * 255),\n                clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n                clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n                alpha];\n      default:\n        return null;\n    }\n  }\n\n  return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor; } catch(e) { }\n});\nvar csscolorparser_1 = csscolorparser.parseCSSColor;\n\nvar Color = function Color(r, g, b, a) {\n    if (a === void 0)\n        a = 1;\n    this.r = r;\n    this.g = g;\n    this.b = b;\n    this.a = a;\n};\nColor.parse = function parse(input) {\n    if (!input) {\n        return undefined;\n    }\n    if (input instanceof Color) {\n        return input;\n    }\n    if (typeof input !== 'string') {\n        return undefined;\n    }\n    var rgba = csscolorparser_1(input);\n    if (!rgba) {\n        return undefined;\n    }\n    return new Color(rgba[0] / 255 * rgba[3], rgba[1] / 255 * rgba[3], rgba[2] / 255 * rgba[3], rgba[3]);\n};\nColor.prototype.toString = fun
 ction toString() {\n    var ref = this.toArray();\n    var r = ref[0];\n    var g = ref[1];\n    var b = ref[2];\n    var a = ref[3];\n    return 'rgba(' + Math.round(r) + ',' + Math.round(g) + ',' + Math.round(b) + ',' + a + ')';\n};\nColor.prototype.toArray = function toArray() {\n    var ref = this;\n    var r = ref.r;\n    var g = ref.g;\n    var b = ref.b;\n    var a = ref.a;\n    return a === 0 ? [\n        0,\n        0,\n        0,\n        0\n    ] : [\n        r * 255 / a,\n        g * 255 / a,\n        b * 255 / a,\n        a\n    ];\n};\nColor.black = new Color(0, 0, 0, 1);\nColor.white = new Color(1, 1, 1, 1);\nColor.transparent = new Color(0, 0, 0, 0);\nColor.red = new Color(1, 0, 0, 1);\n\nvar Collator = function Collator(caseSensitive, diacriticSensitive, locale) {\n    if (caseSensitive) {\n        this.sensitivity = diacriticSensitive ? 'variant' : 'case';\n    } else {\n        this.sensitivity = diacriticSensitive ? 'accent' : 'base';\n    }\n    this.locale = lo
 cale;\n    this.collator = new Intl.Collator(this.locale ? this.locale : [], {\n        sensitivity: this.sensitivity,\n        usage: 'search'\n    });\n};\nCollator.prototype.compare = function compare(lhs, rhs) {\n    return this.collator.compare(lhs, rhs);\n};\nCollator.prototype.resolvedLocale = function resolvedLocale() {\n    return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;\n};\n\nvar FormattedSection = function FormattedSection(text, image, scale, fontStack, textColor) {\n    this.text = text;\n    this.image = image;\n    this.scale = scale;\n    this.fontStack = fontStack;\n    this.textColor = textColor;\n};\nvar Formatted = function Formatted(sections) {\n    this.sections = sections;\n};\nFormatted.fromString = function fromString(unformatted) {\n    return new Formatted([new FormattedSection(unformatted, null, null, null, null)]);\n};\nFormatted.prototype.isEmpty = function isEmpty() {\n    if (this.sections.length === 0) {\n        re
 turn true;\n    }\n    return !this.sections.some(function (section) {\n        return section.text.length !== 0 || section.image && section.image.name.length !== 0;\n    });\n};\nFormatted.factory = function factory(text) {\n    if (text instanceof Formatted) {\n        return text;\n    } else {\n        return Formatted.fromString(text);\n    }\n};\nFormatted.prototype.toString = function toString() {\n    if (this.sections.length === 0) {\n        return '';\n    }\n    return this.sections.map(function (section) {\n        return section.text;\n    }).join('');\n};\nFormatted.prototype.serialize = function serialize() {\n    var serialized = ['format'];\n    for (var i = 0, list = this.sections; i < list.length; i += 1) {\n        var section = list[i];\n        if (section.image) {\n            serialized.push([\n                'image',\n                section.image.name\n            ]);\n            continue;\n        }\n        serialized.push(section.text);\n        var o
 ptions = {};\n        if (section.fontStack) {\n            options['text-font'] = [\n                'literal',\n                section.fontStack.split(',')\n            ];\n        }\n        if (section.scale) {\n            options['font-scale'] = section.scale;\n        }\n        if (section.textColor) {\n            options['text-color'] = ['rgba'].concat(section.textColor.toArray());\n        }\n        serialized.push(options);\n    }\n    return serialized;\n};\n\nvar ResolvedImage = function ResolvedImage(options) {\n    this.name = options.name;\n    this.available = options.available;\n};\nResolvedImage.prototype.toString = function toString() {\n    return this.name;\n};\nResolvedImage.fromString = function fromString(name) {\n    if (!name) {\n        return null;\n    }\n    return new ResolvedImage({\n        name: name,\n        available: false\n    });\n};\nResolvedImage.prototype.serialize = function serialize() {\n    return [\n        'image',\n        this.n
 ame\n    ];\n};\n\nfunction validateRGBA(r, g, b, a) {\n    if (!(typeof r === 'number' && r >= 0 && r <= 255 && typeof g === 'number' && g >= 0 && g <= 255 && typeof b === 'number' && b >= 0 && b <= 255)) {\n        var value = typeof a === 'number' ? [\n            r,\n            g,\n            b,\n            a\n        ] : [\n            r,\n            g,\n            b\n        ];\n        return 'Invalid rgba value [' + value.join(', ') + ']: \\'r\\', \\'g\\', and \\'b\\' must be between 0 and 255.';\n    }\n    if (!(typeof a === 'undefined' || typeof a === 'number' && a >= 0 && a <= 1)) {\n        return 'Invalid rgba value [' + [\n            r,\n            g,\n            b,\n            a\n        ].join(', ') + ']: \\'a\\' must be between 0 and 1.';\n    }\n    return null;\n}\nfunction isValue(mixed) {\n    if (mixed === null) {\n        return true;\n    } else if (typeof mixed === 'string') {\n        return true;\n    } else if (typeof mixed === 'boolean') {\n   
      return true;\n    } else if (typeof mixed === 'number') {\n        return true;\n    } else if (mixed instanceof Color) {\n        return true;\n    } else if (mixed instanceof Collator) {\n        return true;\n    } else if (mixed instanceof Formatted) {\n        return true;\n    } else if (mixed instanceof ResolvedImage) {\n        return true;\n    } else if (Array.isArray(mixed)) {\n        for (var i = 0, list = mixed; i < list.length; i += 1) {\n            var item = list[i];\n            if (!isValue(item)) {\n                return false;\n            }\n        }\n        return true;\n    } else if (typeof mixed === 'object') {\n        for (var key in mixed) {\n            if (!isValue(mixed[key])) {\n                return false;\n            }\n        }\n        return true;\n    } else {\n        return false;\n    }\n}\nfunction typeOf(value) {\n    if (value === null) {\n        return NullType;\n    } else if (typeof value === 'string') {\n        return St
 ringType;\n    } else if (typeof value === 'boolean') {\n        return BooleanType;\n    } else if (typeof value === 'number') {\n        return NumberType;\n    } else if (value instanceof Color) {\n        return ColorType;\n    } else if (value instanceof Collator) {\n        return CollatorType;\n    } else if (value instanceof Formatted) {\n        return FormattedType;\n    } else if (value instanceof ResolvedImage) {\n        return ResolvedImageType;\n    } else if (Array.isArray(value)) {\n        var length = value.length;\n        var itemType;\n        for (var i = 0, list = value; i < list.length; i += 1) {\n            var item = list[i];\n            var t = typeOf(item);\n            if (!itemType) {\n                itemType = t;\n            } else if (itemType === t) {\n                continue;\n            } else {\n                itemType = ValueType;\n                break;\n            }\n        }\n        return array(itemType || ValueType, length);\n    
 } else {\n        return ObjectType;\n    }\n}\nfunction toString$1(value) {\n    var type = typeof value;\n    if (value === null) {\n        return '';\n    } else if (type === 'string' || type === 'number' || type === 'boolean') {\n        return String(value);\n    } else if (value instanceof Color || value instanceof Formatted || value instanceof ResolvedImage) {\n        return value.toString();\n    } else {\n        return JSON.stringify(value);\n    }\n}\n\nvar Literal = function Literal(type, value) {\n    this.type = type;\n    this.value = value;\n};\nLiteral.parse = function parse(args, context) {\n    if (args.length !== 2) {\n        return context.error('\\'literal\\' expression requires exactly one argument, but found ' + (args.length - 1) + ' instead.');\n    }\n    if (!isValue(args[1])) {\n        return context.error('invalid value');\n    }\n    var value = args[1];\n    var type = typeOf(value);\n    var expected = context.expectedType;\n    if (type.kind === 
 'array' && type.N === 0 && expected && expected.kind === 'array' && (typeof expected.N !== 'number' || expected.N === 0)) {\n        type = expected;\n    }\n    return new Literal(type, value);\n};\nLiteral.prototype.evaluate = function evaluate() {\n    return this.value;\n};\nLiteral.prototype.eachChild = function eachChild() {\n};\nLiteral.prototype.outputDefined = function outputDefined() {\n    return true;\n};\nLiteral.prototype.serialize = function serialize() {\n    if (this.type.kind === 'array' || this.type.kind === 'object') {\n        return [\n            'literal',\n            this.value\n        ];\n    } else if (this.value instanceof Color) {\n        return ['rgba'].concat(this.value.toArray());\n    } else if (this.value instanceof Formatted) {\n        return this.value.serialize();\n    } else {\n        return this.value;\n    }\n};\n\nvar RuntimeError = function RuntimeError(message) {\n    this.name = 'ExpressionEvaluationError';\n    this.message = message
 ;\n};\nRuntimeError.prototype.toJSON = function toJSON() {\n    return this.message;\n};\n\nvar types = {\n    string: StringType,\n    number: NumberType,\n    boolean: BooleanType,\n    object: ObjectType\n};\nvar Assertion = function Assertion(type, args) {\n    this.type = type;\n    this.args = args;\n};\nAssertion.parse = function parse(args, context) {\n    if (args.length < 2) {\n        return context.error('Expected at least one argument.');\n    }\n    var i = 1;\n    var type;\n    var name = args[0];\n    if (name === 'array') {\n        var itemType;\n        if (args.length > 2) {\n            var type$1 = args[1];\n            if (typeof type$1 !== 'string' || !(type$1 in types) || type$1 === 'object') {\n                return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n            }\n            itemType = types[type$1];\n            i++;\n        } else {\n            itemType = ValueType;\n        }\n        va
 r N;\n        if (args.length > 3) {\n            if (args[2] !== null && (typeof args[2] !== 'number' || args[2] < 0 || args[2] !== Math.floor(args[2]))) {\n                return context.error('The length argument to \"array\" must be a positive integer literal', 2);\n            }\n            N = args[2];\n            i++;\n        }\n        type = array(itemType, N);\n    } else {\n        type = types[name];\n    }\n    var parsed = [];\n    for (; i < args.length; i++) {\n        var input = context.parse(args[i], i, ValueType);\n        if (!input) {\n            return null;\n        }\n        parsed.push(input);\n    }\n    return new Assertion(type, parsed);\n};\nAssertion.prototype.evaluate = function evaluate(ctx) {\n    for (var i = 0; i < this.args.length; i++) {\n        var value = this.args[i].evaluate(ctx);\n        var error = checkSubtype(this.type, typeOf(value));\n        if (!error) {\n            return value;\n        } else if (i === this.args.length - 1
 ) {\n            throw new RuntimeError('Expected value to be of type ' + toString(this.type) + ', but found ' + toString(typeOf(value)) + ' instead.');\n        }\n    }\n    return null;\n};\nAssertion.prototype.eachChild = function eachChild(fn) {\n    this.args.forEach(fn);\n};\nAssertion.prototype.outputDefined = function outputDefined() {\n    return this.args.every(function (arg) {\n        return arg.outputDefined();\n    });\n};\nAssertion.prototype.serialize = function serialize() {\n    var type = this.type;\n    var serialized = [type.kind];\n    if (type.kind === 'array') {\n        var itemType = type.itemType;\n        if (itemType.kind === 'string' || itemType.kind === 'number' || itemType.kind === 'boolean') {\n            serialized.push(itemType.kind);\n            var N = type.N;\n            if (typeof N === 'number' || this.args.length > 1) {\n                serialized.push(N);\n            }\n        }\n    }\n    return serialized.concat(this.args.map(functi
 on (arg) {\n        return arg.serialize();\n    }));\n};\n\nvar FormatExpression = function FormatExpression(sections) {\n    this.type = FormattedType;\n    this.sections = sections;\n};\nFormatExpression.parse = function parse(args, context) {\n    if (args.length < 2) {\n        return context.error('Expected at least one argument.');\n    }\n    var firstArg = args[1];\n    if (!Array.isArray(firstArg) && typeof firstArg === 'object') {\n        return context.error('First argument must be an image or text section.');\n    }\n    var sections = [];\n    var nextTokenMayBeObject = false;\n    for (var i = 1; i <= args.length - 1; ++i) {\n        var arg = args[i];\n        if (nextTokenMayBeObject && typeof arg === 'object' && !Array.isArray(arg)) {\n            nextTokenMayBeObject = false;\n            var scale = null;\n            if (arg['font-scale']) {\n                scale = context.parse(arg['font-scale'], 1, NumberType);\n                if (!scale) {\n               
      return null;\n                }\n            }\n            var font = null;\n            if (arg['text-font']) {\n                font = context.parse(arg['text-font'], 1, array(StringType));\n                if (!font) {\n                    return null;\n                }\n            }\n            var textColor = null;\n            if (arg['text-color']) {\n                textColor = context.parse(arg['text-color'], 1, ColorType);\n                if (!textColor) {\n                    return null;\n                }\n            }\n            var lastExpression = sections[sections.length - 1];\n            lastExpression.scale = scale;\n            lastExpression.font = font;\n            lastExpression.textColor = textColor;\n        } else {\n            var content = context.parse(args[i], 1, ValueType);\n            if (!content) {\n                return null;\n            }\n            var kind = content.type.kind;\n            if (kind !== 'string' && kind !== '
 value' && kind !== 'null' && kind !== 'resolvedImage') {\n                return context.error('Formatted text type must be \\'string\\', \\'value\\', \\'image\\' or \\'null\\'.');\n            }\n            nextTokenMayBeObject = true;\n            sections.push({\n                content: content,\n                scale: null,\n                font: null,\n                textColor: null\n            });\n        }\n    }\n    return new FormatExpression(sections);\n};\nFormatExpression.prototype.evaluate = function evaluate(ctx) {\n    var evaluateSection = function (section) {\n        var evaluatedContent = section.content.evaluate(ctx);\n        if (typeOf(evaluatedContent) === ResolvedImageType) {\n            return new FormattedSection('', evaluatedContent, null, null, null);\n        }\n        return new FormattedSection(toString$1(evaluatedContent), null, section.scale ? section.scale.evaluate(ctx) : null, section.font ? section.font.evaluate(ctx).join(',') : null, sect
 ion.textColor ? section.textColor.evaluate(ctx) : null);\n    };\n    return new Formatted(this.sections.map(evaluateSection));\n};\nFormatExpression.prototype.eachChild = function eachChild(fn) {\n    for (var i = 0, list = this.sections; i < list.length; i += 1) {\n        var section = list[i];\n        fn(section.content);\n        if (section.scale) {\n            fn(section.scale);\n        }\n        if (section.font) {\n            fn(section.font);\n        }\n        if (section.textColor) {\n            fn(section.textColor);\n        }\n    }\n};\nFormatExpression.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nFormatExpression.prototype.serialize = function serialize() {\n    var serialized = ['format'];\n    for (var i = 0, list = this.sections; i < list.length; i += 1) {\n        var section = list[i];\n        serialized.push(section.content.serialize());\n        var options = {};\n        if (section.scale) {\n            options['font-
 scale'] = section.scale.serialize();\n        }\n        if (section.font) {\n            options['text-font'] = section.font.serialize();\n        }\n        if (section.textColor) {\n            options['text-color'] = section.textColor.serialize();\n        }\n        serialized.push(options);\n    }\n    return serialized;\n};\n\nvar ImageExpression = function ImageExpression(input) {\n    this.type = ResolvedImageType;\n    this.input = input;\n};\nImageExpression.parse = function parse(args, context) {\n    if (args.length !== 2) {\n        return context.error('Expected two arguments.');\n    }\n    var name = context.parse(args[1], 1, StringType);\n    if (!name) {\n        return context.error('No image name provided.');\n    }\n    return new ImageExpression(name);\n};\nImageExpression.prototype.evaluate = function evaluate(ctx) {\n    var evaluatedImageName = this.input.evaluate(ctx);\n    var value = ResolvedImage.fromString(evaluatedImageName);\n    if (value && ctx.ava
 ilableImages) {\n        value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n    }\n    return value;\n};\nImageExpression.prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n};\nImageExpression.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nImageExpression.prototype.serialize = function serialize() {\n    return [\n        'image',\n        this.input.serialize()\n    ];\n};\n\nvar types$1 = {\n    'to-boolean': BooleanType,\n    'to-color': ColorType,\n    'to-number': NumberType,\n    'to-string': StringType\n};\nvar Coercion = function Coercion(type, args) {\n    this.type = type;\n    this.args = args;\n};\nCoercion.parse = function parse(args, context) {\n    if (args.length < 2) {\n        return context.error('Expected at least one argument.');\n    }\n    var name = args[0];\n    if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2) {\n        return context.error('Expected one argument.
 ');\n    }\n    var type = types$1[name];\n    var parsed = [];\n    for (var i = 1; i < args.length; i++) {\n        var input = context.parse(args[i], i, ValueType);\n        if (!input) {\n            return null;\n        }\n        parsed.push(input);\n    }\n    return new Coercion(type, parsed);\n};\nCoercion.prototype.evaluate = function evaluate(ctx) {\n    if (this.type.kind === 'boolean') {\n        return Boolean(this.args[0].evaluate(ctx));\n    } else if (this.type.kind === 'color') {\n        var input;\n        var error;\n        for (var i = 0, list = this.args; i < list.length; i += 1) {\n            var arg = list[i];\n            input = arg.evaluate(ctx);\n            error = null;\n            if (input instanceof Color) {\n                return input;\n            } else if (typeof input === 'string') {\n                var c = ctx.parseColor(input);\n                if (c) {\n                    return c;\n                }\n            } else if (Array.isA
 rray(input)) {\n                if (input.length < 3 || input.length > 4) {\n                    error = 'Invalid rbga value ' + JSON.stringify(input) + ': expected an array containing either three or four numeric values.';\n                } else {\n                    error = validateRGBA(input[0], input[1], input[2], input[3]);\n                }\n                if (!error) {\n                    return new Color(input[0] / 255, input[1] / 255, input[2] / 255, input[3]);\n                }\n            }\n        }\n        throw new RuntimeError(error || 'Could not parse color from value \\'' + (typeof input === 'string' ? input : String(JSON.stringify(input))) + '\\'');\n    } else if (this.type.kind === 'number') {\n        var value = null;\n        for (var i$1 = 0, list$1 = this.args; i$1 < list$1.length; i$1 += 1) {\n            var arg$1 = list$1[i$1];\n            value = arg$1.evaluate(ctx);\n            if (value === null) {\n                return 0;\n            }\n
             var num = Number(value);\n            if (isNaN(num)) {\n                continue;\n            }\n            return num;\n        }\n        throw new RuntimeError('Could not convert ' + JSON.stringify(value) + ' to number.');\n    } else if (this.type.kind === 'formatted') {\n        return Formatted.fromString(toString$1(this.args[0].evaluate(ctx)));\n    } else if (this.type.kind === 'resolvedImage') {\n        return ResolvedImage.fromString(toString$1(this.args[0].evaluate(ctx)));\n    } else {\n        return toString$1(this.args[0].evaluate(ctx));\n    }\n};\nCoercion.prototype.eachChild = function eachChild(fn) {\n    this.args.forEach(fn);\n};\nCoercion.prototype.outputDefined = function outputDefined() {\n    return this.args.every(function (arg) {\n        return arg.outputDefined();\n    });\n};\nCoercion.prototype.serialize = function serialize() {\n    if (this.type.kind === 'formatted') {\n        return new FormatExpression([{\n                content: 
 this.args[0],\n                scale: null,\n                font: null,\n                textColor: null\n            }]).serialize();\n    }\n    if (this.type.kind === 'resolvedImage') {\n        return new ImageExpression(this.args[0]).serialize();\n    }\n    var serialized = ['to-' + this.type.kind];\n    this.eachChild(function (child) {\n        serialized.push(child.serialize());\n    });\n    return serialized;\n};\n\nvar geometryTypes = [\n    'Unknown',\n    'Point',\n    'LineString',\n    'Polygon'\n];\nvar EvaluationContext = function EvaluationContext() {\n    this.globals = null;\n    this.feature = null;\n    this.featureState = null;\n    this.formattedSection = null;\n    this._parseColorCache = {};\n    this.availableImages = null;\n    this.canonical = null;\n};\nEvaluationContext.prototype.id = function id() {\n    return this.feature && 'id' in this.feature ? this.feature.id : null;\n};\nEvaluationContext.prototype.geometryType = function geometryType() {\n  
   return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n};\nEvaluationContext.prototype.geometry = function geometry() {\n    return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n};\nEvaluationContext.prototype.canonicalID = function canonicalID() {\n    return this.canonical;\n};\nEvaluationContext.prototype.properties = function properties() {\n    return this.feature && this.feature.properties || {};\n};\nEvaluationContext.prototype.parseColor = function parseColor(input) {\n    var cached = this._parseColorCache[input];\n    if (!cached) {\n        cached = this._parseColorCache[input] = Color.parse(input);\n    }\n    return cached;\n};\n\nvar CompoundExpression = function CompoundExpression(name, type, evaluate, args) {\n    this.name = name;\n    this.type = type;\n    this._evaluate = evaluate;\n    this.args = args;\n};\nCompoundExpression.prototype.evaluate = function evalua
 te(ctx) {\n    return this._evaluate(ctx, this.args);\n};\nCompoundExpression.prototype.eachChild = function eachChild(fn) {\n    this.args.forEach(fn);\n};\nCompoundExpression.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nCompoundExpression.prototype.serialize = function serialize() {\n    return [this.name].concat(this.args.map(function (arg) {\n        return arg.serialize();\n    }));\n};\nCompoundExpression.parse = function parse(args, context) {\n    var ref$1;\n    var op = args[0];\n    var definition = CompoundExpression.definitions[op];\n    if (!definition) {\n        return context.error('Unknown expression \"' + op + '\". If you wanted a literal array, use [\"literal\", [...]].', 0);\n    }\n    var type = Array.isArray(definition) ? definition[0] : definition.type;\n    var availableOverloads = Array.isArray(definition) ? [[\n            definition[1],\n            definition[2]\n        ]] : definition.overloads;\n    var overloads = ava
 ilableOverloads.filter(function (ref) {\n        var signature = ref[0];\n        return !Array.isArray(signature) || signature.length === args.length - 1;\n    });\n    var signatureContext = null;\n    for (var i$3 = 0, list = overloads; i$3 < list.length; i$3 += 1) {\n        var ref = list[i$3];\n        var params = ref[0];\n        var evaluate = ref[1];\n        signatureContext = new ParsingContext(context.registry, context.path, null, context.scope);\n        var parsedArgs = [];\n        var argParseFailed = false;\n        for (var i = 1; i < args.length; i++) {\n            var arg = args[i];\n            var expectedType = Array.isArray(params) ? params[i - 1] : params.type;\n            var parsed = signatureContext.parse(arg, 1 + parsedArgs.length, expectedType);\n            if (!parsed) {\n                argParseFailed = true;\n                break;\n            }\n            parsedArgs.push(parsed);\n        }\n        if (argParseFailed) {\n            continue
 ;\n        }\n        if (Array.isArray(params)) {\n            if (params.length !== parsedArgs.length) {\n                signatureContext.error('Expected ' + params.length + ' arguments, but found ' + parsedArgs.length + ' instead.');\n                continue;\n            }\n        }\n        for (var i$1 = 0; i$1 < parsedArgs.length; i$1++) {\n            var expected = Array.isArray(params) ? params[i$1] : params.type;\n            var arg$1 = parsedArgs[i$1];\n            signatureContext.concat(i$1 + 1).checkSubtype(expected, arg$1.type);\n        }\n        if (signatureContext.errors.length === 0) {\n            return new CompoundExpression(op, type, evaluate, parsedArgs);\n        }\n    }\n    if (overloads.length === 1) {\n        (ref$1 = context.errors).push.apply(ref$1, signatureContext.errors);\n    } else {\n        var expected$1 = overloads.length ? overloads : availableOverloads;\n        var signatures = expected$1.map(function (ref) {\n            var param
 s = ref[0];\n            return stringifySignature(params);\n        }).join(' | ');\n        var actualTypes = [];\n        for (var i$2 = 1; i$2 < args.length; i$2++) {\n            var parsed$1 = context.parse(args[i$2], 1 + actualTypes.length);\n            if (!parsed$1) {\n                return null;\n            }\n            actualTypes.push(toString(parsed$1.type));\n        }\n        context.error('Expected arguments of type ' + signatures + ', but found (' + actualTypes.join(', ') + ') instead.');\n    }\n    return null;\n};\nCompoundExpression.register = function register(registry, definitions) {\n    CompoundExpression.definitions = definitions;\n    for (var name in definitions) {\n        registry[name] = CompoundExpression;\n    }\n};\nfunction stringifySignature(signature) {\n    if (Array.isArray(signature)) {\n        return '(' + signature.map(toString).join(', ') + ')';\n    } else {\n        return '(' + toString(signature.type) + '...)';\n    }\n}\n\nvar C
 ollatorExpression = function CollatorExpression(caseSensitive, diacriticSensitive, locale) {\n    this.type = CollatorType;\n    this.locale = locale;\n    this.caseSensitive = caseSensitive;\n    this.diacriticSensitive = diacriticSensitive;\n};\nCollatorExpression.parse = function parse(args, context) {\n    if (args.length !== 2) {\n        return context.error('Expected one argument.');\n    }\n    var options = args[1];\n    if (typeof options !== 'object' || Array.isArray(options)) {\n        return context.error('Collator options argument must be an object.');\n    }\n    var caseSensitive = context.parse(options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n    if (!caseSensitive) {\n        return null;\n    }\n    var diacriticSensitive = context.parse(options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n    if (!diacriticSensitive) {\n        return null;\n    }\n    var locale = 
 null;\n    if (options['locale']) {\n        locale = context.parse(options['locale'], 1, StringType);\n        if (!locale) {\n            return null;\n        }\n    }\n    return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n};\nCollatorExpression.prototype.evaluate = function evaluate(ctx) {\n    return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null);\n};\nCollatorExpression.prototype.eachChild = function eachChild(fn) {\n    fn(this.caseSensitive);\n    fn(this.diacriticSensitive);\n    if (this.locale) {\n        fn(this.locale);\n    }\n};\nCollatorExpression.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nCollatorExpression.prototype.serialize = function serialize() {\n    var options = {};\n    options['case-sensitive'] = this.caseSensitive.serialize();\n    options['diacritic-sensitive'] = this.diacriticSensitive.serialize();\n    if (th
 is.locale) {\n        options['locale'] = this.locale.serialize();\n    }\n    return [\n        'collator',\n        options\n    ];\n};\n\nvar EXTENT = 8192;\nfunction updateBBox(bbox, coord) {\n    bbox[0] = Math.min(bbox[0], coord[0]);\n    bbox[1] = Math.min(bbox[1], coord[1]);\n    bbox[2] = Math.max(bbox[2], coord[0]);\n    bbox[3] = Math.max(bbox[3], coord[1]);\n}\nfunction mercatorXfromLng(lng) {\n    return (180 + lng) / 360;\n}\nfunction mercatorYfromLat(lat) {\n    return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360))) / 360;\n}\nfunction boxWithinBox(bbox1, bbox2) {\n    if (bbox1[0] <= bbox2[0]) {\n        return false;\n    }\n    if (bbox1[2] >= bbox2[2]) {\n        return false;\n    }\n    if (bbox1[1] <= bbox2[1]) {\n        return false;\n    }\n    if (bbox1[3] >= bbox2[3]) {\n        return false;\n    }\n    return true;\n}\nfunction getTileCoordinates(p, canonical) {\n    var x = mercatorXfromLng(p[0]);\n    var y = mercatorYfrom
 Lat(p[1]);\n    var tilesAtZoom = Math.pow(2, canonical.z);\n    return [\n        Math.round(x * tilesAtZoom * EXTENT),\n        Math.round(y * tilesAtZoom * EXTENT)\n    ];\n}\nfunction onBoundary(p, p1, p2) {\n    var x1 = p[0] - p1[0];\n    var y1 = p[1] - p1[1];\n    var x2 = p[0] - p2[0];\n    var y2 = p[1] - p2[1];\n    return x1 * y2 - x2 * y1 === 0 && x1 * x2 <= 0 && y1 * y2 <= 0;\n}\nfunction rayIntersect(p, p1, p2) {\n    return p1[1] > p[1] !== p2[1] > p[1] && p[0] < (p2[0] - p1[0]) * (p[1] - p1[1]) / (p2[1] - p1[1]) + p1[0];\n}\nfunction pointWithinPolygon(point, rings) {\n    var inside = false;\n    for (var i = 0, len = rings.length; i < len; i++) {\n        var ring = rings[i];\n        for (var j = 0, len2 = ring.length; j < len2 - 1; j++) {\n            if (onBoundary(point, ring[j], ring[j + 1])) {\n                return false;\n            }\n            if (rayIntersect(point, ring[j], ring[j + 1])) {\n                inside = !inside;\n            }\n        
 }\n    }\n    return inside;\n}\nfunction pointWithinPolygons(point, polygons) {\n    for (var i = 0; i < polygons.length; i++) {\n        if (pointWithinPolygon(point, polygons[i])) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction perp(v1, v2) {\n    return v1[0] * v2[1] - v1[1] * v2[0];\n}\nfunction twoSided(p1, p2, q1, q2) {\n    var x1 = p1[0] - q1[0];\n    var y1 = p1[1] - q1[1];\n    var x2 = p2[0] - q1[0];\n    var y2 = p2[1] - q1[1];\n    var x3 = q2[0] - q1[0];\n    var y3 = q2[1] - q1[1];\n    var det1 = x1 * y3 - x3 * y1;\n    var det2 = x2 * y3 - x3 * y2;\n    if (det1 > 0 && det2 < 0 || det1 < 0 && det2 > 0) {\n        return true;\n    }\n    return false;\n}\nfunction lineIntersectLine(a, b, c, d) {\n    var vectorP = [\n        b[0] - a[0],\n        b[1] - a[1]\n    ];\n    var vectorQ = [\n        d[0] - c[0],\n        d[1] - c[1]\n    ];\n    if (perp(vectorQ, vectorP) === 0) {\n        return false;\n    }\n    if (twoSided(a, b, c, d)
  && twoSided(c, d, a, b)) {\n        return true;\n    }\n    return false;\n}\nfunction lineIntersectPolygon(p1, p2, polygon) {\n    for (var i = 0, list = polygon; i < list.length; i += 1) {\n        var ring = list[i];\n        for (var j = 0; j < ring.length - 1; ++j) {\n            if (lineIntersectLine(p1, p2, ring[j], ring[j + 1])) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\nfunction lineStringWithinPolygon(line, polygon) {\n    for (var i = 0; i < line.length; ++i) {\n        if (!pointWithinPolygon(line[i], polygon)) {\n            return false;\n        }\n    }\n    for (var i$1 = 0; i$1 < line.length - 1; ++i$1) {\n        if (lineIntersectPolygon(line[i$1], line[i$1 + 1], polygon)) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction lineStringWithinPolygons(line, polygons) {\n    for (var i = 0; i < polygons.length; i++) {\n        if (lineStringWithinPolygon(line, polygons[i])) {\n            return 
 true;\n        }\n    }\n    return false;\n}\nfunction getTilePolygon(coordinates, bbox, canonical) {\n    var polygon = [];\n    for (var i = 0; i < coordinates.length; i++) {\n        var ring = [];\n        for (var j = 0; j < coordinates[i].length; j++) {\n            var coord = getTileCoordinates(coordinates[i][j], canonical);\n            updateBBox(bbox, coord);\n            ring.push(coord);\n        }\n        polygon.push(ring);\n    }\n    return polygon;\n}\nfunction getTilePolygons(coordinates, bbox, canonical) {\n    var polygons = [];\n    for (var i = 0; i < coordinates.length; i++) {\n        var polygon = getTilePolygon(coordinates[i], bbox, canonical);\n        polygons.push(polygon);\n    }\n    return polygons;\n}\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n    if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n        var halfWorldSize = worldSize * 0.5;\n        var shift = p[0] - polyBBox[0] > halfWorldSize ? -worldSize : polyBBox[0] - p[0] > halfW
 orldSize ? worldSize : 0;\n        if (shift === 0) {\n            shift = p[0] - polyBBox[2] > halfWorldSize ? -worldSize : polyBBox[2] - p[0] > halfWorldSize ? worldSize : 0;\n        }\n        p[0] += shift;\n    }\n    updateBBox(bbox, p);\n}\nfunction resetBBox(bbox) {\n    bbox[0] = bbox[1] = Infinity;\n    bbox[2] = bbox[3] = -Infinity;\n}\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical) {\n    var worldSize = Math.pow(2, canonical.z) * EXTENT;\n    var shifts = [\n        canonical.x * EXTENT,\n        canonical.y * EXTENT\n    ];\n    var tilePoints = [];\n    for (var i$1 = 0, list$1 = geometry; i$1 < list$1.length; i$1 += 1) {\n        var points = list$1[i$1];\n        for (var i = 0, list = points; i < list.length; i += 1) {\n            var point = list[i];\n            var p = [\n                point.x + shifts[0],\n                point.y + shifts[1]\n            ];\n            updatePoint(p, pointBBox, polyBBox, worldSize);\n            tilePoint
 s.push(p);\n        }\n    }\n    return tilePoints;\n}\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical) {\n    var worldSize = Math.pow(2, canonical.z) * EXTENT;\n    var shifts = [\n        canonical.x * EXTENT,\n        canonical.y * EXTENT\n    ];\n    var tileLines = [];\n    for (var i$1 = 0, list$1 = geometry; i$1 < list$1.length; i$1 += 1) {\n        var line = list$1[i$1];\n        var tileLine = [];\n        for (var i = 0, list = line; i < list.length; i += 1) {\n            var point = list[i];\n            var p = [\n                point.x + shifts[0],\n                point.y + shifts[1]\n            ];\n            updateBBox(lineBBox, p);\n            tileLine.push(p);\n        }\n        tileLines.push(tileLine);\n    }\n    if (lineBBox[2] - lineBBox[0] <= worldSize / 2) {\n        resetBBox(lineBBox);\n        for (var i$3 = 0, list$3 = tileLines; i$3 < list$3.length; i$3 += 1) {\n            var line$1 = list$3[i$3];\n            for (var i$2 = 0,
  list$2 = line$1; i$2 < list$2.length; i$2 += 1) {\n                var p$1 = list$2[i$2];\n                updatePoint(p$1, lineBBox, polyBBox, worldSize);\n            }\n        }\n    }\n    return tileLines;\n}\nfunction pointsWithinPolygons(ctx, polygonGeometry) {\n    var pointBBox = [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    var polyBBox = [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    var canonical = ctx.canonicalID();\n    if (polygonGeometry.type === 'Polygon') {\n        var tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n        var tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n        if (!boxWithinBox(pointBBox, polyBBox)) {\n            return false;\n        }\n        for (var i = 0, list = tilePoints; i < list.length; i += 1) {\n            var point = list[i];\n            if (!pointWithinPolygon(point, tile
 Polygon)) {\n                return false;\n            }\n        }\n    }\n    if (polygonGeometry.type === 'MultiPolygon') {\n        var tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n        var tilePoints$1 = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n        if (!boxWithinBox(pointBBox, polyBBox)) {\n            return false;\n        }\n        for (var i$1 = 0, list$1 = tilePoints$1; i$1 < list$1.length; i$1 += 1) {\n            var point$1 = list$1[i$1];\n            if (!pointWithinPolygons(point$1, tilePolygons)) {\n                return false;\n            }\n        }\n    }\n    return true;\n}\nfunction linesWithinPolygons(ctx, polygonGeometry) {\n    var lineBBox = [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    var polyBBox = [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    var canonical = ctx.canonicalID();\n    if (polyg
 onGeometry.type === 'Polygon') {\n        var tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n        var tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n        if (!boxWithinBox(lineBBox, polyBBox)) {\n            return false;\n        }\n        for (var i = 0, list = tileLines; i < list.length; i += 1) {\n            var line = list[i];\n            if (!lineStringWithinPolygon(line, tilePolygon)) {\n                return false;\n            }\n        }\n    }\n    if (polygonGeometry.type === 'MultiPolygon') {\n        var tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n        var tileLines$1 = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n        if (!boxWithinBox(lineBBox, polyBBox)) {\n            return false;\n        }\n        for (var i$1 = 0, list$1 = tileLines$1; i$1 < list$1.length; i$1 += 1) {\n            var line$1 = list$1[i$1];\n            if (!line
 StringWithinPolygons(line$1, tilePolygons)) {\n                return false;\n            }\n        }\n    }\n    return true;\n}\nvar Within = function Within(geojson, geometries) {\n    this.type = BooleanType;\n    this.geojson = geojson;\n    this.geometries = geometries;\n};\nWithin.parse = function parse(args, context) {\n    if (args.length !== 2) {\n        return context.error('\\'within\\' expression requires exactly one argument, but found ' + (args.length - 1) + ' instead.');\n    }\n    if (isValue(args[1])) {\n        var geojson = args[1];\n        if (geojson.type === 'FeatureCollection') {\n            for (var i = 0; i < geojson.features.length; ++i) {\n                var type = geojson.features[i].geometry.type;\n                if (type === 'Polygon' || type === 'MultiPolygon') {\n                    return new Within(geojson, geojson.features[i].geometry);\n                }\n            }\n        } else if (geojson.type === 'Feature') {\n            var type
 $1 = geojson.geometry.type;\n            if (type$1 === 'Polygon' || type$1 === 'MultiPolygon') {\n                return new Within(geojson, geojson.geometry);\n            }\n        } else if (geojson.type === 'Polygon' || geojson.type === 'MultiPolygon') {\n            return new Within(geojson, geojson);\n        }\n    }\n    return context.error('\\'within\\' expression requires valid geojson object that contains polygon geometry type.');\n};\nWithin.prototype.evaluate = function evaluate(ctx) {\n    if (ctx.geometry() != null && ctx.canonicalID() != null) {\n        if (ctx.geometryType() === 'Point') {\n            return pointsWithinPolygons(ctx, this.geometries);\n        } else if (ctx.geometryType() === 'LineString') {\n            return linesWithinPolygons(ctx, this.geometries);\n        }\n    }\n    return false;\n};\nWithin.prototype.eachChild = function eachChild() {\n};\nWithin.prototype.outputDefined = function outputDefined() {\n    return true;\n};\nWithin.pro
 totype.serialize = function serialize() {\n    return [\n        'within',\n        this.geojson\n    ];\n};\n\nfunction isFeatureConstant(e) {\n    if (e instanceof CompoundExpression) {\n        if (e.name === 'get' && e.args.length === 1) {\n            return false;\n        } else if (e.name === 'feature-state') {\n            return false;\n        } else if (e.name === 'has' && e.args.length === 1) {\n            return false;\n        } else if (e.name === 'properties' || e.name === 'geometry-type' || e.name === 'id') {\n            return false;\n        } else if (/^filter-/.test(e.name)) {\n            return false;\n        }\n    }\n    if (e instanceof Within) {\n        return false;\n    }\n    var result = true;\n    e.eachChild(function (arg) {\n        if (result && !isFeatureConstant(arg)) {\n            result = false;\n        }\n    });\n    return result;\n}\nfunction isStateConstant(e) {\n    if (e instanceof CompoundExpression) {\n        if (e.name === 'fe
 ature-state') {\n            return false;\n        }\n    }\n    var result = true;\n    e.eachChild(function (arg) {\n        if (result && !isStateConstant(arg)) {\n            result = false;\n        }\n    });\n    return result;\n}\nfunction isGlobalPropertyConstant(e, properties) {\n    if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) {\n        return false;\n    }\n    var result = true;\n    e.eachChild(function (arg) {\n        if (result && !isGlobalPropertyConstant(arg, properties)) {\n            result = false;\n        }\n    });\n    return result;\n}\n\nvar Var = function Var(name, boundExpression) {\n    this.type = boundExpression.type;\n    this.name = name;\n    this.boundExpression = boundExpression;\n};\nVar.parse = function parse(args, context) {\n    if (args.length !== 2 || typeof args[1] !== 'string') {\n        return context.error('\\'var\\' expression requires exactly one string literal argument.');\n    }\n    var name = args[1
 ];\n    if (!context.scope.has(name)) {\n        return context.error('Unknown variable \"' + name + '\". Make sure \"' + name + '\" has been bound in an enclosing \"let\" expression before using it.', 1);\n    }\n    return new Var(name, context.scope.get(name));\n};\nVar.prototype.evaluate = function evaluate(ctx) {\n    return this.boundExpression.evaluate(ctx);\n};\nVar.prototype.eachChild = function eachChild() {\n};\nVar.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nVar.prototype.serialize = function serialize() {\n    return [\n        'var',\n        this.name\n    ];\n};\n\nvar ParsingContext = function ParsingContext(registry, path, expectedType, scope, errors) {\n    if (path === void 0)\n        path = [];\n    if (scope === void 0)\n        scope = new Scope();\n    if (errors === void 0)\n        errors = [];\n    this.registry = registry;\n    this.path = path;\n    this.key = path.map(function (part) {\n        return '[' + part + ']';\
 n    }).join('');\n    this.scope = scope;\n    this.errors = errors;\n    this.expectedType = expectedType;\n};\nParsingContext.prototype.parse = function parse(expr, index, expectedType, bindings, options) {\n    if (options === void 0)\n        options = {};\n    if (index) {\n        return this.concat(index, expectedType, bindings)._parse(expr, options);\n    }\n    return this._parse(expr, options);\n};\nParsingContext.prototype._parse = function _parse(expr, options) {\n    if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n        expr = [\n            'literal',\n            expr\n        ];\n    }\n    function annotate(parsed, type, typeAnnotation) {\n        if (typeAnnotation === 'assert') {\n            return new Assertion(type, [parsed]);\n        } else if (typeAnnotation === 'coerce') {\n            return new Coercion(type, [parsed]);\n        } else {\n            return parsed;\n        }\n    }\n    if (Ar
 ray.isArray(expr)) {\n        if (expr.length === 0) {\n            return this.error('Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].');\n        }\n        var op = expr[0];\n        if (typeof op !== 'string') {\n            this.error('Expression name must be a string, but found ' + typeof op + ' instead. If you wanted a literal array, use [\"literal\", [...]].', 0);\n            return null;\n        }\n        var Expr = this.registry[op];\n        if (Expr) {\n            var parsed = Expr.parse(expr, this);\n            if (!parsed) {\n                return null;\n            }\n            if (this.expectedType) {\n                var expected = this.expectedType;\n                var actual = parsed.type;\n                if ((expected.kind === 'string' || expected.kind === 'number' || expected.kind === 'boolean' || expected.kind === 'object' || expected.kind === 'array') && actual.kind === 'value') {\n                   
  parsed = annotate(parsed, expected, options.typeAnnotation || 'assert');\n                } else if ((expected.kind === 'color' || expected.kind === 'formatted' || expected.kind === 'resolvedImage') && (actual.kind === 'value' || actual.kind === 'string')) {\n                    parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce');\n                } else if (this.checkSubtype(expected, actual)) {\n                    return null;\n                }\n            }\n            if (!(parsed instanceof Literal) && parsed.type.kind !== 'resolvedImage' && isConstant(parsed)) {\n                var ec = new EvaluationContext();\n                try {\n                    parsed = new Literal(parsed.type, parsed.evaluate(ec));\n                } catch (e) {\n                    this.error(e.message);\n                    return null;\n                }\n            }\n            return parsed;\n        }\n        return this.error('Unknown expression \"' + op + '\". I
 f you wanted a literal array, use [\"literal\", [...]].', 0);\n    } else if (typeof expr === 'undefined') {\n        return this.error('\\'undefined\\' value invalid. Use null instead.');\n    } else if (typeof expr === 'object') {\n        return this.error('Bare objects invalid. Use [\"literal\", {...}] instead.');\n    } else {\n        return this.error('Expected an array, but found ' + typeof expr + ' instead.');\n    }\n};\nParsingContext.prototype.concat = function concat(index, expectedType, bindings) {\n    var path = typeof index === 'number' ? this.path.concat(index) : this.path;\n    var scope = bindings ? this.scope.concat(bindings) : this.scope;\n    return new ParsingContext(this.registry, path, expectedType || null, scope, this.errors);\n};\nParsingContext.prototype.error = function error(error$1) {\n    var keys = [], len = arguments.length - 1;\n    while (len-- > 0)\n        keys[len] = arguments[len + 1];\n    var key = '' + this.key + keys.map(function (k) {\n 
        return '[' + k + ']';\n    }).join('');\n    this.errors.push(new ParsingError(key, error$1));\n};\nParsingContext.prototype.checkSubtype = function checkSubtype$1(expected, t) {\n    var error = checkSubtype(expected, t);\n    if (error) {\n        this.error(error);\n    }\n    return error;\n};\nfunction isConstant(expression) {\n    if (expression instanceof Var) {\n        return isConstant(expression.boundExpression);\n    } else if (expression instanceof CompoundExpression && expression.name === 'error') {\n        return false;\n    } else if (expression instanceof CollatorExpression) {\n        return false;\n    } else if (expression instanceof Within) {\n        return false;\n    }\n    var isTypeAnnotation = expression instanceof Coercion || expression instanceof Assertion;\n    var childrenConstant = true;\n    expression.eachChild(function (child) {\n        if (isTypeAnnotation) {\n            childrenConstant = childrenConstant && isConstant(child);\n        
 } else {\n            childrenConstant = childrenConstant && child instanceof Literal;\n        }\n    });\n    if (!childrenConstant) {\n        return false;\n    }\n    return isFeatureConstant(expression) && isGlobalPropertyConstant(expression, [\n        'zoom',\n        'heatmap-density',\n        'line-progress',\n        'accumulated',\n        'is-supported-script'\n    ]);\n}\n\nfunction findStopLessThanOrEqualTo(stops, input) {\n    var lastIndex = stops.length - 1;\n    var lowerIndex = 0;\n    var upperIndex = lastIndex;\n    var currentIndex = 0;\n    var currentValue, nextValue;\n    while (lowerIndex <= upperIndex) {\n        currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n        currentValue = stops[currentIndex];\n        nextValue = stops[currentIndex + 1];\n        if (currentValue <= input) {\n            if (currentIndex === lastIndex || input < nextValue) {\n                return currentIndex;\n            }\n            lowerIndex = currentIndex 
 + 1;\n        } else if (currentValue > input) {\n            upperIndex = currentIndex - 1;\n        } else {\n            throw new RuntimeError('Input is not a number.');\n        }\n    }\n    return 0;\n}\n\nvar Step = function Step(type, input, stops) {\n    this.type = type;\n    this.input = input;\n    this.labels = [];\n    this.outputs = [];\n    for (var i = 0, list = stops; i < list.length; i += 1) {\n        var ref = list[i];\n        var label = ref[0];\n        var expression = ref[1];\n        this.labels.push(label);\n        this.outputs.push(expression);\n    }\n};\nStep.parse = function parse(args, context) {\n    if (args.length - 1 < 4) {\n        return context.error('Expected at least 4 arguments, but found only ' + (args.length - 1) + '.');\n    }\n    if ((args.length - 1) % 2 !== 0) {\n        return context.error('Expected an even number of arguments.');\n    }\n    var input = context.parse(args[1], 1, NumberType);\n    if (!input) {\n        return nu
 ll;\n    }\n    var stops = [];\n    var outputType = null;\n    if (context.expectedType && context.expectedType.kind !== 'value') {\n        outputType = context.expectedType;\n    }\n    for (var i = 1; i < args.length; i += 2) {\n        var label = i === 1 ? -Infinity : args[i];\n        var value = args[i + 1];\n        var labelKey = i;\n        var valueKey = i + 1;\n        if (typeof label !== 'number') {\n            return context.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n        }\n        if (stops.length && stops[stops.length - 1][0] >= label) {\n            return context.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n        }\n        var parsed = context.parse(value, valueKey, outputType);\n        if (!parsed) {\n            return null;\n        }\n        outputType
  = outputType || parsed.type;\n        stops.push([\n            label,\n            parsed\n        ]);\n    }\n    return new Step(outputType, input, stops);\n};\nStep.prototype.evaluate = function evaluate(ctx) {\n    var labels = this.labels;\n    var outputs = this.outputs;\n    if (labels.length === 1) {\n        return outputs[0].evaluate(ctx);\n    }\n    var value = this.input.evaluate(ctx);\n    if (value <= labels[0]) {\n        return outputs[0].evaluate(ctx);\n    }\n    var stopCount = labels.length;\n    if (value >= labels[stopCount - 1]) {\n        return outputs[stopCount - 1].evaluate(ctx);\n    }\n    var index = findStopLessThanOrEqualTo(labels, value);\n    return outputs[index].evaluate(ctx);\n};\nStep.prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n    for (var i = 0, list = this.outputs; i < list.length; i += 1) {\n        var expression = list[i];\n        fn(expression);\n    }\n};\nStep.prototype.outputDefined = function outputDefined
 () {\n    return this.outputs.every(function (out) {\n        return out.outputDefined();\n    });\n};\nStep.prototype.serialize = function serialize() {\n    var serialized = [\n        'step',\n        this.input.serialize()\n    ];\n    for (var i = 0; i < this.labels.length; i++) {\n        if (i > 0) {\n            serialized.push(this.labels[i]);\n        }\n        serialized.push(this.outputs[i].serialize());\n    }\n    return serialized;\n};\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other 
 materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Ported from Webkit\n * http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h\n */\n\nvar unitbezier = UnitBezier;\n\nfunction UnitBezier(p1x
 , p1y, p2x, p2y) {\n    // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n    this.cx = 3.0 * p1x;\n    this.bx = 3.0 * (p2x - p1x) - this.cx;\n    this.ax = 1.0 - this.cx - this.bx;\n\n    this.cy = 3.0 * p1y;\n    this.by = 3.0 * (p2y - p1y) - this.cy;\n    this.ay = 1.0 - this.cy - this.by;\n\n    this.p1x = p1x;\n    this.p1y = p2y;\n    this.p2x = p2x;\n    this.p2y = p2y;\n}\n\nUnitBezier.prototype.sampleCurveX = function(t) {\n    // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.\n    return ((this.ax * t + this.bx) * t + this.cx) * t;\n};\n\nUnitBezier.prototype.sampleCurveY = function(t) {\n    return ((this.ay * t + this.by) * t + this.cy) * t;\n};\n\nUnitBezier.prototype.sampleCurveDerivativeX = function(t) {\n    return (3.0 * this.ax * t + 2.0 * this.bx) * t + this.cx;\n};\n\nUnitBezier.prototype.solveCurveX = function(x, epsilon) {\n    if (typeof epsilon === 'undefined') { epsilon = 1e-6; }\n\n    var t0, t1
 , t2, x2, i;\n\n    // First try a few iterations of Newton's method -- normally very fast.\n    for (t2 = x, i = 0; i < 8; i++) {\n\n        x2 = this.sampleCurveX(t2) - x;\n        if (Math.abs(x2) < epsilon) { return t2; }\n\n        var d2 = this.sampleCurveDerivativeX(t2);\n        if (Math.abs(d2) < 1e-6) { break; }\n\n        t2 = t2 - x2 / d2;\n    }\n\n    // Fall back to the bisection method for reliability.\n    t0 = 0.0;\n    t1 = 1.0;\n    t2 = x;\n\n    if (t2 < t0) { return t0; }\n    if (t2 > t1) { return t1; }\n\n    while (t0 < t1) {\n\n        x2 = this.sampleCurveX(t2);\n        if (Math.abs(x2 - x) < epsilon) { return t2; }\n\n        if (x > x2) {\n            t0 = t2;\n        } else {\n            t1 = t2;\n        }\n\n        t2 = (t1 - t0) * 0.5 + t0;\n    }\n\n    // Failure.\n    return t2;\n};\n\nUnitBezier.prototype.solve = function(x, epsilon) {\n    return this.sampleCurveY(this.solveCurveX(x, epsilon));\n};\n\nfunction number(a, b, t) {\n    return 
 a * (1 - t) + b * t;\n}\nfunction color(from, to, t) {\n    return new Color(number(from.r, to.r, t), number(from.g, to.g, t), number(from.b, to.b, t), number(from.a, to.a, t));\n}\nfunction array$1(from, to, t) {\n    return from.map(function (d, i) {\n        return number(d, to[i], t);\n    });\n}\n\nvar interpolate = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  number: number,\n  color: color,\n  array: array$1\n});\n\nvar Xn = 0.95047, Yn = 1, Zn = 1.08883, t0 = 4 / 29, t1 = 6 / 29, t2 = 3 * t1 * t1, t3 = t1 * t1 * t1, deg2rad = Math.PI / 180, rad2deg = 180 / Math.PI;\nfunction xyz2lab(t) {\n    return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\nfunction lab2xyz(t) {\n    return t > t1 ? t * t * t : t2 * (t - t0);\n}\nfunction xyz2rgb(x) {\n    return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\nfunction rgb2xyz(x) {\n    x /= 255;\n    return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\nfunction rgbToLab(rgbColo
 r) {\n    var b = rgb2xyz(rgbColor.r), a = rgb2xyz(rgbColor.g), l = rgb2xyz(rgbColor.b), x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn), y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.072175 * l) / Yn), z = xyz2lab((0.0193339 * b + 0.119192 * a + 0.9503041 * l) / Zn);\n    return {\n        l: 116 * y - 16,\n        a: 500 * (x - y),\n        b: 200 * (y - z),\n        alpha: rgbColor.a\n    };\n}\nfunction labToRgb(labColor) {\n    var y = (labColor.l + 16) / 116, x = isNaN(labColor.a) ? y : y + labColor.a / 500, z = isNaN(labColor.b) ? y : y - labColor.b / 200;\n    y = Yn * lab2xyz(y);\n    x = Xn * lab2xyz(x);\n    z = Zn * lab2xyz(z);\n    return new Color(xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), xyz2rgb(-0.969266 * x + 1.8760108 * y + 0.041556 * z), xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z), labColor.alpha);\n}\nfunction interpolateLab(from, to, t) {\n    return {\n        l: number(from.l, to.l, t),\n        a: number(from.a, to.
 a, t),\n        b: number(from.b, to.b, t),\n        alpha: number(from.alpha, to.alpha, t)\n    };\n}\nfunction rgbToHcl(rgbColor) {\n    var ref = rgbToLab(rgbColor);\n    var l = ref.l;\n    var a = ref.a;\n    var b = ref.b;\n    var h = Math.atan2(b, a) * rad2deg;\n    return {\n        h: h < 0 ? h + 360 : h,\n        c: Math.sqrt(a * a + b * b),\n        l: l,\n        alpha: rgbColor.a\n    };\n}\nfunction hclToRgb(hclColor) {\n    var h = hclColor.h * deg2rad, c = hclColor.c, l = hclColor.l;\n    return labToRgb({\n        l: l,\n        a: Math.cos(h) * c,\n        b: Math.sin(h) * c,\n        alpha: hclColor.alpha\n    });\n}\nfunction interpolateHue(a, b, t) {\n    var d = b - a;\n    return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\nfunction interpolateHcl(from, to, t) {\n    return {\n        h: interpolateHue(from.h, to.h, t),\n        c: number(from.c, to.c, t),\n        l: number(from.l, to.l, t),\n        alpha: number(from.alpha, to.alp
 ha, t)\n    };\n}\nvar lab = {\n    forward: rgbToLab,\n    reverse: labToRgb,\n    interpolate: interpolateLab\n};\nvar hcl = {\n    forward: rgbToHcl,\n    reverse: hclToRgb,\n    interpolate: interpolateHcl\n};\n\nvar colorSpaces = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  lab: lab,\n  hcl: hcl\n});\n\nvar Interpolate = function Interpolate(type, operator, interpolation, input, stops) {\n    this.type = type;\n    this.operator = operator;\n    this.interpolation = interpolation;\n    this.input = input;\n    this.labels = [];\n    this.outputs = [];\n    for (var i = 0, list = stops; i < list.length; i += 1) {\n        var ref = list[i];\n        var label = ref[0];\n        var expression = ref[1];\n        this.labels.push(label);\n        this.outputs.push(expression);\n    }\n};\nInterpolate.interpolationFactor = function interpolationFactor(interpolation, input, lower, upper) {\n    var t = 0;\n    if (interpolation.name === 'exponential') {\n        t = exponenti
 alInterpolation(input, interpolation.base, lower, upper);\n    } else if (interpolation.name === 'linear') {\n        t = exponentialInterpolation(input, 1, lower, upper);\n    } else if (interpolation.name === 'cubic-bezier') {\n        var c = interpolation.controlPoints;\n        var ub = new unitbezier(c[0], c[1], c[2], c[3]);\n        t = ub.solve(exponentialInterpolation(input, 1, lower, upper));\n    }\n    return t;\n};\nInterpolate.parse = function parse(args, context) {\n    var operator = args[0];\n    var interpolation = args[1];\n    var input = args[2];\n    var rest = args.slice(3);\n    if (!Array.isArray(interpolation) || interpolation.length === 0) {\n        return context.error('Expected an interpolation type expression.', 1);\n    }\n    if (interpolation[0] === 'linear') {\n        interpolation = { name: 'linear' };\n    } else if (interpolation[0] === 'exponential') {\n        var base = interpolation[1];\n        if (typeof base !== 'number') {\n            
 return context.error('Exponential interpolation requires a numeric base.', 1, 1);\n        }\n        interpolation = {\n            name: 'exponential',\n            base: base\n        };\n    } else if (interpolation[0] === 'cubic-bezier') {\n        var controlPoints = interpolation.slice(1);\n        if (controlPoints.length !== 4 || controlPoints.some(function (t) {\n                return typeof t !== 'number' || t < 0 || t > 1;\n            })) {\n            return context.error('Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.', 1);\n        }\n        interpolation = {\n            name: 'cubic-bezier',\n            controlPoints: controlPoints\n        };\n    } else {\n        return context.error('Unknown interpolation type ' + String(interpolation[0]), 1, 0);\n    }\n    if (args.length - 1 < 4) {\n        return context.error('Expected at least 4 arguments, but found only ' + (args.length - 1) + '.');\n    }\n    if ((args.lengt
 h - 1) % 2 !== 0) {\n        return context.error('Expected an even number of arguments.');\n    }\n    input = context.parse(input, 2, NumberType);\n    if (!input) {\n        return null;\n    }\n    var stops = [];\n    var outputType = null;\n    if (operator === 'interpolate-hcl' || operator === 'interpolate-lab') {\n        outputType = ColorType;\n    } else if (context.expectedType && context.expectedType.kind !== 'value') {\n        outputType = context.expectedType;\n    }\n    for (var i = 0; i < rest.length; i += 2) {\n        var label = rest[i];\n        var value = rest[i + 1];\n        var labelKey = i + 3;\n        var valueKey = i + 4;\n        if (typeof label !== 'number') {\n            return context.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n        }\n        if (stops.length && stops[stops.length - 1][0] >= label) {\n            return c
 ontext.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n        }\n        var parsed = context.parse(value, valueKey, outputType);\n        if (!parsed) {\n            return null;\n        }\n        outputType = outputType || parsed.type;\n        stops.push([\n            label,\n            parsed\n        ]);\n    }\n    if (outputType.kind !== 'number' && outputType.kind !== 'color' && !(outputType.kind === 'array' && outputType.itemType.kind === 'number' && typeof outputType.N === 'number')) {\n        return context.error('Type ' + toString(outputType) + ' is not interpolatable.');\n    }\n    return new Interpolate(outputType, operator, interpolation, input, stops);\n};\nInterpolate.prototype.evaluate = function evaluate(ctx) {\n    var labels = this.labels;\n    var outputs = this.outputs;\n    if (labels.length === 1) {\n        return outputs[0].evaluate(ctx);\n    }\n    var value = 
 this.input.evaluate(ctx);\n    if (value <= labels[0]) {\n        return outputs[0].evaluate(ctx);\n    }\n    var stopCount = labels.length;\n    if (value >= labels[stopCount - 1]) {\n        return outputs[stopCount - 1].evaluate(ctx);\n    }\n    var index = findStopLessThanOrEqualTo(labels, value);\n    var lower = labels[index];\n    var upper = labels[index + 1];\n    var t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper);\n    var outputLower = outputs[index].evaluate(ctx);\n    var outputUpper = outputs[index + 1].evaluate(ctx);\n    if (this.operator === 'interpolate') {\n        return interpolate[this.type.kind.toLowerCase()](outputLower, outputUpper, t);\n    } else if (this.operator === 'interpolate-hcl') {\n        return hcl.reverse(hcl.interpolate(hcl.forward(outputLower), hcl.forward(outputUpper), t));\n    } else {\n        return lab.reverse(lab.interpolate(lab.forward(outputLower), lab.forward(outputUpper), t));\n    }\n};\nInterpolate.
 prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n    for (var i = 0, list = this.outputs; i < list.length; i += 1) {\n        var expression = list[i];\n        fn(expression);\n    }\n};\nInterpolate.prototype.outputDefined = function outputDefined() {\n    return this.outputs.every(function (out) {\n        return out.outputDefined();\n    });\n};\nInterpolate.prototype.serialize = function serialize() {\n    var interpolation;\n    if (this.interpolation.name === 'linear') {\n        interpolation = ['linear'];\n    } else if (this.interpolation.name === 'exponential') {\n        if (this.interpolation.base === 1) {\n            interpolation = ['linear'];\n        } else {\n            interpolation = [\n                'exponential',\n                this.interpolation.base\n            ];\n        }\n    } else {\n        interpolation = ['cubic-bezier'].concat(this.interpolation.controlPoints);\n    }\n    var serialized = [\n        this.operator,\n      
   interpolation,\n        this.input.serialize()\n    ];\n    for (var i = 0; i < this.labels.length; i++) {\n        serialized.push(this.labels[i], this.outputs[i].serialize());\n    }\n    return serialized;\n};\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n    var difference = upperValue - lowerValue;\n    var progress = input - lowerValue;\n    if (difference === 0) {\n        return 0;\n    } else if (base === 1) {\n        return progress / difference;\n    } else {\n        return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n    }\n}\n\nvar Coalesce = function Coalesce(type, args) {\n    this.type = type;\n    this.args = args;\n};\nCoalesce.parse = function parse(args, context) {\n    if (args.length < 2) {\n        return context.error('Expectected at least one argument.');\n    }\n    var outputType = null;\n    var expectedType = context.expectedType;\n    if (expectedType && expectedType.kind !== 'value') {\n        ou
 tputType = expectedType;\n    }\n    var parsedArgs = [];\n    for (var i = 0, list = args.slice(1); i < list.length; i += 1) {\n        var arg = list[i];\n        var parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, { typeAnnotation: 'omit' });\n        if (!parsed) {\n            return null;\n        }\n        outputType = outputType || parsed.type;\n        parsedArgs.push(parsed);\n    }\n    var needsAnnotation = expectedType && parsedArgs.some(function (arg) {\n        return checkSubtype(expectedType, arg.type);\n    });\n    return needsAnnotation ? new Coalesce(ValueType, parsedArgs) : new Coalesce(outputType, parsedArgs);\n};\nCoalesce.prototype.evaluate = function evaluate(ctx) {\n    var result = null;\n    var argCount = 0;\n    var requestedImageName;\n    for (var i = 0, list = this.args; i < list.length; i += 1) {\n        var arg = list[i];\n        argCount++;\n        result = arg.evaluate(ctx);\n        if (result && result instanceof 
 ResolvedImage && !result.available) {\n            if (!requestedImageName) {\n                requestedImageName = result.name;\n            }\n            result = null;\n            if (argCount === this.args.length) {\n                result = requestedImageName;\n            }\n        }\n        if (result !== null) {\n            break;\n        }\n    }\n    return result;\n};\nCoalesce.prototype.eachChild = function eachChild(fn) {\n    this.args.forEach(fn);\n};\nCoalesce.prototype.outputDefined = function outputDefined() {\n    return this.args.every(function (arg) {\n        return arg.outputDefined();\n    });\n};\nCoalesce.prototype.serialize = function serialize() {\n    var serialized = ['coalesce'];\n    this.eachChild(function (child) {\n        serialized.push(child.serialize());\n    });\n    return serialized;\n};\n\nvar Let = function Let(bindings, result) {\n    this.type = result.type;\n    this.bindings = [].concat(bindings);\n    this.result = result;\n};\n
 Let.prototype.evaluate = function evaluate(ctx) {\n    return this.result.evaluate(ctx);\n};\nLet.prototype.eachChild = function eachChild(fn) {\n    for (var i = 0, list = this.bindings; i < list.length; i += 1) {\n        var binding = list[i];\n        fn(binding[1]);\n    }\n    fn(this.result);\n};\nLet.parse = function parse(args, context) {\n    if (args.length < 4) {\n        return context.error('Expected at least 3 arguments, but found ' + (args.length - 1) + ' instead.');\n    }\n    var bindings = [];\n    for (var i = 1; i < args.length - 1; i += 2) {\n        var name = args[i];\n        if (typeof name !== 'string') {\n            return context.error('Expected string, but found ' + typeof name + ' instead.', i);\n        }\n        if (/[^a-zA-Z0-9_]/.test(name)) {\n            return context.error('Variable names must contain only alphanumeric characters or \\'_\\'.', i);\n        }\n        var value = context.parse(args[i + 1], i + 1);\n        if (!value) {\n    
         return null;\n        }\n        bindings.push([\n            name,\n            value\n        ]);\n    }\n    var result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n    if (!result) {\n        return null;\n    }\n    return new Let(bindings, result);\n};\nLet.prototype.outputDefined = function outputDefined() {\n    return this.result.outputDefined();\n};\nLet.prototype.serialize = function serialize() {\n    var serialized = ['let'];\n    for (var i = 0, list = this.bindings; i < list.length; i += 1) {\n        var ref = list[i];\n        var name = ref[0];\n        var expr = ref[1];\n        serialized.push(name, expr.serialize());\n    }\n    serialized.push(this.result.serialize());\n    return serialized;\n};\n\nvar At = function At(type, index, input) {\n    this.type = type;\n    this.index = index;\n    this.input = input;\n};\nAt.parse = function parse(args, context) {\n    if (args.length !== 3) {\n        return co
 ntext.error('Expected 2 arguments, but found ' + (args.length - 1) + ' instead.');\n    }\n    var index = context.parse(args[1], 1, NumberType);\n    var input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n    if (!index || !input) {\n        return null;\n    }\n    var t = input.type;\n    return new At(t.itemType, index, input);\n};\nAt.prototype.evaluate = function evaluate(ctx) {\n    var index = this.index.evaluate(ctx);\n    var array = this.input.evaluate(ctx);\n    if (index < 0) {\n        throw new RuntimeError('Array index out of bounds: ' + index + ' < 0.');\n    }\n    if (index >= array.length) {\n        throw new RuntimeError('Array index out of bounds: ' + index + ' > ' + (array.length - 1) + '.');\n    }\n    if (index !== Math.floor(index)) {\n        throw new RuntimeError('Array index must be an integer, but found ' + index + ' instead.');\n    }\n    return array[index];\n};\nAt.prototype.eachChild = function eachChild(fn) {\n    fn(
 this.index);\n    fn(this.input);\n};\nAt.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nAt.prototype.serialize = function serialize() {\n    return [\n        'at',\n        this.index.serialize(),\n        this.input.serialize()\n    ];\n};\n\nvar In = function In(needle, haystack) {\n    this.type = BooleanType;\n    this.needle = needle;\n    this.haystack = haystack;\n};\nIn.parse = function parse(args, context) {\n    if (args.length !== 3) {\n        return context.error('Expected 2 arguments, but found ' + (args.length - 1) + ' instead.');\n    }\n    var needle = context.parse(args[1], 1, ValueType);\n    var haystack = context.parse(args[2], 2, ValueType);\n    if (!needle || !haystack) {\n        return null;\n    }\n    if (!isValidType(needle.type, [\n            BooleanType,\n            StringType,\n            NumberType,\n            NullType,\n            ValueType\n        ])) {\n        return context.error('Expected first argument t
 o be of type boolean, string, number or null, but found ' + toString(needle.type) + ' instead');\n    }\n    return new In(needle, haystack);\n};\nIn.prototype.evaluate = function evaluate(ctx) {\n    var needle = this.needle.evaluate(ctx);\n    var haystack = this.haystack.evaluate(ctx);\n    if (!haystack) {\n        return false;\n    }\n    if (!isValidNativeType(needle, [\n            'boolean',\n            'string',\n            'number',\n            'null'\n        ])) {\n        throw new RuntimeError('Expected first argument to be of type boolean, string, number or null, but found ' + toString(typeOf(needle)) + ' instead.');\n    }\n    if (!isValidNativeType(haystack, [\n            'string',\n            'array'\n        ])) {\n        throw new RuntimeError('Expected second argument to be of type array or string, but found ' + toString(typeOf(haystack)) + ' instead.');\n    }\n    return haystack.indexOf(needle) >= 0;\n};\nIn.prototype.eachChild = function eachChild(fn
 ) {\n    fn(this.needle);\n    fn(this.haystack);\n};\nIn.prototype.outputDefined = function outputDefined() {\n    return true;\n};\nIn.prototype.serialize = function serialize() {\n    return [\n        'in',\n        this.needle.serialize(),\n        this.haystack.serialize()\n    ];\n};\n\nvar IndexOf = function IndexOf(needle, haystack, fromIndex) {\n    this.type = NumberType;\n    this.needle = needle;\n    this.haystack = haystack;\n    this.fromIndex = fromIndex;\n};\nIndexOf.parse = function parse(args, context) {\n    if (args.length <= 2 || args.length >= 5) {\n        return context.error('Expected 3 or 4 arguments, but found ' + (args.length - 1) + ' instead.');\n    }\n    var needle = context.parse(args[1], 1, ValueType);\n    var haystack = context.parse(args[2], 2, ValueType);\n    if (!needle || !haystack) {\n        return null;\n    }\n    if (!isValidType(needle.type, [\n            BooleanType,\n            StringType,\n            NumberType,\n            Nul
 lType,\n            ValueType\n        ])) {\n        return context.error('Expected first argument to be of type boolean, string, number or null, but found ' + toString(needle.type) + ' instead');\n    }\n    if (args.length === 4) {\n        var fromIndex = context.parse(args[3], 3, NumberType);\n        if (!fromIndex) {\n            return null;\n        }\n        return new IndexOf(needle, haystack, fromIndex);\n    } else {\n        return new IndexOf(needle, haystack);\n    }\n};\nIndexOf.prototype.evaluate = function evaluate(ctx) {\n    var needle = this.needle.evaluate(ctx);\n    var haystack = this.haystack.evaluate(ctx);\n    if (!isValidNativeType(needle, [\n            'boolean',\n            'string',\n            'number',\n            'null'\n        ])) {\n        throw new RuntimeError('Expected first argument to be of type boolean, string, number or null, but found ' + toString(typeOf(needle)) + ' instead.');\n    }\n    if (!isValidNativeType(haystack, [\n     
        'string',\n            'array'\n        ])) {\n        throw new RuntimeError('Expected second argument to be of type array or string, but found ' + toString(typeOf(haystack)) + ' instead.');\n    }\n    if (this.fromIndex) {\n        var fromIndex = this.fromIndex.evaluate(ctx);\n        return haystack.indexOf(needle, fromIndex);\n    }\n    return haystack.indexOf(needle);\n};\nIndexOf.prototype.eachChild = function eachChild(fn) {\n    fn(this.needle);\n    fn(this.haystack);\n    if (this.fromIndex) {\n        fn(this.fromIndex);\n    }\n};\nIndexOf.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nIndexOf.prototype.serialize = function serialize() {\n    if (this.fromIndex != null && this.fromIndex !== undefined) {\n        var fromIndex = this.fromIndex.serialize();\n        return [\n            'index-of',\n            this.needle.serialize(),\n            this.haystack.serialize(),\n            fromIndex\n        ];\n    }\n    return [\n 
        'index-of',\n        this.needle.serialize(),\n        this.haystack.serialize()\n    ];\n};\n\nvar Match = function Match(inputType, outputType, input, cases, outputs, otherwise) {\n    this.inputType = inputType;\n    this.type = outputType;\n    this.input = input;\n    this.cases = cases;\n    this.outputs = outputs;\n    this.otherwise = otherwise;\n};\nMatch.parse = function parse(args, context) {\n    if (args.length < 5) {\n        return context.error('Expected at least 4 arguments, but found only ' + (args.length - 1) + '.');\n    }\n    if (args.length % 2 !== 1) {\n        return context.error('Expected an even number of arguments.');\n    }\n    var inputType;\n    var outputType;\n    if (context.expectedType && context.expectedType.kind !== 'value') {\n        outputType = context.expectedType;\n    }\n    var cases = {};\n    var outputs = [];\n    for (var i = 2; i < args.length - 1; i += 2) {\n        var labels = args[i];\n        var value = args[i + 1];\n
         if (!Array.isArray(labels)) {\n            labels = [labels];\n        }\n        var labelContext = context.concat(i);\n        if (labels.length === 0) {\n            return labelContext.error('Expected at least one branch label.');\n        }\n        for (var i$1 = 0, list = labels; i$1 < list.length; i$1 += 1) {\n            var label = list[i$1];\n            if (typeof label !== 'number' && typeof label !== 'string') {\n                return labelContext.error('Branch labels must be numbers or strings.');\n            } else if (typeof label === 'number' && Math.abs(label) > Number.MAX_SAFE_INTEGER) {\n                return labelContext.error('Branch labels must be integers no larger than ' + Number.MAX_SAFE_INTEGER + '.');\n            } else if (typeof label === 'number' && Math.floor(label) !== label) {\n                return labelContext.error('Numeric branch labels must be integer values.');\n            } else if (!inputType) {\n                inputType = ty
 peOf(label);\n            } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n                return null;\n            }\n            if (typeof cases[String(label)] !== 'undefined') {\n                return labelContext.error('Branch labels must be unique.');\n            }\n            cases[String(label)] = outputs.length;\n        }\n        var result = context.parse(value, i, outputType);\n        if (!result) {\n            return null;\n        }\n        outputType = outputType || result.type;\n        outputs.push(result);\n    }\n    var input = context.parse(args[1], 1, ValueType);\n    if (!input) {\n        return null;\n    }\n    var otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n    if (!otherwise) {\n        return null;\n    }\n    if (input.type.kind !== 'value' && context.concat(1).checkSubtype(inputType, input.type)) {\n        return null;\n    }\n    return new Match(inputType, outputType, input, cases, output
 s, otherwise);\n};\nMatch.prototype.evaluate = function evaluate(ctx) {\n    var input = this.input.evaluate(ctx);\n    var output = typeOf(input) === this.inputType && this.outputs[this.cases[input]] || this.otherwise;\n    return output.evaluate(ctx);\n};\nMatch.prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n    this.outputs.forEach(fn);\n    fn(this.otherwise);\n};\nMatch.prototype.outputDefined = function outputDefined() {\n    return this.outputs.every(function (out) {\n        return out.outputDefined();\n    }) && this.otherwise.outputDefined();\n};\nMatch.prototype.serialize = function serialize() {\n    var this$1 = this;\n    var serialized = [\n        'match',\n        this.input.serialize()\n    ];\n    var sortedLabels = Object.keys(this.cases).sort();\n    var groupedByOutput = [];\n    var outputLookup = {};\n    for (var i = 0, list = sortedLabels; i < list.length; i += 1) {\n        var label = list[i];\n        var outputIndex = outputLookup[
 this.cases[label]];\n        if (outputIndex === undefined) {\n            outputLookup[this.cases[label]] = groupedByOutput.length;\n            groupedByOutput.push([\n                this.cases[label],\n                [label]\n            ]);\n        } else {\n            groupedByOutput[outputIndex][1].push(label);\n        }\n    }\n    var coerceLabel = function (label) {\n        return this$1.inputType.kind === 'number' ? Number(label) : label;\n    };\n    for (var i$1 = 0, list$1 = groupedByOutput; i$1 < list$1.length; i$1 += 1) {\n        var ref = list$1[i$1];\n        var outputIndex = ref[0];\n        var labels = ref[1];\n        if (labels.length === 1) {\n            serialized.push(coerceLabel(labels[0]));\n        } else {\n            serialized.push(labels.map(coerceLabel));\n        }\n        serialized.push(this.outputs[outputIndex$1].serialize());\n    }\n    serialized.push(this.otherwise.serialize());\n    return serialized;\n};\n\nvar Case = function Ca
 se(type, branches, otherwise) {\n    this.type = type;\n    this.branches = branches;\n    this.otherwise = otherwise;\n};\nCase.parse = function parse(args, context) {\n    if (args.length < 4) {\n        return context.error('Expected at least 3 arguments, but found only ' + (args.length - 1) + '.');\n    }\n    if (args.length % 2 !== 0) {\n        return context.error('Expected an odd number of arguments.');\n    }\n    var outputType;\n    if (context.expectedType && context.expectedType.kind !== 'value') {\n        outputType = context.expectedType;\n    }\n    var branches = [];\n    for (var i = 1; i < args.length - 1; i += 2) {\n        var test = context.parse(args[i], i, BooleanType);\n        if (!test) {\n            return null;\n        }\n        var result = context.parse(args[i + 1], i + 1, outputType);\n        if (!result) {\n            return null;\n        }\n        branches.push([\n            test,\n            result\n        ]);\n        outputType = outp
 utType || result.type;\n    }\n    var otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n    if (!otherwise) {\n        return null;\n    }\n    return new Case(outputType, branches, otherwise);\n};\nCase.prototype.evaluate = function evaluate(ctx) {\n    for (var i = 0, list = this.branches; i < list.length; i += 1) {\n        var ref = list[i];\n        var test = ref[0];\n        var expression = ref[1];\n        if (test.evaluate(ctx)) {\n            return expression.evaluate(ctx);\n        }\n    }\n    return this.otherwise.evaluate(ctx);\n};\nCase.prototype.eachChild = function eachChild(fn) {\n    for (var i = 0, list = this.branches; i < list.length; i += 1) {\n        var ref = list[i];\n        var test = ref[0];\n        var expression = ref[1];\n        fn(test);\n        fn(expression);\n    }\n    fn(this.otherwise);\n};\nCase.prototype.outputDefined = function outputDefined() {\n    return this.branches.every(function (ref) {\n        v
 ar _ = ref[0];\n        var out = ref[1];\n        return out.outputDefined();\n    }) && this.otherwise.outputDefined();\n};\nCase.prototype.serialize = function serialize() {\n    var serialized = ['case'];\n    this.eachChild(function (child) {\n        serialized.push(child.serialize());\n    });\n    return serialized;\n};\n\nvar Slice = function Slice(type, input, beginIndex, endIndex) {\n    this.type = type;\n    this.input = input;\n    this.beginIndex = beginIndex;\n    this.endIndex = endIndex;\n};\nSlice.parse = function parse(args, context) {\n    if (args.length <= 2 || args.length >= 5) {\n        return context.error('Expected 3 or 4 arguments, but found ' + (args.length - 1) + ' instead.');\n    }\n    var input = context.parse(args[1], 1, ValueType);\n    var beginIndex = context.parse(args[2], 2, NumberType);\n    if (!input || !beginIndex) {\n        return null;\n    }\n    if (!isValidType(input.type, [\n            array(ValueType),\n            StringType,\n 
            ValueType\n        ])) {\n        return context.error('Expected first argument to be of type array or string, but found ' + toString(input.type) + ' instead');\n    }\n    if (args.length === 4) {\n        var endIndex = context.parse(args[3], 3, NumberType);\n        if (!endIndex) {\n            return null;\n        }\n        return new Slice(input.type, input, beginIndex, endIndex);\n    } else {\n        return new Slice(input.type, input, beginIndex);\n    }\n};\nSlice.prototype.evaluate = function evaluate(ctx) {\n    var input = this.input.evaluate(ctx);\n    var beginIndex = this.beginIndex.evaluate(ctx);\n    if (!isValidNativeType(input, [\n            'string',\n            'array'\n        ])) {\n        throw new RuntimeError('Expected first argument to be of type array or string, but found ' + toString(typeOf(input)) + ' instead.');\n    }\n    if (this.endIndex) {\n        var endIndex = this.endIndex.evaluate(ctx);\n        return input.slice(beginIndex
 , endIndex);\n    }\n    return input.slice(beginIndex);\n};\nSlice.prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n    fn(this.beginIndex);\n    if (this.endIndex) {\n        fn(this.endIndex);\n    }\n};\nSlice.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nSlice.prototype.serialize = function serialize() {\n    if (this.endIndex != null && this.endIndex !== undefined) {\n        var endIndex = this.endIndex.serialize();\n        return [\n            'slice',\n            this.input.serialize(),\n            this.beginIndex.serialize(),\n            endIndex\n        ];\n    }\n    return [\n        'slice',\n        this.input.serialize(),\n        this.beginIndex.serialize()\n    ];\n};\n\nfunction isComparableType(op, type) {\n    if (op === '==' || op === '!=') {\n        return type.kind === 'boolean' || type.kind === 'string' || type.kind === 'number' || type.kind === 'null' || type.kind === 'value';\n    } else {\n        
 return type.kind === 'string' || type.kind === 'number' || type.kind === 'value';\n    }\n}\nfunction eq(ctx, a, b) {\n    return a === b;\n}\nfunction neq(ctx, a, b) {\n    return a !== b;\n}\nfunction lt(ctx, a, b) {\n    return a < b;\n}\nfunction gt(ctx, a, b) {\n    return a > b;\n}\nfunction lteq(ctx, a, b) {\n    return a <= b;\n}\nfunction gteq(ctx, a, b) {\n    return a >= b;\n}\nfunction eqCollate(ctx, a, b, c) {\n    return c.compare(a, b) === 0;\n}\nfunction neqCollate(ctx, a, b, c) {\n    return !eqCollate(ctx, a, b, c);\n}\nfunction ltCollate(ctx, a, b, c) {\n    return c.compare(a, b) < 0;\n}\nfunction gtCollate(ctx, a, b, c) {\n    return c.compare(a, b) > 0;\n}\nfunction lteqCollate(ctx, a, b, c) {\n    return c.compare(a, b) <= 0;\n}\nfunction gteqCollate(ctx, a, b, c) {\n    return c.compare(a, b) >= 0;\n}\nfunction makeComparison(op, compareBasic, compareWithCollator) {\n    var isOrderComparison = op !== '==' && op !== '!=';\n    return function () {\n        fu
 nction Comparison(lhs, rhs, collator) {\n            this.type = BooleanType;\n            this.lhs = lhs;\n            this.rhs = rhs;\n            this.collator = collator;\n            this.hasUntypedArgument = lhs.type.kind === 'value' || rhs.type.kind === 'value';\n        }\n        Comparison.parse = function parse(args, context) {\n            if (args.length !== 3 && args.length !== 4) {\n                return context.error('Expected two or three arguments.');\n            }\n            var op = args[0];\n            var lhs = context.parse(args[1], 1, ValueType);\n            if (!lhs) {\n                return null;\n            }\n            if (!isComparableType(op, lhs.type)) {\n                return context.concat(1).error('\"' + op + '\" comparisons are not supported for type \\'' + toString(lhs.type) + '\\'.');\n            }\n            var rhs = context.parse(args[2], 2, ValueType);\n            if (!rhs) {\n                return null;\n            }\n      
       if (!isComparableType(op, rhs.type)) {\n                return context.concat(2).error('\"' + op + '\" comparisons are not supported for type \\'' + toString(rhs.type) + '\\'.');\n            }\n            if (lhs.type.kind !== rhs.type.kind && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') {\n                return context.error('Cannot compare types \\'' + toString(lhs.type) + '\\' and \\'' + toString(rhs.type) + '\\'.');\n            }\n            if (isOrderComparison) {\n                if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n                    lhs = new Assertion(rhs.type, [lhs]);\n                } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n                    rhs = new Assertion(lhs.type, [rhs]);\n                }\n            }\n            var collator = null;\n            if (args.length === 4) {\n                if (lhs.type.kind !== 'string' && rhs.type.kind !== 'string' && lhs.type.kind !== 'value' && r
 hs.type.kind !== 'value') {\n                    return context.error('Cannot use collator to compare non-string types.');\n                }\n                collator = context.parse(args[3], 3, CollatorType);\n                if (!collator) {\n                    return null;\n                }\n            }\n            return new Comparison(lhs, rhs, collator);\n        };\n        Comparison.prototype.evaluate = function evaluate(ctx) {\n            var lhs = this.lhs.evaluate(ctx);\n            var rhs = this.rhs.evaluate(ctx);\n            if (isOrderComparison && this.hasUntypedArgument) {\n                var lt = typeOf(lhs);\n                var rt = typeOf(rhs);\n                if (lt.kind !== rt.kind || !(lt.kind === 'string' || lt.kind === 'number')) {\n                    throw new RuntimeError('Expected arguments for \"' + op + '\" to be (string, string) or (number, number), but found (' + lt.kind + ', ' + rt.kind + ') instead.');\n                }\n            }\
 n            if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n                var lt$1 = typeOf(lhs);\n                var rt$1 = typeOf(rhs);\n                if (lt$1.kind !== 'string' || rt$1.kind !== 'string') {\n                    return compareBasic(ctx, lhs, rhs);\n                }\n            }\n            return this.collator ? compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) : compareBasic(ctx, lhs, rhs);\n        };\n        Comparison.prototype.eachChild = function eachChild(fn) {\n            fn(this.lhs);\n            fn(this.rhs);\n            if (this.collator) {\n                fn(this.collator);\n            }\n        };\n        Comparison.prototype.outputDefined = function outputDefined() {\n            return true;\n        };\n        Comparison.prototype.serialize = function serialize() {\n            var serialized = [op];\n            this.eachChild(function (child) {\n                serialized.push(child.serialize
 ());\n            });\n            return serialized;\n        };\n        return Comparison;\n    }();\n}\nvar Equals = makeComparison('==', eq, eqCollate);\nvar NotEquals = makeComparison('!=', neq, neqCollate);\nvar LessThan = makeComparison('<', lt, ltCollate);\nvar GreaterThan = makeComparison('>', gt, gtCollate);\nvar LessThanOrEqual = makeComparison('<=', lteq, lteqCollate);\nvar GreaterThanOrEqual = makeComparison('>=', gteq, gteqCollate);\n\nvar NumberFormat = function NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits) {\n    this.type = StringType;\n    this.number = number;\n    this.locale = locale;\n    this.currency = currency;\n    this.minFractionDigits = minFractionDigits;\n    this.maxFractionDigits = maxFractionDigits;\n};\nNumberFormat.parse = function parse(args, context) {\n    if (args.length !== 3) {\n        return context.error('Expected two arguments.');\n    }\n    var number = context.parse(args[1], 1, NumberType);\n    if (!num
 ber) {\n        return null;\n    }\n    var options = args[2];\n    if (typeof options !== 'object' || Array.isArray(options)) {\n        return context.error('NumberFormat options argument must be an object.');\n    }\n    var locale = null;\n    if (options['locale']) {\n        locale = context.parse(options['locale'], 1, StringType);\n        if (!locale) {\n            return null;\n        }\n    }\n    var currency = null;\n    if (options['currency']) {\n        currency = context.parse(options['currency'], 1, StringType);\n        if (!currency) {\n            return null;\n        }\n    }\n    var minFractionDigits = null;\n    if (options['min-fraction-digits']) {\n        minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n        if (!minFractionDigits) {\n            return null;\n        }\n    }\n    var maxFractionDigits = null;\n    if (options['max-fraction-digits']) {\n        maxFractionDigits = context.parse(options['max-fractio
 n-digits'], 1, NumberType);\n        if (!maxFractionDigits) {\n            return null;\n        }\n    }\n    return new NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits);\n};\nNumberFormat.prototype.evaluate = function evaluate(ctx) {\n    return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [], {\n        style: this.currency ? 'currency' : 'decimal',\n        currency: this.currency ? this.currency.evaluate(ctx) : undefined,\n        minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(ctx) : undefined,\n        maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : undefined\n    }).format(this.number.evaluate(ctx));\n};\nNumberFormat.prototype.eachChild = function eachChild(fn) {\n    fn(this.number);\n    if (this.locale) {\n        fn(this.locale);\n    }\n    if (this.currency) {\n        fn(this.currency);\n    }\n    if (this.minFractionDigits) {\n        fn(this.minFr
 actionDigits);\n    }\n    if (this.maxFractionDigits) {\n        fn(this.maxFractionDigits);\n    }\n};\nNumberFormat.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nNumberFormat.prototype.serialize = function serialize() {\n    var options = {};\n    if (this.locale) {\n        options['locale'] = this.locale.serialize();\n    }\n    if (this.currency) {\n        options['currency'] = this.currency.serialize();\n    }\n    if (this.minFractionDigits) {\n        options['min-fraction-digits'] = this.minFractionDigits.serialize();\n    }\n    if (this.maxFractionDigits) {\n        options['max-fraction-digits'] = this.maxFractionDigits.serialize();\n    }\n    return [\n        'number-format',\n        this.number.serialize(),\n        options\n    ];\n};\n\nvar Length = function Length(input) {\n    this.type = NumberType;\n    this.input = input;\n};\nLength.parse = function parse(args, context) {\n    if (args.length !== 2) {\n        return context.
 error('Expected 1 argument, but found ' + (args.length - 1) + ' instead.');\n    }\n    var input = context.parse(args[1], 1);\n    if (!input) {\n        return null;\n    }\n    if (input.type.kind !== 'array' && input.type.kind !== 'string' && input.type.kind !== 'value') {\n        return context.error('Expected argument of type string or array, but found ' + toString(input.type) + ' instead.');\n    }\n    return new Length(input);\n};\nLength.prototype.evaluate = function evaluate(ctx) {\n    var input = this.input.evaluate(ctx);\n    if (typeof input === 'string') {\n        return input.length;\n    } else if (Array.isArray(input)) {\n        return input.length;\n    } else {\n        throw new RuntimeError('Expected value to be of type string or array, but found ' + toString(typeOf(input)) + ' instead.');\n    }\n};\nLength.prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n};\nLength.prototype.outputDefined = function outputDefined() {\n    return false;
 \n};\nLength.prototype.serialize = function serialize() {\n    var serialized = ['length'];\n    this.eachChild(function (child) {\n        serialized.push(child.serialize());\n    });\n    return serialized;\n};\n\nvar expressions = {\n    '==': Equals,\n    '!=': NotEquals,\n    '>': GreaterThan,\n    '<': LessThan,\n    '>=': GreaterThanOrEqual,\n    '<=': LessThanOrEqual,\n    'array': Assertion,\n    'at': At,\n    'boolean': Assertion,\n    'case': Case,\n    'coalesce': Coalesce,\n    'collator': CollatorExpression,\n    'format': FormatExpression,\n    'image': ImageExpression,\n    'in': In,\n    'index-of': IndexOf,\n    'interpolate': Interpolate,\n    'interpolate-hcl': Interpolate,\n    'interpolate-lab': Interpolate,\n    'length': Length,\n    'let': Let,\n    'literal': Literal,\n    'match': Match,\n    'number': Assertion,\n    'number-format': NumberFormat,\n    'object': Assertion,\n    'slice': Slice,\n    'step': Step,\n    'string': Assertion,\n    'to-boolean
 ': Coercion,\n    'to-color': Coercion,\n    'to-number': Coercion,\n    'to-string': Coercion,\n    'var': Var,\n    'within': Within\n};\nfunction rgba(ctx, ref) {\n    var r = ref[0];\n    var g = ref[1];\n    var b = ref[2];\n    var a = ref[3];\n    r = r.evaluate(ctx);\n    g = g.evaluate(ctx);\n    b = b.evaluate(ctx);\n    var alpha = a ? a.evaluate(ctx) : 1;\n    var error = validateRGBA(r, g, b, alpha);\n    if (error) {\n        throw new RuntimeError(error);\n    }\n    return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\nfunction has(key, obj) {\n    return key in obj;\n}\nfunction get(key, obj) {\n    var v = obj[key];\n    return typeof v === 'undefined' ? null : v;\n}\nfunction binarySearch(v, a, i, j) {\n    while (i <= j) {\n        var m = i + j >> 1;\n        if (a[m] === v) {\n            return true;\n        }\n        if (a[m] > v) {\n            j = m - 1;\n        } else {\n            i = m + 1;\n        }\n    }\n    return fals
 e;\n}\nfunction varargs(type) {\n    return { type: type };\n}\nCompoundExpression.register(expressions, {\n    'error': [\n        ErrorType,\n        [StringType],\n        function (ctx, ref) {\n            var v = ref[0];\n            throw new RuntimeError(v.evaluate(ctx));\n        }\n    ],\n    'typeof': [\n        StringType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n            return toString(typeOf(v.evaluate(ctx)));\n        }\n    ],\n    'to-rgba': [\n        array(NumberType, 4),\n        [ColorType],\n        function (ctx, ref) {\n            var v = ref[0];\n            return v.evaluate(ctx).toArray();\n        }\n    ],\n    'rgb': [\n        ColorType,\n        [\n            NumberType,\n            NumberType,\n            NumberType\n        ],\n        rgba\n    ],\n    'rgba': [\n        ColorType,\n        [\n            NumberType,\n            NumberType,\n            NumberType,\n            NumberType\n        
 ],\n        rgba\n    ],\n    'has': {\n        type: BooleanType,\n        overloads: [\n            [\n                [StringType],\n                function (ctx, ref) {\n                    var key = ref[0];\n                    return has(key.evaluate(ctx), ctx.properties());\n                }\n            ],\n            [\n                [\n                    StringType,\n                    ObjectType\n                ],\n                function (ctx, ref) {\n                    var key = ref[0];\n                    var obj = ref[1];\n                    return has(key.evaluate(ctx), obj.evaluate(ctx));\n                }\n            ]\n        ]\n    },\n    'get': {\n        type: ValueType,\n        overloads: [\n            [\n                [StringType],\n                function (ctx, ref) {\n                    var key = ref[0];\n                    return get(key.evaluate(ctx), ctx.properties());\n                }\n            ],\n            [\n            
     [\n                    StringType,\n                    ObjectType\n                ],\n                function (ctx, ref) {\n                    var key = ref[0];\n                    var obj = ref[1];\n                    return get(key.evaluate(ctx), obj.evaluate(ctx));\n                }\n            ]\n        ]\n    },\n    'feature-state': [\n        ValueType,\n        [StringType],\n        function (ctx, ref) {\n            var key = ref[0];\n            return get(key.evaluate(ctx), ctx.featureState || {});\n        }\n    ],\n    'properties': [\n        ObjectType,\n        [],\n        function (ctx) {\n            return ctx.properties();\n        }\n    ],\n    'geometry-type': [\n        StringType,\n        [],\n        function (ctx) {\n            return ctx.geometryType();\n        }\n    ],\n    'id': [\n        ValueType,\n        [],\n        function (ctx) {\n            return ctx.id();\n        }\n    ],\n    'zoom': [\n        NumberType,\n        []
 ,\n        function (ctx) {\n            return ctx.globals.zoom;\n        }\n    ],\n    'heatmap-density': [\n        NumberType,\n        [],\n        function (ctx) {\n            return ctx.globals.heatmapDensity || 0;\n        }\n    ],\n    'line-progress': [\n        NumberType,\n        [],\n        function (ctx) {\n            return ctx.globals.lineProgress || 0;\n        }\n    ],\n    'accumulated': [\n        ValueType,\n        [],\n        function (ctx) {\n            return ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated;\n        }\n    ],\n    '+': [\n        NumberType,\n        varargs(NumberType),\n        function (ctx, args) {\n            var result = 0;\n            for (var i = 0, list = args; i < list.length; i += 1) {\n                var arg = list[i];\n                result += arg.evaluate(ctx);\n            }\n            return result;\n        }\n    ],\n    '*': [\n        NumberType,\n        varargs(NumberType),\n       
  function (ctx, args) {\n            var result = 1;\n            for (var i = 0, list = args; i < list.length; i += 1) {\n                var arg = list[i];\n                result *= arg.evaluate(ctx);\n            }\n            return result;\n        }\n    ],\n    '-': {\n        type: NumberType,\n        overloads: [\n            [\n                [\n                    NumberType,\n                    NumberType\n                ],\n                function (ctx, ref) {\n                    var a = ref[0];\n                    var b = ref[1];\n                    return a.evaluate(ctx) - b.evaluate(ctx);\n                }\n            ],\n            [\n                [NumberType],\n                function (ctx, ref) {\n                    var a = ref[0];\n                    return -a.evaluate(ctx);\n                }\n            ]\n        ]\n    },\n    '/': [\n        NumberType,\n        [\n            NumberType,\n            NumberType\n        ],\n        funct
 ion (ctx, ref) {\n            var a = ref[0];\n            var b = ref[1];\n            return a.evaluate(ctx) / b.evaluate(ctx);\n        }\n    ],\n    '%': [\n        NumberType,\n        [\n            NumberType,\n            NumberType\n        ],\n        function (ctx, ref) {\n            var a = ref[0];\n            var b = ref[1];\n            return a.evaluate(ctx) % b.evaluate(ctx);\n        }\n    ],\n    'ln2': [\n        NumberType,\n        [],\n        function () {\n            return Math.LN2;\n        }\n    ],\n    'pi': [\n        NumberType,\n        [],\n        function () {\n            return Math.PI;\n        }\n    ],\n    'e': [\n        NumberType,\n        [],\n        function () {\n            return Math.E;\n        }\n    ],\n    '^': [\n        NumberType,\n        [\n            NumberType,\n            NumberType\n        ],\n        function (ctx, ref) {\n            var b = ref[0];\n            var e = ref[1];\n            return Math.pow(b.e
 valuate(ctx), e.evaluate(ctx));\n        }\n    ],\n    'sqrt': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var x = ref[0];\n            return Math.sqrt(x.evaluate(ctx));\n        }\n    ],\n    'log10': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.log(n.evaluate(ctx)) / Math.LN10;\n        }\n    ],\n    'ln': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.log(n.evaluate(ctx));\n        }\n    ],\n    'log2': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.log(n.evaluate(ctx)) / Math.LN2;\n        }\n    ],\n    'sin': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.sin(n.evaluate(ctx));\n        }\n    ],
 \n    'cos': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.cos(n.evaluate(ctx));\n        }\n    ],\n    'tan': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.tan(n.evaluate(ctx));\n        }\n    ],\n    'asin': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.asin(n.evaluate(ctx));\n        }\n    ],\n    'acos': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.acos(n.evaluate(ctx));\n        }\n    ],\n    'atan': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.atan(n.evaluate(ctx));\n        }\n    ],\n    'min': [\n        NumberType,\n        varargs(NumberType),\n    
     function (ctx, args) {\n            return Math.min.apply(Math, args.map(function (arg) {\n                return arg.evaluate(ctx);\n            }));\n        }\n    ],\n    'max': [\n        NumberType,\n        varargs(NumberType),\n        function (ctx, args) {\n            return Math.max.apply(Math, args.map(function (arg) {\n                return arg.evaluate(ctx);\n            }));\n        }\n    ],\n    'abs': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.abs(n.evaluate(ctx));\n        }\n    ],\n    'round': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            var v = n.evaluate(ctx);\n            return v < 0 ? -Math.round(-v) : Math.round(v);\n        }\n    ],\n    'floor': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.floor(n.eval
 uate(ctx));\n        }\n    ],\n    'ceil': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.ceil(n.evaluate(ctx));\n        }\n    ],\n    'filter-==': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            return ctx.properties()[k.value] === v.value;\n        }\n    ],\n    'filter-id-==': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n            return ctx.id() === v.value;\n        }\n    ],\n    'filter-type-==': [\n        BooleanType,\n        [StringType],\n        function (ctx, ref) {\n            var v = ref[0];\n            return ctx.geometryType() === v.value;\n        }\n    ],\n    'filter-<': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],
 \n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            var a = ctx.properties()[k.value];\n            var b = v.value;\n            return typeof a === typeof b && a < b;\n        }\n    ],\n    'filter-id-<': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n            var a = ctx.id();\n            var b = v.value;\n            return typeof a === typeof b && a < b;\n        }\n    ],\n    'filter->': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            var a = ctx.properties()[k.value];\n            var b = v.value;\n            return typeof a === typeof b && a > b;\n        }\n    ],\n    'filter-id->': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n            var a = ctx
 .id();\n            var b = v.value;\n            return typeof a === typeof b && a > b;\n        }\n    ],\n    'filter-<=': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            var a = ctx.properties()[k.value];\n            var b = v.value;\n            return typeof a === typeof b && a <= b;\n        }\n    ],\n    'filter-id-<=': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n            var a = ctx.id();\n            var b = v.value;\n            return typeof a === typeof b && a <= b;\n        }\n    ],\n    'filter->=': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            var a = ctx.properties()[k.value];\n            var b = v.valu
 e;\n            return typeof a === typeof b && a >= b;\n        }\n    ],\n    'filter-id->=': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n            var a = ctx.id();\n            var b = v.value;\n            return typeof a === typeof b && a >= b;\n        }\n    ],\n    'filter-has': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) {\n            var k = ref[0];\n            return k.value in ctx.properties();\n        }\n    ],\n    'filter-has-id': [\n        BooleanType,\n        [],\n        function (ctx) {\n            return ctx.id() !== null && ctx.id() !== undefined;\n        }\n    ],\n    'filter-type-in': [\n        BooleanType,\n        [array(StringType)],\n        function (ctx, ref) {\n            var v = ref[0];\n            return v.value.indexOf(ctx.geometryType()) >= 0;\n        }\n    ],\n    'filter-id-in': [\n        BooleanType,\n        [array(ValueType)],\n       
  function (ctx, ref) {\n            var v = ref[0];\n            return v.value.indexOf(ctx.id()) >= 0;\n        }\n    ],\n    'filter-in-small': [\n        BooleanType,\n        [\n            StringType,\n            array(ValueType)\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            return v.value.indexOf(ctx.properties()[k.value]) >= 0;\n        }\n    ],\n    'filter-in-large': [\n        BooleanType,\n        [\n            StringType,\n            array(ValueType)\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            return binarySearch(ctx.properties()[k.value], v.value, 0, v.value.length - 1);\n        }\n    ],\n    'all': {\n        type: BooleanType,\n        overloads: [\n            [\n                [\n                    BooleanType,\n                    BooleanType\n                ],\n                function (ctx, ref) {\n                   
  var a = ref[0];\n                    var b = ref[1];\n                    return a.evaluate(ctx) && b.evaluate(ctx);\n                }\n            ],\n            [\n                varargs(BooleanType),\n                function (ctx, args) {\n                    for (var i = 0, list = args; i < list.length; i += 1) {\n                        var arg = list[i];\n                        if (!arg.evaluate(ctx)) {\n                            return false;\n                        }\n                    }\n                    return true;\n                }\n            ]\n        ]\n    },\n    'any': {\n        type: BooleanType,\n        overloads: [\n            [\n                [\n                    BooleanType,\n                    BooleanType\n                ],\n                function (ctx, ref) {\n                    var a = ref[0];\n                    var b = ref[1];\n                    return a.evaluate(ctx) || b.evaluate(ctx);\n                }\n            ],\n
             [\n                varargs(BooleanType),\n                function (ctx, args) {\n                    for (var i = 0, list = args; i < list.length; i += 1) {\n                        var arg = list[i];\n                        if (arg.evaluate(ctx)) {\n                            return true;\n                        }\n                    }\n                    return false;\n                }\n            ]\n        ]\n    },\n    '!': [\n        BooleanType,\n        [BooleanType],\n        function (ctx, ref) {\n            var b = ref[0];\n            return !b.evaluate(ctx);\n        }\n    ],\n    'is-supported-script': [\n        BooleanType,\n        [StringType],\n        function (ctx, ref) {\n            var s = ref[0];\n            var isSupportedScript = ctx.globals && ctx.globals.isSupportedScript;\n            if (isSupportedScript) {\n                return isSupportedScript(s.evaluate(ctx));\n            }\n            return true;\n        }\n    ],\n 
    'upcase': [\n        StringType,\n        [StringType],\n        function (ctx, ref) {\n            var s = ref[0];\n            return s.evaluate(ctx).toUpperCase();\n        }\n    ],\n    'downcase': [\n        StringType,\n        [StringType],\n        function (ctx, ref) {\n            var s = ref[0];\n            return s.evaluate(ctx).toLowerCase();\n        }\n    ],\n    'concat': [\n        StringType,\n        varargs(ValueType),\n        function (ctx, args) {\n            return args.map(function (arg) {\n                return toString$1(arg.evaluate(ctx));\n            }).join('');\n        }\n    ],\n    'resolved-locale': [\n        StringType,\n        [CollatorType],\n        function (ctx, ref) {\n            var collator = ref[0];\n            return collator.evaluate(ctx).resolvedLocale();\n        }\n    ]\n});\n\nfunction success(value) {\n    return {\n        result: 'success',\n        value: value\n    };\n}\nfunction error(value) {\n    return {\n   
      result: 'error',\n        value: value\n    };\n}\n\nfunction supportsPropertyExpression(spec) {\n    return spec['property-type'] === 'data-driven' || spec['property-type'] === 'cross-faded-data-driven';\n}\nfunction supportsZoomExpression(spec) {\n    return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\nfunction supportsInterpolation(spec) {\n    return !!spec.expression && spec.expression.interpolated;\n}\n\nfunction getType(val) {\n    if (val instanceof Number) {\n        return 'number';\n    } else if (val instanceof String) {\n        return 'string';\n    } else if (val instanceof Boolean) {\n        return 'boolean';\n    } else if (Array.isArray(val)) {\n        return 'array';\n    } else if (val === null) {\n        return 'null';\n    } else {\n        return typeof val;\n    }\n}\n\nfunction isFunction$1(value) {\n    return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\nfunction identityFunction(x) {\n    re
 turn x;\n}\nfunction createFunction(parameters, propertySpec) {\n    var isColor = propertySpec.type === 'color';\n    var zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n    var featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n    var zoomDependent = zoomAndFeatureDependent || !featureDependent;\n    var type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');\n    if (isColor) {\n        parameters = extend({}, parameters);\n        if (parameters.stops) {\n            parameters.stops = parameters.stops.map(function (stop) {\n                return [\n                    stop[0],\n                    Color.parse(stop[1])\n                ];\n            });\n        }\n        if (parameters.default) {\n            parameters.default = Color.parse(parameters.default);\n        } else {\n            parameters.default = Color.parse(propertySpec.default);\n        }\n   
  }\n    if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) {\n        throw new Error('Unknown color space: ' + parameters.colorSpace);\n    }\n    var innerFun;\n    var hashedStops;\n    var categoricalKeyType;\n    if (type === 'exponential') {\n        innerFun = evaluateExponentialFunction;\n    } else if (type === 'interval') {\n        innerFun = evaluateIntervalFunction;\n    } else if (type === 'categorical') {\n        innerFun = evaluateCategoricalFunction;\n        hashedStops = Object.create(null);\n        for (var i = 0, list = parameters.stops; i < list.length; i += 1) {\n            var stop = list[i];\n            hashedStops[stop[0]] = stop[1];\n        }\n        categoricalKeyType = typeof parameters.stops[0][0];\n    } else if (type === 'identity') {\n        innerFun = evaluateIdentityFunction;\n    } else {\n        throw new Error('Unknown function type \"' + type + '\"');\n    }\n    if (zoomAndFeatureDepend
 ent) {\n        var featureFunctions = {};\n        var zoomStops = [];\n        for (var s = 0; s < parameters.stops.length; s++) {\n            var stop$1 = parameters.stops[s];\n            var zoom = stop$1[0].zoom;\n            if (featureFunctions[zoom] === undefined) {\n                featureFunctions[zoom] = {\n                    zoom: zoom,\n                    type: parameters.type,\n                    property: parameters.property,\n                    default: parameters.default,\n                    stops: []\n                };\n                zoomStops.push(zoom);\n            }\n            featureFunctions[zoom].stops.push([\n                stop$1[0].value,\n                stop$1[1]\n            ]);\n        }\n        var featureFunctionStops = [];\n        for (var i$1 = 0, list$1 = zoomStops; i$1 < list$1.length; i$1 += 1) {\n            var z = list$1[i$1];\n            featureFunctionStops.push([\n                featureFunctions[z].zoom,\n               
  createFunction(featureFunctions[z], propertySpec)\n            ]);\n        }\n        var interpolationType = { name: 'linear' };\n        return {\n            kind: 'composite',\n            interpolationType: interpolationType,\n            interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n            zoomStops: featureFunctionStops.map(function (s) {\n                return s[0];\n            }),\n            evaluate: function evaluate(ref, properties) {\n                var zoom = ref.zoom;\n                return evaluateExponentialFunction({\n                    stops: featureFunctionStops,\n                    base: parameters.base\n                }, propertySpec, zoom).evaluate(zoom, properties);\n            }\n        };\n    } else if (zoomDependent) {\n        var interpolationType$1 = type === 'exponential' ? {\n            name: 'exponential',\n            base: parameters.base !== undefined ? parameters.base : 1\n        } 
 : null;\n        return {\n            kind: 'camera',\n            interpolationType: interpolationType$1,\n            interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType$1),\n            zoomStops: parameters.stops.map(function (s) {\n                return s[0];\n            }),\n            evaluate: function (ref) {\n                var zoom = ref.zoom;\n                return innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType);\n            }\n        };\n    } else {\n        return {\n            kind: 'source',\n            evaluate: function evaluate(_, feature) {\n                var value = feature && feature.properties ? feature.properties[parameters.property] : undefined;\n                if (value === undefined) {\n                    return coalesce(parameters.default, propertySpec.default);\n                }\n                return innerFun(parameters, propertySpec, value, hashedStops, categoricalKeyType);\n
             }\n        };\n    }\n}\nfunction coalesce(a, b, c) {\n    if (a !== undefined) {\n        return a;\n    }\n    if (b !== undefined) {\n        return b;\n    }\n    if (c !== undefined) {\n        return c;\n    }\n}\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n    var evaluated = typeof input === keyType ? hashedStops[input] : undefined;\n    return coalesce(evaluated, parameters.default, propertySpec.default);\n}\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n    if (getType(input) !== 'number') {\n        return coalesce(parameters.default, propertySpec.default);\n    }\n    var n = parameters.stops.length;\n    if (n === 1) {\n        return parameters.stops[0][1];\n    }\n    if (input <= parameters.stops[0][0]) {\n        return parameters.stops[0][1];\n    }\n    if (input >= parameters.stops[n - 1][0]) {\n        return parameters.stops[n - 1][1];\n    }\n    var index = findStopLessThan
 OrEqualTo(parameters.stops.map(function (stop) {\n        return stop[0];\n    }), input);\n    return parameters.stops[index][1];\n}\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n    var base = parameters.base !== undefined ? parameters.base : 1;\n    if (getType(input) !== 'number') {\n        return coalesce(parameters.default, propertySpec.default);\n    }\n    var n = parameters.stops.length;\n    if (n === 1) {\n        return parameters.stops[0][1];\n    }\n    if (input <= parameters.stops[0][0]) {\n        return parameters.stops[0][1];\n    }\n    if (input >= parameters.stops[n - 1][0]) {\n        return parameters.stops[n - 1][1];\n    }\n    var index = findStopLessThanOrEqualTo(parameters.stops.map(function (stop) {\n        return stop[0];\n    }), input);\n    var t = interpolationFactor(input, base, parameters.stops[index][0], parameters.stops[index + 1][0]);\n    var outputLower = parameters.stops[index][1];\n    var outputUpper = parame
 ters.stops[index + 1][1];\n    var interp = interpolate[propertySpec.type] || identityFunction;\n    if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n        var colorspace = colorSpaces[parameters.colorSpace];\n        interp = function (a, b) {\n            return colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n        };\n    }\n    if (typeof outputLower.evaluate === 'function') {\n        return {\n            evaluate: function evaluate() {\n                var args = [], len = arguments.length;\n                while (len--)\n                    args[len] = arguments[len];\n                var evaluatedLower = outputLower.evaluate.apply(undefined, args);\n                var evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n                if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n                    return undefined;\n                }\n                return interp(evaluate
 dLower, evaluatedUpper, t);\n            }\n        };\n    }\n    return interp(outputLower, outputUpper, t);\n}\nfunction evaluateIdentityFunction(parameters, propertySpec, input) {\n    if (propertySpec.type === 'color') {\n        input = Color.parse(input);\n    } else if (propertySpec.type === 'formatted') {\n        input = Formatted.fromString(input.toString());\n    } else if (propertySpec.type === 'resolvedImage') {\n        input = ResolvedImage.fromString(input.toString());\n    } else if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {\n        input = undefined;\n    }\n    return coalesce(input, parameters.default, propertySpec.default);\n}\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n    var difference = upperValue - lowerValue;\n    var progress = input - lowerValue;\n    if (difference === 0) {\n        return 0;\n    } else if (base === 1) {\n        return progress / difference;\n  
   } else {\n        return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n    }\n}\n\nvar StyleExpression = function StyleExpression(expression, propertySpec) {\n    this.expression = expression;\n    this._warningHistory = {};\n    this._evaluator = new EvaluationContext();\n    this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null;\n    this._enumValues = propertySpec && propertySpec.type === 'enum' ? propertySpec.values : null;\n};\nStyleExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    this._evaluator.globals = globals;\n    this._evaluator.feature = feature;\n    this._evaluator.featureState = featureState;\n    this._evaluator.canonical = canonical;\n    this._evaluator.availableImages = availableImages || null;\n    this._evaluator.formattedSection = formattedSection;\n    return this.expression.evaluate(this._eva
 luator);\n};\nStyleExpression.prototype.evaluate = function evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    this._evaluator.globals = globals;\n    this._evaluator.feature = feature || null;\n    this._evaluator.featureState = featureState || null;\n    this._evaluator.canonical = canonical;\n    this._evaluator.availableImages = availableImages || null;\n    this._evaluator.formattedSection = formattedSection || null;\n    try {\n        var val = this.expression.evaluate(this._evaluator);\n        if (val === null || val === undefined || typeof val === 'number' && val !== val) {\n            return this._defaultValue;\n        }\n        if (this._enumValues && !(val in this._enumValues)) {\n            throw new RuntimeError('Expected value to be one of ' + Object.keys(this._enumValues).map(function (v) {\n                return JSON.stringify(v);\n            }).join(', ') + ', but found ' + JSON.stringify(val) + ' instead.');\n     
    }\n        return val;\n    } catch (e) {\n        if (!this._warningHistory[e.message]) {\n            this._warningHistory[e.message] = true;\n            if (typeof console !== 'undefined') {\n                console.warn(e.message);\n            }\n        }\n        return this._defaultValue;\n    }\n};\nfunction isExpression(expression) {\n    return Array.isArray(expression) && expression.length > 0 && typeof expression[0] === 'string' && expression[0] in expressions;\n}\nfunction createExpression(expression, propertySpec) {\n    var parser = new ParsingContext(expressions, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n    var parsed = parser.parse(expression, undefined, undefined, undefined, propertySpec && propertySpec.type === 'string' ? { typeAnnotation: 'coerce' } : undefined);\n    if (!parsed) {\n        return error(parser.errors);\n    }\n    return success(new StyleExpression(parsed, propertySpec));\n}\nvar ZoomConstantExpression = function Zoom
 ConstantExpression(kind, expression) {\n    this.kind = kind;\n    this._styleExpression = expression;\n    this.isStateDependent = kind !== 'constant' && !isStateConstant(expression.expression);\n};\nZoomConstantExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n};\nZoomConstantExpression.prototype.evaluate = function evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n};\nvar ZoomDependentExpression = function ZoomDependentExpression(kind, expression, zoomStops, interpolationType) {\n    this.kind = kind;\n    this.zoomStops = zoomStops;\n    this._styleExpression = 
 expression;\n    this.isStateDependent = kind !== 'camera' && !isStateConstant(expression.expression);\n    this.interpolationType = interpolationType;\n};\nZoomDependentExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n};\nZoomDependentExpression.prototype.evaluate = function evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n};\nZoomDependentExpression.prototype.interpolationFactor = function interpolationFactor(input, lower, upper) {\n    if (this.interpolationType) {\n        return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n  
   } else {\n        return 0;\n    }\n};\nfunction createPropertyExpression(expression, propertySpec) {\n    expression = createExpression(expression, propertySpec);\n    if (expression.result === 'error') {\n        return expression;\n    }\n    var parsed = expression.value.expression;\n    var isFeatureConstant$1 = isFeatureConstant(parsed);\n    if (!isFeatureConstant$1 && !supportsPropertyExpression(propertySpec)) {\n        return error([new ParsingError('', 'data expressions not supported')]);\n    }\n    var isZoomConstant = isGlobalPropertyConstant(parsed, ['zoom']);\n    if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n        return error([new ParsingError('', 'zoom expressions not supported')]);\n    }\n    var zoomCurve = findZoomCurve(parsed);\n    if (!zoomCurve && !isZoomConstant) {\n        return error([new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')]);\n    } else if (zoo
 mCurve instanceof ParsingError) {\n        return error([zoomCurve]);\n    } else if (zoomCurve instanceof Interpolate && !supportsInterpolation(propertySpec)) {\n        return error([new ParsingError('', '\"interpolate\" expressions cannot be used with this property')]);\n    }\n    if (!zoomCurve) {\n        return success(isFeatureConstant$1 ? new ZoomConstantExpression('constant', expression.value) : new ZoomConstantExpression('source', expression.value));\n    }\n    var interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n    return success(isFeatureConstant$1 ? new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType) : new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType));\n}\nvar StylePropertyFunction = function StylePropertyFunction(parameters, specification) {\n    this._parameters = parameters;\n    this._specification = specification;\n    extend(this, 
 createFunction(this._parameters, this._specification));\n};\nStylePropertyFunction.deserialize = function deserialize(serialized) {\n    return new StylePropertyFunction(serialized._parameters, serialized._specification);\n};\nStylePropertyFunction.serialize = function serialize(input) {\n    return {\n        _parameters: input._parameters,\n        _specification: input._specification\n    };\n};\nfunction normalizePropertyExpression(value, specification) {\n    if (isFunction$1(value)) {\n        return new StylePropertyFunction(value, specification);\n    } else if (isExpression(value)) {\n        var expression = createPropertyExpression(value, specification);\n        if (expression.result === 'error') {\n            throw new Error(expression.value.map(function (err) {\n                return err.key + ': ' + err.message;\n            }).join(', '));\n        }\n        return expression.value;\n    } else {\n        var constant = value;\n        if (typeof value === 'string
 ' && specification.type === 'color') {\n            constant = Color.parse(value);\n        }\n        return {\n            kind: 'constant',\n            evaluate: function () {\n                return constant;\n            }\n        };\n    }\n}\nfunction findZoomCurve(expression) {\n    var result = null;\n    if (expression instanceof Let) {\n        result = findZoomCurve(expression.result);\n    } else if (expression instanceof Coalesce) {\n        for (var i = 0, list = expression.args; i < list.length; i += 1) {\n            var arg = list[i];\n            result = findZoomCurve(arg);\n            if (result) {\n                break;\n            }\n        }\n    } else if ((expression instanceof Step || expression instanceof Interpolate) && expression.input instanceof CompoundExpression && expression.input.name === 'zoom') {\n        result = expression;\n    }\n    if (result instanceof ParsingError) {\n        return result;\n    }\n    expression.eachChild(function 
 (child) {\n        var childResult = findZoomCurve(child);\n        if (childResult instanceof ParsingError) {\n            result = childResult;\n        } else if (!result && childResult) {\n            result = new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.');\n        } else if (result && childResult && result !== childResult) {\n            result = new ParsingError('', 'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.');\n        }\n    });\n    return result;\n}\nfunction getExpectedType(spec) {\n    var types = {\n        color: ColorType,\n        string: StringType,\n        number: NumberType,\n        enum: StringType,\n        boolean: BooleanType,\n        formatted: FormattedType,\n        resolvedImage: ResolvedImageType\n    };\n    if (spec.type === 'array') {\n        return array(types[spec.value] || ValueType, spec.length);\n    }\n    return ty
 pes[spec.type];\n}\nfunction getDefaultValue(spec) {\n    if (spec.type === 'color' && isFunction$1(spec.default)) {\n        return new Color(0, 0, 0, 0);\n    } else if (spec.type === 'color') {\n        return Color.parse(spec.default) || null;\n    } else if (spec.default === undefined) {\n        return null;\n    } else {\n        return spec.default;\n    }\n}\n\nfunction convertLiteral(value) {\n    return typeof value === 'object' ? [\n        'literal',\n        value\n    ] : value;\n}\nfunction convertFunction(parameters, propertySpec) {\n    var stops = parameters.stops;\n    if (!stops) {\n        return convertIdentityFunction(parameters, propertySpec);\n    }\n    var zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object';\n    var featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n    var zoomDependent = zoomAndFeatureDependent || !featureDependent;\n    stops = stops.map(function (stop) {\n        if (!featureDependent && 
 propertySpec.tokens && typeof stop[1] === 'string') {\n            return [\n                stop[0],\n                convertTokenString(stop[1])\n            ];\n        }\n        return [\n            stop[0],\n            convertLiteral(stop[1])\n        ];\n    });\n    if (zoomAndFeatureDependent) {\n        return convertZoomAndPropertyFunction(parameters, propertySpec, stops);\n    } else if (zoomDependent) {\n        return convertZoomFunction(parameters, propertySpec, stops);\n    } else {\n        return convertPropertyFunction(parameters, propertySpec, stops);\n    }\n}\nfunction convertIdentityFunction(parameters, propertySpec) {\n    var get = [\n        'get',\n        parameters.property\n    ];\n    if (parameters.default === undefined) {\n        return propertySpec.type === 'string' ? [\n            'string',\n            get\n        ] : get;\n    } else if (propertySpec.type === 'enum') {\n        return [\n            'match',\n            get,\n            Ob
 ject.keys(propertySpec.values),\n            get,\n            parameters.default\n        ];\n    } else {\n        var expression = [\n            propertySpec.type === 'color' ? 'to-color' : propertySpec.type,\n            get,\n            convertLiteral(parameters.default)\n        ];\n        if (propertySpec.type === 'array') {\n            expression.splice(1, 0, propertySpec.value, propertySpec.length || null);\n        }\n        return expression;\n    }\n}\nfunction getInterpolateOperator(parameters) {\n    switch (parameters.colorSpace) {\n    case 'hcl':\n        return 'interpolate-hcl';\n    case 'lab':\n        return 'interpolate-lab';\n    default:\n        return 'interpolate';\n    }\n}\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n    var featureFunctionParameters = {};\n    var featureFunctionStops = {};\n    var zoomStops = [];\n    for (var s = 0; s < stops.length; s++) {\n        var stop = stops[s];\n        var zoom = stop[0
 ].zoom;\n        if (featureFunctionParameters[zoom] === undefined) {\n            featureFunctionParameters[zoom] = {\n                zoom: zoom,\n                type: parameters.type,\n                property: parameters.property,\n                default: parameters.default\n            };\n            featureFunctionStops[zoom] = [];\n            zoomStops.push(zoom);\n        }\n        featureFunctionStops[zoom].push([\n            stop[0].value,\n            stop[1]\n        ]);\n    }\n    var functionType = getFunctionType({}, propertySpec);\n    if (functionType === 'exponential') {\n        var expression = [\n            getInterpolateOperator(parameters),\n            ['linear'],\n            ['zoom']\n        ];\n        for (var i = 0, list = zoomStops; i < list.length; i += 1) {\n            var z = list[i];\n            var output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n            appendStopPair(expression
 , z, output, false);\n        }\n        return expression;\n    } else {\n        var expression$1 = [\n            'step',\n            ['zoom']\n        ];\n        for (var i$1 = 0, list$1 = zoomStops; i$1 < list$1.length; i$1 += 1) {\n            var z$1 = list$1[i$1];\n            var output$1 = convertPropertyFunction(featureFunctionParameters[z$1], propertySpec, featureFunctionStops[z$1]);\n            appendStopPair(expression$1, z$1, output$1, true);\n        }\n        fixupDegenerateStepCurve(expression$1);\n        return expression$1;\n    }\n}\nfunction coalesce$1(a, b) {\n    if (a !== undefined) {\n        return a;\n    }\n    if (b !== undefined) {\n        return b;\n    }\n}\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n    var type = getFunctionType(parameters, propertySpec);\n    var get = [\n        'get',\n        parameters.property\n    ];\n    if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n        var expression
  = ['case'];\n        for (var i = 0, list = stops; i < list.length; i += 1) {\n            var stop = list[i];\n            expression.push([\n                '==',\n                get,\n                stop[0]\n            ], stop[1]);\n        }\n        expression.push(convertLiteral(coalesce$1(parameters.default, propertySpec.default)));\n        return expression;\n    } else if (type === 'categorical') {\n        var expression$1 = [\n            'match',\n            get\n        ];\n        for (var i$1 = 0, list$1 = stops; i$1 < list$1.length; i$1 += 1) {\n            var stop$1 = list$1[i$1];\n            appendStopPair(expression$1, stop$1[0], stop$1[1], false);\n        }\n        expression$1.push(convertLiteral(coalesce$1(parameters.default, propertySpec.default)));\n        return expression$1;\n    } else if (type === 'interval') {\n        var expression$2 = [\n            'step',\n            [\n                'number',\n                get\n            ]\n     
    ];\n        for (var i$2 = 0, list$2 = stops; i$2 < list$2.length; i$2 += 1) {\n            var stop$2 = list$2[i$2];\n            appendStopPair(expression$2, stop$2[0], stop$2[1], true);\n        }\n        fixupDegenerateStepCurve(expression$2);\n        return parameters.default === undefined ? expression$2 : [\n            'case',\n            [\n                '==',\n                [\n                    'typeof',\n                    get\n                ],\n                'number'\n            ],\n            expression$2,\n            convertLiteral(parameters.default)\n        ];\n    } else if (type === 'exponential') {\n        var base = parameters.base !== undefined ? parameters.base : 1;\n        var expression$3 = [\n            getInterpolateOperator(parameters),\n            base === 1 ? ['linear'] : [\n                'exponential',\n                base\n            ],\n            [\n                'number',\n                get\n            ]\n        ];
 \n        for (var i$3 = 0, list$3 = stops; i$3 < list$3.length; i$3 += 1) {\n            var stop$3 = list$3[i$3];\n            appendStopPair(expression$3, stop$3[0], stop$3[1], false);\n        }\n        return parameters.default === undefined ? expression$3 : [\n            'case',\n            [\n                '==',\n                [\n                    'typeof',\n                    get\n                ],\n                'number'\n            ],\n            expression$3,\n            convertLiteral(parameters.default)\n        ];\n    } else {\n        throw new Error('Unknown property function type ' + type);\n    }\n}\nfunction convertZoomFunction(parameters, propertySpec, stops, input) {\n    if (input === void 0)\n        input = ['zoom'];\n    var type = getFunctionType(parameters, propertySpec);\n    var expression;\n    var isStep = false;\n    if (type === 'interval') {\n        expression = [\n            'step',\n            input\n        ];\n        isStep 
 = true;\n    } else if (type === 'exponential') {\n        var base = parameters.base !== undefined ? parameters.base : 1;\n        expression = [\n            getInterpolateOperator(parameters),\n            base === 1 ? ['linear'] : [\n                'exponential',\n                base\n            ],\n            input\n        ];\n    } else {\n        throw new Error('Unknown zoom function type \"' + type + '\"');\n    }\n    for (var i = 0, list = stops; i < list.length; i += 1) {\n        var stop = list[i];\n        appendStopPair(expression, stop[0], stop[1], isStep);\n    }\n    fixupDegenerateStepCurve(expression);\n    return expression;\n}\nfunction fixupDegenerateStepCurve(expression) {\n    if (expression[0] === 'step' && expression.length === 3) {\n        expression.push(0);\n        expression.push(expression[3]);\n    }\n}\nfunction appendStopPair(curve, input, output, isStep) {\n    if (curve.length > 3 && input === curve[curve.length - 2]) {\n        return;\n
     }\n    if (!(isStep && curve.length === 2)) {\n        curve.push(input);\n    }\n    curve.push(output);\n}\nfunction getFunctionType(parameters, propertySpec) {\n    if (parameters.type) {\n        return parameters.type;\n    } else {\n        return propertySpec.expression.interpolated ? 'exponential' : 'interval';\n    }\n}\nfunction convertTokenString(s) {\n    var result = ['concat'];\n    var re = /{([^{}]+)}/g;\n    var pos = 0;\n    for (var match = re.exec(s); match !== null; match = re.exec(s)) {\n        var literal = s.slice(pos, re.lastIndex - match[0].length);\n        pos = re.lastIndex;\n        if (literal.length > 0) {\n            result.push(literal);\n        }\n        result.push([\n            'get',\n            match[1]\n        ]);\n    }\n    if (result.length === 1) {\n        return s;\n    }\n    if (pos < s.length) {\n        result.push(s.slice(pos));\n    } else if (result.length === 2) {\n        return [\n            'to-string',\n          
   result[1]\n        ];\n    }\n    return result;\n}\n\nfunction isExpressionFilter(filter) {\n    if (filter === true || filter === false) {\n        return true;\n    }\n    if (!Array.isArray(filter) || filter.length === 0) {\n        return false;\n    }\n    switch (filter[0]) {\n    case 'has':\n        return filter.length >= 2 && filter[1] !== '$id' && filter[1] !== '$type';\n    case 'in':\n        return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]));\n    case '!in':\n    case '!has':\n    case 'none':\n        return false;\n    case '==':\n    case '!=':\n    case '>':\n    case '>=':\n    case '<':\n    case '<=':\n        return filter.length !== 3 || (Array.isArray(filter[1]) || Array.isArray(filter[2]));\n    case 'any':\n    case 'all':\n        for (var i = 0, list = filter.slice(1); i < list.length; i += 1) {\n            var f = list[i];\n            if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n                retu
 rn false;\n            }\n        }\n        return true;\n    default:\n        return true;\n    }\n}\nvar filterSpec = {\n    'type': 'boolean',\n    'default': false,\n    'transition': false,\n    'property-type': 'data-driven',\n    'expression': {\n        'interpolated': false,\n        'parameters': [\n            'zoom',\n            'feature'\n        ]\n    }\n};\nfunction createFilter(filter) {\n    if (filter === null || filter === undefined) {\n        return {\n            filter: function () {\n                return true;\n            },\n            needGeometry: false\n        };\n    }\n    if (!isExpressionFilter(filter)) {\n        filter = convertFilter(filter);\n    }\n    var compiled = createExpression(filter, filterSpec);\n    if (compiled.result === 'error') {\n        throw new Error(compiled.value.map(function (err) {\n            return err.key + ': ' + err.message;\n        }).join(', '));\n    } else {\n        var needGeometry = geometryNeeded(filt
 er);\n        return {\n            filter: function (globalProperties, feature, canonical) {\n                return compiled.value.evaluate(globalProperties, feature, {}, canonical);\n            },\n            needGeometry: needGeometry\n        };\n    }\n}\nfunction compare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\nfunction geometryNeeded(filter) {\n    if (!Array.isArray(filter)) {\n        return false;\n    }\n    if (filter[0] === 'within') {\n        return true;\n    }\n    for (var index = 1; index < filter.length; index++) {\n        if (geometryNeeded(filter[index])) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction convertFilter(filter) {\n    if (!filter) {\n        return true;\n    }\n    var op = filter[0];\n    if (filter.length <= 1) {\n        return op !== 'any';\n    }\n    var converted = op === '==' ? convertComparisonOp(filter[1], filter[2], '==') : op === '!=' ? convertNegation(convertComparisonOp(filter[1], filter[2
 ], '==')) : op === '<' || op === '>' || op === '<=' || op === '>=' ? convertComparisonOp(filter[1], filter[2], op) : op === 'any' ? convertDisjunctionOp(filter.slice(1)) : op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter)) : op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter).map(convertNegation)) : op === 'in' ? convertInOp(filter[1], filter.slice(2)) : op === '!in' ? convertNegation(convertInOp(filter[1], filter.slice(2))) : op === 'has' ? convertHasOp(filter[1]) : op === '!has' ? convertNegation(convertHasOp(filter[1])) : op === 'within' ? filter : true;\n    return converted;\n}\nfunction convertComparisonOp(property, value, op) {\n    switch (property) {\n    case '$type':\n        return [\n            'filter-type-' + op,\n            value\n        ];\n    case '$id':\n        return [\n            'filter-id-' + op,\n            value\n        ];\n    default:\n        return [\n            'filter-' + op,\n            property,\n            val
 ue\n        ];\n    }\n}\nfunction convertDisjunctionOp(filters) {\n    return ['any'].concat(filters.map(convertFilter));\n}\nfunction convertInOp(property, values) {\n    if (values.length === 0) {\n        return false;\n    }\n    switch (property) {\n    case '$type':\n        return [\n            'filter-type-in',\n            [\n                'literal',\n                values\n            ]\n        ];\n    case '$id':\n        return [\n            'filter-id-in',\n            [\n                'literal',\n                values\n            ]\n        ];\n    default:\n        if (values.length > 200 && !values.some(function (v) {\n                return typeof v !== typeof values[0];\n            })) {\n            return [\n                'filter-in-large',\n                property,\n                [\n                    'literal',\n                    values.sort(compare)\n                ]\n            ];\n        } else {\n            return [\n                
 'filter-in-small',\n                property,\n                [\n                    'literal',\n                    values\n                ]\n            ];\n        }\n    }\n}\nfunction convertHasOp(property) {\n    switch (property) {\n    case '$type':\n        return true;\n    case '$id':\n        return ['filter-has-id'];\n    default:\n        return [\n            'filter-has',\n            property\n        ];\n    }\n}\nfunction convertNegation(filter) {\n    return [\n        '!',\n        filter\n    ];\n}\n\nfunction convertFilter$1(filter) {\n    return _convertFilter(filter, {});\n}\nfunction _convertFilter(filter, expectedTypes) {\n    var ref$1;\n    if (isExpressionFilter(filter)) {\n        return filter;\n    }\n    if (!filter) {\n        return true;\n    }\n    var op = filter[0];\n    if (filter.length <= 1) {\n        return op !== 'any';\n    }\n    var converted;\n    if (op === '==' || op === '!=' || op === '<' || op === '>' || op === '<=' || op === '
 >=') {\n        var ref = filter;\n        var property = ref[1];\n        var value = ref[2];\n        converted = convertComparisonOp$1(property, value, op, expectedTypes);\n    } else if (op === 'any') {\n        var children = filter.slice(1).map(function (f) {\n            var types = {};\n            var child = _convertFilter(f, types);\n            var typechecks = runtimeTypeChecks(types);\n            return typechecks === true ? child : [\n                'case',\n                typechecks,\n                child,\n                false\n            ];\n        });\n        return ['any'].concat(children);\n    } else if (op === 'all') {\n        var children$1 = filter.slice(1).map(function (f) {\n            return _convertFilter(f, expectedTypes);\n        });\n        return children$1.length > 1 ? ['all'].concat(children$1) : (ref$1 = []).concat.apply(ref$1, children$1);\n    } else if (op === 'none') {\n        return [\n            '!',\n            _convertFilter
 (['any'].concat(filter.slice(1)), {})\n        ];\n    } else if (op === 'in') {\n        converted = convertInOp$1(filter[1], filter.slice(2));\n    } else if (op === '!in') {\n        converted = convertInOp$1(filter[1], filter.slice(2), true);\n    } else if (op === 'has') {\n        converted = convertHasOp$1(filter[1]);\n    } else if (op === '!has') {\n        converted = [\n            '!',\n            convertHasOp$1(filter[1])\n        ];\n    } else {\n        converted = true;\n    }\n    return converted;\n}\nfunction runtimeTypeChecks(expectedTypes) {\n    var conditions = [];\n    for (var property in expectedTypes) {\n        var get = property === '$id' ? ['id'] : [\n            'get',\n            property\n        ];\n        conditions.push([\n            '==',\n            [\n                'typeof',\n                get\n            ],\n            expectedTypes[property]\n        ]);\n    }\n    if (conditions.length === 0) {\n        return true;\n    }\n    
 if (conditions.length === 1) {\n        return conditions[0];\n    }\n    return ['all'].concat(conditions);\n}\nfunction convertComparisonOp$1(property, value, op, expectedTypes) {\n    var get;\n    if (property === '$type') {\n        return [\n            op,\n            ['geometry-type'],\n            value\n        ];\n    } else if (property === '$id') {\n        get = ['id'];\n    } else {\n        get = [\n            'get',\n            property\n        ];\n    }\n    if (expectedTypes && value !== null) {\n        var type = typeof value;\n        expectedTypes[property] = type;\n    }\n    if (op === '==' && property !== '$id' && value === null) {\n        return [\n            'all',\n            [\n                'has',\n                property\n            ],\n            [\n                '==',\n                get,\n                null\n            ]\n        ];\n    } else if (op === '!=' && property !== '$id' && value === null) {\n        return [\n         
    'any',\n            [\n                '!',\n                [\n                    'has',\n                    property\n                ]\n            ],\n            [\n                '!=',\n                get,\n                null\n            ]\n        ];\n    }\n    return [\n        op,\n        get,\n        value\n    ];\n}\nfunction convertInOp$1(property, values, negate) {\n    if (negate === void 0)\n        negate = false;\n    if (values.length === 0) {\n        return negate;\n    }\n    var get;\n    if (property === '$type') {\n        get = ['geometry-type'];\n    } else if (property === '$id') {\n        get = ['id'];\n    } else {\n        get = [\n            'get',\n            property\n        ];\n    }\n    var uniformTypes = true;\n    var type = typeof values[0];\n    for (var i = 0, list = values; i < list.length; i += 1) {\n        var value = list[i];\n        if (typeof value !== type) {\n            uniformTypes = false;\n            break;\n  
       }\n    }\n    if (uniformTypes && (type === 'string' || type === 'number')) {\n        var uniqueValues = values.sort().filter(function (v, i) {\n            return i === 0 || values[i - 1] !== v;\n        });\n        return [\n            'match',\n            get,\n            uniqueValues,\n            !negate,\n            negate\n        ];\n    }\n    return [negate ? 'all' : 'any'].concat(values.map(function (v) {\n        return [\n            negate ? '!=' : '==',\n            get,\n            v\n        ];\n    }));\n}\nfunction convertHasOp$1(property) {\n    if (property === '$type') {\n        return true;\n    } else if (property === '$id') {\n        return [\n            '!=',\n            ['id'],\n            null\n        ];\n    } else {\n        return [\n            'has',\n            property\n        ];\n    }\n}\n\nfunction migrateToExpressions (style) {\n    var converted = [];\n    eachLayer(style, function (layer) {\n        if (layer.filter) {\n 
            layer.filter = convertFilter$1(layer.filter);\n        }\n    });\n    eachProperty(style, {\n        paint: true,\n        layout: true\n    }, function (ref) {\n        var path = ref.path;\n        var value = ref.value;\n        var reference = ref.reference;\n        var set = ref.set;\n        if (isExpression(value)) {\n            return;\n        }\n        if (typeof value === 'object' && !Array.isArray(value)) {\n            set(convertFunction(value, reference));\n            converted.push(path.join('.'));\n        } else if (reference.tokens && typeof value === 'string') {\n            set(convertTokenString(value));\n        }\n    });\n    return style;\n}\n\nfunction migrate (style) {\n    var migrated = false;\n    if (style.version === 7) {\n        style = migrateToV8(style);\n        migrated = true;\n    }\n    if (style.version === 8) {\n        migrated = migrateToExpressions(style);\n        migrated = true;\n    }\n    if (!migrated) {\n        t
 hrow new Error('cannot migrate from', style.version);\n    }\n    return style;\n}\n\nfunction composite (style) {\n    var styleIDs = [];\n    var sourceIDs = [];\n    var compositedSourceLayers = [];\n    for (var id in style.sources) {\n        var source = style.sources[id];\n        if (source.type !== 'vector') {\n            continue;\n        }\n        var match = /^mapbox:\\/\\/(.*)/.exec(source.url);\n        if (!match) {\n            continue;\n        }\n        styleIDs.push(id);\n        sourceIDs.push(match[1]);\n    }\n    if (styleIDs.length < 2) {\n        return style;\n    }\n    styleIDs.forEach(function (id) {\n        delete style.sources[id];\n    });\n    var compositeID = sourceIDs.join(',');\n    style.sources[compositeID] = {\n        'type': 'vector',\n        'url': 'mapbox://' + compositeID\n    };\n    style.layers.forEach(function (layer) {\n        if (styleIDs.indexOf(layer.source) >= 0) {\n            layer.source = compositeID;\n            if 
 ('source-layer' in layer) {\n                if (compositedSourceLayers.indexOf(layer['source-layer']) >= 0) {\n                    throw new Error('Conflicting source layer names');\n                } else {\n                    compositedSourceLayers.push(layer['source-layer']);\n                }\n            }\n        }\n    });\n    return style;\n}\n\nvar refProperties = [\n    'type',\n    'source',\n    'source-layer',\n    'minzoom',\n    'maxzoom',\n    'filter',\n    'layout'\n];\n\nfunction deref(layer, parent) {\n    var result = {};\n    for (var k in layer) {\n        if (k !== 'ref') {\n            result[k] = layer[k];\n        }\n    }\n    refProperties.forEach(function (k) {\n        if (k in parent) {\n            result[k] = parent[k];\n        }\n    });\n    return result;\n}\nfunction derefLayers(layers) {\n    layers = layers.slice();\n    var map = Object.create(null);\n    for (var i = 0; i < layers.length; i++) {\n        map[layers[i].id] = layers[i];\
 n    }\n    for (var i$1 = 0; i$1 < layers.length; i$1++) {\n        if ('ref' in layers[i$1]) {\n            layers[i$1] = deref(layers[i$1], map[layers[i$1].ref]);\n        }\n    }\n    return layers;\n}\n\nfunction deepEqual(a, b) {\n    if (Array.isArray(a)) {\n        if (!Array.isArray(b) || a.length !== b.length) {\n            return false;\n        }\n        for (var i = 0; i < a.length; i++) {\n            if (!deepEqual(a[i], b[i])) {\n                return false;\n            }\n        }\n        return true;\n    }\n    if (typeof a === 'object' && a !== null && b !== null) {\n        if (!(typeof b === 'object')) {\n            return false;\n        }\n        var keys = Object.keys(a);\n        if (keys.length !== Object.keys(b).length) {\n            return false;\n        }\n        for (var key in a) {\n            if (!deepEqual(a[key], b[key])) {\n                return false;\n            }\n        }\n        return true;\n    }\n    return a === b;\n}\n\n
 var operations = {\n    setStyle: 'setStyle',\n    addLayer: 'addLayer',\n    removeLayer: 'removeLayer',\n    setPaintProperty: 'setPaintProperty',\n    setLayoutProperty: 'setLayoutProperty',\n    setFilter: 'setFilter',\n    addSource: 'addSource',\n    removeSource: 'removeSource',\n    setGeoJSONSourceData: 'setGeoJSONSourceData',\n    setLayerZoomRange: 'setLayerZoomRange',\n    setLayerProperty: 'setLayerProperty',\n    setCenter: 'setCenter',\n    setZoom: 'setZoom',\n    setBearing: 'setBearing',\n    setPitch: 'setPitch',\n    setSprite: 'setSprite',\n    setGlyphs: 'setGlyphs',\n    setTransition: 'setTransition',\n    setLight: 'setLight'\n};\nfunction addSource(sourceId, after, commands) {\n    commands.push({\n        command: operations.addSource,\n        args: [\n            sourceId,\n            after[sourceId]\n        ]\n    });\n}\nfunction removeSource(sourceId, commands, sourcesRemoved) {\n    commands.push({\n        command: operations.removeSource,\n      
   args: [sourceId]\n    });\n    sourcesRemoved[sourceId] = true;\n}\nfunction updateSource(sourceId, after, commands, sourcesRemoved) {\n    removeSource(sourceId, commands, sourcesRemoved);\n    addSource(sourceId, after, commands);\n}\nfunction canUpdateGeoJSON(before, after, sourceId) {\n    var prop;\n    for (prop in before[sourceId]) {\n        if (!before[sourceId].hasOwnProperty(prop)) {\n            continue;\n        }\n        if (prop !== 'data' && !deepEqual(before[sourceId][prop], after[sourceId][prop])) {\n            return false;\n        }\n    }\n    for (prop in after[sourceId]) {\n        if (!after[sourceId].hasOwnProperty(prop)) {\n            continue;\n        }\n        if (prop !== 'data' && !deepEqual(before[sourceId][prop], after[sourceId][prop])) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction diffSources(before, after, commands, sourcesRemoved) {\n    before = before || {};\n    after = after || {};\n    var sourceId;\n  
   for (sourceId in before) {\n        if (!before.hasOwnProperty(sourceId)) {\n            continue;\n        }\n        if (!after.hasOwnProperty(sourceId)) {\n            removeSource(sourceId, commands, sourcesRemoved);\n        }\n    }\n    for (sourceId in after) {\n        if (!after.hasOwnProperty(sourceId)) {\n            continue;\n        }\n        if (!before.hasOwnProperty(sourceId)) {\n            addSource(sourceId, after, commands);\n        } else if (!deepEqual(before[sourceId], after[sourceId])) {\n            if (before[sourceId].type === 'geojson' && after[sourceId].type === 'geojson' && canUpdateGeoJSON(before, after, sourceId)) {\n                commands.push({\n                    command: operations.setGeoJSONSourceData,\n                    args: [\n                        sourceId,\n                        after[sourceId].data\n                    ]\n                });\n            } else {\n                updateSource(sourceId, after, commands, source
 sRemoved);\n            }\n        }\n    }\n}\nfunction diffLayerPropertyChanges(before, after, commands, layerId, klass, command) {\n    before = before || {};\n    after = after || {};\n    var prop;\n    for (prop in before) {\n        if (!before.hasOwnProperty(prop)) {\n            continue;\n        }\n        if (!deepEqual(before[prop], after[prop])) {\n            commands.push({\n                command: command,\n                args: [\n                    layerId,\n                    prop,\n                    after[prop],\n                    klass\n                ]\n            });\n        }\n    }\n    for (prop in after) {\n        if (!after.hasOwnProperty(prop) || before.hasOwnProperty(prop)) {\n            continue;\n        }\n        if (!deepEqual(before[prop], after[prop])) {\n            commands.push({\n                command: command,\n                args: [\n                    layerId,\n                    prop,\n                    after[prop],\n 
                    klass\n                ]\n            });\n        }\n    }\n}\nfunction pluckId(layer) {\n    return layer.id;\n}\nfunction indexById(group, layer) {\n    group[layer.id] = layer;\n    return group;\n}\nfunction diffLayers(before, after, commands) {\n    before = before || [];\n    after = after || [];\n    var beforeOrder = before.map(pluckId);\n    var afterOrder = after.map(pluckId);\n    var beforeIndex = before.reduce(indexById, {});\n    var afterIndex = after.reduce(indexById, {});\n    var tracker = beforeOrder.slice();\n    var clean = Object.create(null);\n    var i, d, layerId, beforeLayer, afterLayer, insertBeforeLayerId, prop;\n    for (i = 0, d = 0; i < beforeOrder.length; i++) {\n        layerId = beforeOrder[i];\n        if (!afterIndex.hasOwnProperty(layerId)) {\n            commands.push({\n                command: operations.removeLayer,\n                args: [layerId]\n            });\n            tracker.splice(tracker.indexOf(layerId, d), 1
 );\n        } else {\n            d++;\n        }\n    }\n    for (i = 0, d = 0; i < afterOrder.length; i++) {\n        layerId = afterOrder[afterOrder.length - 1 - i];\n        if (tracker[tracker.length - 1 - i] === layerId) {\n            continue;\n        }\n        if (beforeIndex.hasOwnProperty(layerId)) {\n            commands.push({\n                command: operations.removeLayer,\n                args: [layerId]\n            });\n            tracker.splice(tracker.lastIndexOf(layerId, tracker.length - d), 1);\n        } else {\n            d++;\n        }\n        insertBeforeLayerId = tracker[tracker.length - i];\n        commands.push({\n            command: operations.addLayer,\n            args: [\n                afterIndex[layerId],\n                insertBeforeLayerId\n            ]\n        });\n        tracker.splice(tracker.length - i, 0, layerId);\n        clean[layerId] = true;\n    }\n    for (i = 0; i < afterOrder.length; i++) {\n        layerId = afterOrder
 [i];\n        beforeLayer = beforeIndex[layerId];\n        afterLayer = afterIndex[layerId];\n        if (clean[layerId] || deepEqual(beforeLayer, afterLayer)) {\n            continue;\n        }\n        if (!deepEqual(beforeLayer.source, afterLayer.source) || !deepEqual(beforeLayer['source-layer'], afterLayer['source-layer']) || !deepEqual(beforeLayer.type, afterLayer.type)) {\n            commands.push({\n                command: operations.removeLayer,\n                args: [layerId]\n            });\n            insertBeforeLayerId = tracker[tracker.lastIndexOf(layerId) + 1];\n            commands.push({\n                command: operations.addLayer,\n                args: [\n                    afterLayer,\n                    insertBeforeLayerId\n                ]\n            });\n            continue;\n        }\n        diffLayerPropertyChanges(beforeLayer.layout, afterLayer.layout, commands, layerId, null, operations.setLayoutProperty);\n        diffLayerPropertyChanges(
 beforeLayer.paint, afterLayer.paint, commands, layerId, null, operations.setPaintProperty);\n        if (!deepEqual(beforeLayer.filter, afterLayer.filter)) {\n            commands.push({\n                command: operations.setFilter,\n                args: [\n                    layerId,\n                    afterLayer.filter\n                ]\n            });\n        }\n        if (!deepEqual(beforeLayer.minzoom, afterLayer.minzoom) || !deepEqual(beforeLayer.maxzoom, afterLayer.maxzoom)) {\n            commands.push({\n                command: operations.setLayerZoomRange,\n                args: [\n                    layerId,\n                    afterLayer.minzoom,\n                    afterLayer.maxzoom\n                ]\n            });\n        }\n        for (prop in beforeLayer) {\n            if (!beforeLayer.hasOwnProperty(prop)) {\n                continue;\n            }\n            if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata
 ' || prop === 'minzoom' || prop === 'maxzoom') {\n                continue;\n            }\n            if (prop.indexOf('paint.') === 0) {\n                diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n            } else if (!deepEqual(beforeLayer[prop], afterLayer[prop])) {\n                commands.push({\n                    command: operations.setLayerProperty,\n                    args: [\n                        layerId,\n                        prop,\n                        afterLayer[prop]\n                    ]\n                });\n            }\n        }\n        for (prop in afterLayer) {\n            if (!afterLayer.hasOwnProperty(prop) || beforeLayer.hasOwnProperty(prop)) {\n                continue;\n            }\n            if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom') {\n                continue;\n
             }\n            if (prop.indexOf('paint.') === 0) {\n                diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n            } else if (!deepEqual(beforeLayer[prop], afterLayer[prop])) {\n                commands.push({\n                    command: operations.setLayerProperty,\n                    args: [\n                        layerId,\n                        prop,\n                        afterLayer[prop]\n                    ]\n                });\n            }\n        }\n    }\n}\nfunction diffStyles(before, after) {\n    if (!before) {\n        return [{\n                command: operations.setStyle,\n                args: [after]\n            }];\n    }\n    var commands = [];\n    try {\n        if (!deepEqual(before.version, after.version)) {\n            return [{\n                    command: operations.setStyle,\n                    args: [after]\n                }];\n     
    }\n        if (!deepEqual(before.center, after.center)) {\n            commands.push({\n                command: operations.setCenter,\n                args: [after.center]\n            });\n        }\n        if (!deepEqual(before.zoom, after.zoom)) {\n            commands.push({\n                command: operations.setZoom,\n                args: [after.zoom]\n            });\n        }\n        if (!deepEqual(before.bearing, after.bearing)) {\n            commands.push({\n                command: operations.setBearing,\n                args: [after.bearing]\n            });\n        }\n        if (!deepEqual(before.pitch, after.pitch)) {\n            commands.push({\n                command: operations.setPitch,\n                args: [after.pitch]\n            });\n        }\n        if (!deepEqual(before.sprite, after.sprite)) {\n            commands.push({\n                command: operations.setSprite,\n                args: [after.sprite]\n            });\n        }\n    
     if (!deepEqual(before.glyphs, after.glyphs)) {\n            commands.push({\n                command: operations.setGlyphs,\n                args: [after.glyphs]\n            });\n        }\n        if (!deepEqual(before.transition, after.transition)) {\n            commands.push({\n                command: operations.setTransition,\n                args: [after.transition]\n            });\n        }\n        if (!deepEqual(before.light, after.light)) {\n            commands.push({\n                command: operations.setLight,\n                args: [after.light]\n            });\n        }\n        var sourcesRemoved = {};\n        var removeOrAddSourceCommands = [];\n        diffSources(before.sources, after.sources, removeOrAddSourceCommands, sourcesRemoved);\n        var beforeLayers = [];\n        if (before.layers) {\n            before.layers.forEach(function (layer) {\n                if (sourcesRemoved[layer.source]) {\n                    commands.push({\n           
              command: operations.removeLayer,\n                        args: [layer.id]\n                    });\n                } else {\n                    beforeLayers.push(layer);\n                }\n            });\n        }\n        commands = commands.concat(removeOrAddSourceCommands);\n        diffLayers(beforeLayers, after.layers, commands);\n    } catch (e) {\n        console.warn('Unable to compute style diff:', e);\n        commands = [{\n                command: operations.setStyle,\n                args: [after]\n            }];\n    }\n    return commands;\n}\n\nvar ValidationError = function ValidationError(key, value, message, identifier) {\n    this.message = (key ? key + ': ' : '') + message;\n    if (identifier) {\n        this.identifier = identifier;\n    }\n    if (value !== null && value !== undefined && value.__line__) {\n        this.line = value.__line__;\n    }\n};\n\nvar ParsingError$1 = function ParsingError(error) {\n    this.error = error;\n    thi
 s.message = error.message;\n    var match = error.message.match(/line (\\d+)/);\n    this.line = match ? parseInt(match[1], 10) : 0;\n};\n\nfunction validateConstants(options) {\n    var key = options.key;\n    var constants = options.value;\n    if (constants) {\n        return [new ValidationError(key, constants, 'constants have been deprecated as of v8')];\n    } else {\n        return [];\n    }\n}\n\nfunction unbundle(value) {\n    if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n        return value.valueOf();\n    } else {\n        return value;\n    }\n}\nfunction deepUnbundle(value) {\n    if (Array.isArray(value)) {\n        return value.map(deepUnbundle);\n    } else if (value instanceof Object && !(value instanceof Number || value instanceof String || value instanceof Boolean)) {\n        var unbundledValue = {};\n        for (var key in value) {\n            unbundledValue[key] = deepUnbundle(value[key]);\n        }\n        return 
 unbundledValue;\n    }\n    return unbundle(value);\n}\n\nfunction validateObject(options) {\n    var key = options.key;\n    var object = options.value;\n    var elementSpecs = options.valueSpec || {};\n    var elementValidators = options.objectElementValidators || {};\n    var style = options.style;\n    var styleSpec = options.styleSpec;\n    var errors = [];\n    var type = getType(object);\n    if (type !== 'object') {\n        return [new ValidationError(key, object, 'object expected, ' + type + ' found')];\n    }\n    for (var objectKey in object) {\n        var elementSpecKey = objectKey.split('.')[0];\n        var elementSpec = elementSpecs[elementSpecKey] || elementSpecs['*'];\n        var validateElement = void 0;\n        if (elementValidators[elementSpecKey]) {\n            validateElement = elementValidators[elementSpecKey];\n        } else if (elementSpecs[elementSpecKey]) {\n            validateElement = validate;\n        } else if (elementValidators['*']) {\n      
       validateElement = elementValidators['*'];\n        } else if (elementSpecs['*']) {\n            validateElement = validate;\n        } else {\n            errors.push(new ValidationError(key, object[objectKey], 'unknown property \"' + objectKey + '\"'));\n            continue;\n        }\n        errors = errors.concat(validateElement({\n            key: (key ? key + '.' : key) + objectKey,\n            value: object[objectKey],\n            valueSpec: elementSpec,\n            style: style,\n            styleSpec: styleSpec,\n            object: object,\n            objectKey: objectKey\n        }, object));\n    }\n    for (var elementSpecKey$1 in elementSpecs) {\n        if (elementValidators[elementSpecKey$1]) {\n            continue;\n        }\n        if (elementSpecs[elementSpecKey$1].required && elementSpecs[elementSpecKey$1]['default'] === undefined && object[elementSpecKey$1] === undefined) {\n            errors.push(new ValidationError(key, object, 'missing require
 d property \"' + elementSpecKey$1 + '\"'));\n        }\n    }\n    return errors;\n}\n\nfunction validateArray(options) {\n    var array = options.value;\n    var arraySpec = options.valueSpec;\n    var style = options.style;\n    var styleSpec = options.styleSpec;\n    var key = options.key;\n    var validateArrayElement = options.arrayElementValidator || validate;\n    if (getType(array) !== 'array') {\n        return [new ValidationError(key, array, 'array expected, ' + getType(array) + ' found')];\n    }\n    if (arraySpec.length && array.length !== arraySpec.length) {\n        return [new ValidationError(key, array, 'array length ' + arraySpec.length + ' expected, length ' + array.length + ' found')];\n    }\n    if (arraySpec['min-length'] && array.length < arraySpec['min-length']) {\n        return [new ValidationError(key, array, 'array length at least ' + arraySpec['min-length'] + ' expected, length ' + array.length + ' found')];\n    }\n    var arrayElementSpec = {\n      
   'type': arraySpec.value,\n        'values': arraySpec.values\n    };\n    if (styleSpec.$version < 7) {\n        arrayElementSpec.function = arraySpec.function;\n    }\n    if (getType(arraySpec.value) === 'object') {\n        arrayElementSpec = arraySpec.value;\n    }\n    var errors = [];\n    for (var i = 0; i < array.length; i++) {\n        errors = errors.concat(validateArrayElement({\n            array: array,\n            arrayIndex: i,\n            value: array[i],\n            valueSpec: arrayElementSpec,\n            style: style,\n            styleSpec: styleSpec,\n            key: key + '[' + i + ']'\n        }));\n    }\n    return errors;\n}\n\nfunction validateNumber(options) {\n    var key = options.key;\n    var value = options.value;\n    var valueSpec = options.valueSpec;\n    var type = getType(value);\n    if (type === 'number' && value !== value) {\n        type = 'NaN';\n    }\n    if (type !== 'number') {\n        return [new ValidationError(key, value, 'nu
 mber expected, ' + type + ' found')];\n    }\n    if ('minimum' in valueSpec && value < valueSpec.minimum) {\n        return [new ValidationError(key, value, value + ' is less than the minimum value ' + valueSpec.minimum)];\n    }\n    if ('maximum' in valueSpec && value > valueSpec.maximum) {\n        return [new ValidationError(key, value, value + ' is greater than the maximum value ' + valueSpec.maximum)];\n    }\n    return [];\n}\n\nfunction validateFunction(options) {\n    var functionValueSpec = options.valueSpec;\n    var functionType = unbundle(options.value.type);\n    var stopKeyType;\n    var stopDomainValues = {};\n    var previousStopDomainValue;\n    var previousStopDomainZoom;\n    var isZoomFunction = functionType !== 'categorical' && options.value.property === undefined;\n    var isPropertyFunction = !isZoomFunction;\n    var isZoomAndPropertyFunction = getType(options.value.stops) === 'array' && getType(options.value.stops[0]) === 'array' && getType(options.value.
 stops[0][0]) === 'object';\n    var errors = validateObject({\n        key: options.key,\n        value: options.value,\n        valueSpec: options.styleSpec.function,\n        style: options.style,\n        styleSpec: options.styleSpec,\n        objectElementValidators: {\n            stops: validateFunctionStops,\n            default: validateFunctionDefault\n        }\n    });\n    if (functionType === 'identity' && isZoomFunction) {\n        errors.push(new ValidationError(options.key, options.value, 'missing required property \"property\"'));\n    }\n    if (functionType !== 'identity' && !options.value.stops) {\n        errors.push(new ValidationError(options.key, options.value, 'missing required property \"stops\"'));\n    }\n    if (functionType === 'exponential' && options.valueSpec.expression && !supportsInterpolation(options.valueSpec)) {\n        errors.push(new ValidationError(options.key, options.value, 'exponential functions not supported'));\n    }\n    if (options.s
 tyleSpec.$version >= 8) {\n        if (isPropertyFunction && !supportsPropertyExpression(options.valueSpec)) {\n            errors.push(new ValidationError(options.key, options.value, 'property functions not supported'));\n        } else if (isZoomFunction && !supportsZoomExpression(options.valueSpec)) {\n            errors.push(new ValidationError(options.key, options.value, 'zoom functions not supported'));\n        }\n    }\n    if ((functionType === 'categorical' || isZoomAndPropertyFunction) && options.value.property === undefined) {\n        errors.push(new ValidationError(options.key, options.value, '\"property\" property is required'));\n    }\n    return errors;\n    function validateFunctionStops(options) {\n        if (functionType === 'identity') {\n            return [new ValidationError(options.key, options.value, 'identity function may not have a \"stops\" property')];\n        }\n        var errors = [];\n        var value = options.value;\n        errors = errors.co
 ncat(validateArray({\n            key: options.key,\n            value: value,\n            valueSpec: options.valueSpec,\n            style: options.style,\n            styleSpec: options.styleSpec,\n            arrayElementValidator: validateFunctionStop\n        }));\n        if (getType(value) === 'array' && value.length === 0) {\n            errors.push(new ValidationError(options.key, value, 'array must have at least one stop'));\n        }\n        return errors;\n    }\n    function validateFunctionStop(options) {\n        var errors = [];\n        var value = options.value;\n        var key = options.key;\n        if (getType(value) !== 'array') {\n            return [new ValidationError(key, value, 'array expected, ' + getType(value) + ' found')];\n        }\n        if (value.length !== 2) {\n            return [new ValidationError(key, value, 'array length 2 expected, length ' + value.length + ' found')];\n        }\n        if (isZoomAndPropertyFunction) {\n            
 if (getType(value[0]) !== 'object') {\n                return [new ValidationError(key, value, 'object expected, ' + getType(value[0]) + ' found')];\n            }\n            if (value[0].zoom === undefined) {\n                return [new ValidationError(key, value, 'object stop key must have zoom')];\n            }\n            if (value[0].value === undefined) {\n                return [new ValidationError(key, value, 'object stop key must have value')];\n            }\n            if (previousStopDomainZoom && previousStopDomainZoom > unbundle(value[0].zoom)) {\n                return [new ValidationError(key, value[0].zoom, 'stop zoom values must appear in ascending order')];\n            }\n            if (unbundle(value[0].zoom) !== previousStopDomainZoom) {\n                previousStopDomainZoom = unbundle(value[0].zoom);\n                previousStopDomainValue = undefined;\n                stopDomainValues = {};\n            }\n            errors = errors.concat(validate
 Object({\n                key: key + '[0]',\n                value: value[0],\n                valueSpec: { zoom: {} },\n                style: options.style,\n                styleSpec: options.styleSpec,\n                objectElementValidators: {\n                    zoom: validateNumber,\n                    value: validateStopDomainValue\n                }\n            }));\n        } else {\n            errors = errors.concat(validateStopDomainValue({\n                key: key + '[0]',\n                value: value[0],\n                valueSpec: {},\n                style: options.style,\n                styleSpec: options.styleSpec\n            }, value));\n        }\n        if (isExpression(deepUnbundle(value[1]))) {\n            return errors.concat([new ValidationError(key + '[1]', value[1], 'expressions are not allowed in function stops.')]);\n        }\n        return errors.concat(validate({\n            key: key + '[1]',\n            value: value[1],\n            val
 ueSpec: functionValueSpec,\n            style: options.style,\n            styleSpec: options.styleSpec\n        }));\n    }\n    function validateStopDomainValue(options, stop) {\n        var type = getType(options.value);\n        var value = unbundle(options.value);\n        var reportValue = options.value !== null ? options.value : stop;\n        if (!stopKeyType) {\n            stopKeyType = type;\n        } else if (type !== stopKeyType) {\n            return [new ValidationError(options.key, reportValue, type + ' stop domain type must match previous stop domain type ' + stopKeyType)];\n        }\n        if (type !== 'number' && type !== 'string' && type !== 'boolean') {\n            return [new ValidationError(options.key, reportValue, 'stop domain value must be a number, string, or boolean')];\n        }\n        if (type !== 'number' && functionType !== 'categorical') {\n            var message = 'number expected, ' + type + ' found';\n            if (supportsPropertyExpre
 ssion(functionValueSpec) && functionType === undefined) {\n                message += '\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.';\n            }\n            return [new ValidationError(options.key, reportValue, message)];\n        }\n        if (functionType === 'categorical' && type === 'number' && (!isFinite(value) || Math.floor(value) !== value)) {\n            return [new ValidationError(options.key, reportValue, 'integer expected, found ' + value)];\n        }\n        if (functionType !== 'categorical' && type === 'number' && previousStopDomainValue !== undefined && value < previousStopDomainValue) {\n            return [new ValidationError(options.key, reportValue, 'stop domain values must appear in ascending order')];\n        } else {\n            previousStopDomainValue = value;\n        }\n        if (functionType === 'categorical' && value in stopDomainValues) {\n            return [new ValidationError(options.key, reportVal
 ue, 'stop domain values must be unique')];\n        } else {\n            stopDomainValues[value] = true;\n        }\n        return [];\n    }\n    function validateFunctionDefault(options) {\n        return validate({\n            key: options.key,\n            value: options.value,\n            valueSpec: functionValueSpec,\n            style: options.style,\n            styleSpec: options.styleSpec\n        });\n    }\n}\n\nfunction validateExpression(options) {\n    var expression = (options.expressionContext === 'property' ? createPropertyExpression : createExpression)(deepUnbundle(options.value), options.valueSpec);\n    if (expression.result === 'error') {\n        return expression.value.map(function (error) {\n            return new ValidationError('' + options.key + error.key, options.value, error.message);\n        });\n    }\n    var expressionObj = expression.value.expression || expression.value._styleExpression.expression;\n    if (options.expressionContext === 'prope
 rty' && options.propertyKey === 'text-font' && !expressionObj.outputDefined()) {\n        return [new ValidationError(options.key, options.value, 'Invalid data expression for \"' + options.propertyKey + '\". Output values must be contained as literals within the expression.')];\n    }\n    if (options.expressionContext === 'property' && options.propertyType === 'layout' && !isStateConstant(expressionObj)) {\n        return [new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with layout properties.')];\n    }\n    if (options.expressionContext === 'filter' && !isStateConstant(expressionObj)) {\n        return [new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with filters.')];\n    }\n    if (options.expressionContext && options.expressionContext.indexOf('cluster') === 0) {\n        if (!isGlobalPropertyConstant(expressionObj, [\n                'zoom',\n                'feature-sta
 te'\n            ])) {\n            return [new ValidationError(options.key, options.value, '\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];\n        }\n        if (options.expressionContext === 'cluster-initial' && !isFeatureConstant(expressionObj)) {\n            return [new ValidationError(options.key, options.value, 'Feature data expressions are not supported with initial expression part of cluster properties.')];\n        }\n    }\n    return [];\n}\n\nfunction validateBoolean(options) {\n    var value = options.value;\n    var key = options.key;\n    var type = getType(value);\n    if (type !== 'boolean') {\n        return [new ValidationError(key, value, 'boolean expected, ' + type + ' found')];\n    }\n    return [];\n}\n\nfunction validateColor(options) {\n    var key = options.key;\n    var value = options.value;\n    var type = getType(value);\n    if (type !== 'string') {\n        return [new ValidationError(key, value, 'color ex
 pected, ' + type + ' found')];\n    }\n    if (csscolorparser_1(value) === null) {\n        return [new ValidationError(key, value, 'color expected, \"' + value + '\" found')];\n    }\n    return [];\n}\n\nfunction validateEnum(options) {\n    var key = options.key;\n    var value = options.value;\n    var valueSpec = options.valueSpec;\n    var errors = [];\n    if (Array.isArray(valueSpec.values)) {\n        if (valueSpec.values.indexOf(unbundle(value)) === -1) {\n            errors.push(new ValidationError(key, value, 'expected one of [' + valueSpec.values.join(', ') + '], ' + JSON.stringify(value) + ' found'));\n        }\n    } else {\n        if (Object.keys(valueSpec.values).indexOf(unbundle(value)) === -1) {\n            errors.push(new ValidationError(key, value, 'expected one of [' + Object.keys(valueSpec.values).join(', ') + '], ' + JSON.stringify(value) + ' found'));\n        }\n    }\n    return errors;\n}\n\nfunction validateFilter(options) {\n    if (isExpressionFilte
 r(deepUnbundle(options.value))) {\n        return validateExpression(extend({}, options, {\n            expressionContext: 'filter',\n            valueSpec: { value: 'boolean' }\n        }));\n    } else {\n        return validateNonExpressionFilter(options);\n    }\n}\nfunction validateNonExpressionFilter(options) {\n    var value = options.value;\n    var key = options.key;\n    if (getType(value) !== 'array') {\n        return [new ValidationError(key, value, 'array expected, ' + getType(value) + ' found')];\n    }\n    var styleSpec = options.styleSpec;\n    var type;\n    var errors = [];\n    if (value.length < 1) {\n        return [new ValidationError(key, value, 'filter array must have at least 1 element')];\n    }\n    errors = errors.concat(validateEnum({\n        key: key + '[0]',\n        value: value[0],\n        valueSpec: styleSpec.filter_operator,\n        style: options.style,\n        styleSpec: options.styleSpec\n    }));\n    switch (unbundle(value[0])) {\n    ca
 se '<':\n    case '<=':\n    case '>':\n    case '>=':\n        if (value.length >= 2 && unbundle(value[1]) === '$type') {\n            errors.push(new ValidationError(key, value, '\"$type\" cannot be use with operator \"' + value[0] + '\"'));\n        }\n    case '==':\n    case '!=':\n        if (value.length !== 3) {\n            errors.push(new ValidationError(key, value, 'filter array for operator \"' + value[0] + '\" must have 3 elements'));\n        }\n    case 'in':\n    case '!in':\n        if (value.length >= 2) {\n            type = getType(value[1]);\n            if (type !== 'string') {\n                errors.push(new ValidationError(key + '[1]', value[1], 'string expected, ' + type + ' found'));\n            }\n        }\n        for (var i = 2; i < value.length; i++) {\n            type = getType(value[i]);\n            if (unbundle(value[1]) === '$type') {\n                errors = errors.concat(validateEnum({\n                    key: key + '[' + i + ']',\n        
             value: value[i],\n                    valueSpec: styleSpec.geometry_type,\n                    style: options.style,\n                    styleSpec: options.styleSpec\n                }));\n            } else if (type !== 'string' && type !== 'number' && type !== 'boolean') {\n                errors.push(new ValidationError(key + '[' + i + ']', value[i], 'string, number, or boolean expected, ' + type + ' found'));\n            }\n        }\n        break;\n    case 'any':\n    case 'all':\n    case 'none':\n        for (var i$1 = 1; i$1 < value.length; i$1++) {\n            errors = errors.concat(validateNonExpressionFilter({\n                key: key + '[' + i$1 + ']',\n                value: value[i$1],\n                style: options.style,\n                styleSpec: options.styleSpec\n            }));\n        }\n        break;\n    case 'has':\n    case '!has':\n        type = getType(value[1]);\n        if (value.length !== 2) {\n            errors.push(new Valida
 tionError(key, value, 'filter array for \"' + value[0] + '\" operator must have 2 elements'));\n        } else if (type !== 'string') {\n            errors.push(new ValidationError(key + '[1]', value[1], 'string expected, ' + type + ' found'));\n        }\n        break;\n    case 'within':\n        type = getType(value[1]);\n        if (value.length !== 2) {\n            errors.push(new ValidationError(key, value, 'filter array for \"' + value[0] + '\" operator must have 2 elements'));\n        } else if (type !== 'object') {\n            errors.push(new ValidationError(key + '[1]', value[1], 'object expected, ' + type + ' found'));\n        }\n        break;\n    }\n    return errors;\n}\n\nfunction validateProperty(options, propertyType) {\n    var key = options.key;\n    var style = options.style;\n    var styleSpec = options.styleSpec;\n    var value = options.value;\n    var propertyKey = options.objectKey;\n    var layerSpec = styleSpec[propertyType + '_' + options.layerType]
 ;\n    if (!layerSpec) {\n        return [];\n    }\n    var transitionMatch = propertyKey.match(/^(.*)-transition$/);\n    if (propertyType === 'paint' && transitionMatch && layerSpec[transitionMatch[1]] && layerSpec[transitionMatch[1]].transition) {\n        return validate({\n            key: key,\n            value: value,\n            valueSpec: styleSpec.transition,\n            style: style,\n            styleSpec: styleSpec\n        });\n    }\n    var valueSpec = options.valueSpec || layerSpec[propertyKey];\n    if (!valueSpec) {\n        return [new ValidationError(key, value, 'unknown property \"' + propertyKey + '\"')];\n    }\n    var tokenMatch;\n    if (getType(value) === 'string' && supportsPropertyExpression(valueSpec) && !valueSpec.tokens && (tokenMatch = /^{([^}]+)}$/.exec(value))) {\n        return [new ValidationError(key, value, '\"' + propertyKey + '\" does not support interpolation syntax\\n' + 'Use an identity property function instead: `{ \"type\": \"identi
 ty\", \"property\": ' + JSON.stringify(tokenMatch[1]) + ' }`.')];\n    }\n    var errors = [];\n    if (options.layerType === 'symbol') {\n        if (propertyKey === 'text-field' && style && !style.glyphs) {\n            errors.push(new ValidationError(key, value, 'use of \"text-field\" requires a style \"glyphs\" property'));\n        }\n        if (propertyKey === 'text-font' && isFunction$1(deepUnbundle(value)) && unbundle(value.type) === 'identity') {\n            errors.push(new ValidationError(key, value, '\"text-font\" does not support identity functions'));\n        }\n    }\n    return errors.concat(validate({\n        key: options.key,\n        value: value,\n        valueSpec: valueSpec,\n        style: style,\n        styleSpec: styleSpec,\n        expressionContext: 'property',\n        propertyType: propertyType,\n        propertyKey: propertyKey\n    }));\n}\n\nfunction validatePaintProperty(options) {\n    return validateProperty(options, 'paint');\n}\n\nfunction va
 lidateLayoutProperty(options) {\n    return validateProperty(options, 'layout');\n}\n\nfunction validateLayer(options) {\n    var errors = [];\n    var layer = options.value;\n    var key = options.key;\n    var style = options.style;\n    var styleSpec = options.styleSpec;\n    if (!layer.type && !layer.ref) {\n        errors.push(new ValidationError(key, layer, 'either \"type\" or \"ref\" is required'));\n    }\n    var type = unbundle(layer.type);\n    var ref = unbundle(layer.ref);\n    if (layer.id) {\n        var layerId = unbundle(layer.id);\n        for (var i = 0; i < options.arrayIndex; i++) {\n            var otherLayer = style.layers[i];\n            if (unbundle(otherLayer.id) === layerId) {\n                errors.push(new ValidationError(key, layer.id, 'duplicate layer id \"' + layer.id + '\", previously used at line ' + otherLayer.id.__line__));\n            }\n        }\n    }\n    if ('ref' in layer) {\n        [\n            'type',\n            'source',\n       
      'source-layer',\n            'filter',\n            'layout'\n        ].forEach(function (p) {\n            if (p in layer) {\n                errors.push(new ValidationError(key, layer[p], '\"' + p + '\" is prohibited for ref layers'));\n            }\n        });\n        var parent;\n        style.layers.forEach(function (layer) {\n            if (unbundle(layer.id) === ref) {\n                parent = layer;\n            }\n        });\n        if (!parent) {\n            errors.push(new ValidationError(key, layer.ref, 'ref layer \"' + ref + '\" not found'));\n        } else if (parent.ref) {\n            errors.push(new ValidationError(key, layer.ref, 'ref cannot reference another ref layer'));\n        } else {\n            type = unbundle(parent.type);\n        }\n    } else if (type !== 'background') {\n        if (!layer.source) {\n            errors.push(new ValidationError(key, layer, 'missing required property \"source\"'));\n        } else {\n            var source
  = style.sources && style.sources[layer.source];\n            var sourceType = source && unbundle(source.type);\n            if (!source) {\n                errors.push(new ValidationError(key, layer.source, 'source \"' + layer.source + '\" not found'));\n            } else if (sourceType === 'vector' && type === 'raster') {\n                errors.push(new ValidationError(key, layer.source, 'layer \"' + layer.id + '\" requires a raster source'));\n            } else if (sourceType === 'raster' && type !== 'raster') {\n                errors.push(new ValidationError(key, layer.source, 'layer \"' + layer.id + '\" requires a vector source'));\n            } else if (sourceType === 'vector' && !layer['source-layer']) {\n                errors.push(new ValidationError(key, layer, 'layer \"' + layer.id + '\" must specify a \"source-layer\"'));\n            } else if (sourceType === 'raster-dem' && type !== 'hillshade') {\n                errors.push(new ValidationError(key, layer.source,
  'raster-dem source can only be used with layer type \\'hillshade\\'.'));\n            } else if (type === 'line' && layer.paint && layer.paint['line-gradient'] && (sourceType !== 'geojson' || !source.lineMetrics)) {\n                errors.push(new ValidationError(key, layer, 'layer \"' + layer.id + '\" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.'));\n            }\n        }\n    }\n    errors = errors.concat(validateObject({\n        key: key,\n        value: layer,\n        valueSpec: styleSpec.layer,\n        style: options.style,\n        styleSpec: options.styleSpec,\n        objectElementValidators: {\n            '*': function _() {\n                return [];\n            },\n            type: function type() {\n                return validate({\n                    key: key + '.type',\n                    value: layer.type,\n                    valueSpec: styleSpec.layer.type,\n                    style: options.style,\n         
            styleSpec: options.styleSpec,\n                    object: layer,\n                    objectKey: 'type'\n                });\n            },\n            filter: validateFilter,\n            layout: function layout(options) {\n                return validateObject({\n                    layer: layer,\n                    key: options.key,\n                    value: options.value,\n                    style: options.style,\n                    styleSpec: options.styleSpec,\n                    objectElementValidators: {\n                        '*': function _(options) {\n                            return validateLayoutProperty(extend({ layerType: type }, options));\n                        }\n                    }\n                });\n            },\n            paint: function paint(options) {\n                return validateObject({\n                    layer: layer,\n                    key: options.key,\n                    value: options.value,\n                 
    style: options.style,\n                    styleSpec: options.styleSpec,\n                    objectElementValidators: {\n                        '*': function _(options) {\n                            return validatePaintProperty(extend({ layerType: type }, options));\n                        }\n                    }\n                });\n            }\n        }\n    }));\n    return errors;\n}\n\nfunction validateString(options) {\n    var value = options.value;\n    var key = options.key;\n    var type = getType(value);\n    if (type !== 'string') {\n        return [new ValidationError(key, value, 'string expected, ' + type + ' found')];\n    }\n    return [];\n}\n\nvar objectElementValidators = { promoteId: validatePromoteId };\nfunction validateSource(options) {\n    var value = options.value;\n    var key = options.key;\n    var styleSpec = options.styleSpec;\n    var style = options.style;\n    if (!value.type) {\n        return [new ValidationError(key, value, '\"type\" 
 is required')];\n    }\n    var type = unbundle(value.type);\n    var errors;\n    switch (type) {\n    case 'vector':\n    case 'raster':\n    case 'raster-dem':\n        errors = validateObject({\n            key: key,\n            value: value,\n            valueSpec: styleSpec['source_' + type.replace('-', '_')],\n            style: options.style,\n            styleSpec: styleSpec,\n            objectElementValidators: objectElementValidators\n        });\n        return errors;\n    case 'geojson':\n        errors = validateObject({\n            key: key,\n            value: value,\n            valueSpec: styleSpec.source_geojson,\n            style: style,\n            styleSpec: styleSpec,\n            objectElementValidators: objectElementValidators\n        });\n        if (value.cluster) {\n            for (var prop in value.clusterProperties) {\n                var ref = value.clusterProperties[prop];\n                var operator = ref[0];\n                var mapExpr = 
 ref[1];\n                var reduceExpr = typeof operator === 'string' ? [\n                    operator,\n                    ['accumulated'],\n                    [\n                        'get',\n                        prop\n                    ]\n                ] : operator;\n                errors.push.apply(errors, validateExpression({\n                    key: key + '.' + prop + '.map',\n                    value: mapExpr,\n                    expressionContext: 'cluster-map'\n                }));\n                errors.push.apply(errors, validateExpression({\n                    key: key + '.' + prop + '.reduce',\n                    value: reduceExpr,\n                    expressionContext: 'cluster-reduce'\n                }));\n            }\n        }\n        return errors;\n    case 'video':\n        return validateObject({\n            key: key,\n            value: value,\n            valueSpec: styleSpec.source_video,\n            style: style,\n            style
 Spec: styleSpec\n        });\n    case 'image':\n        return validateObject({\n            key: key,\n            value: value,\n            valueSpec: styleSpec.source_image,\n            style: style,\n            styleSpec: styleSpec\n        });\n    case 'canvas':\n        return [new ValidationError(key, null, 'Please use runtime APIs to add canvas sources, rather than including them in stylesheets.', 'source.canvas')];\n    default:\n        return validateEnum({\n            key: key + '.type',\n            value: value.type,\n            valueSpec: {\n                values: [\n                    'vector',\n                    'raster',\n                    'raster-dem',\n                    'geojson',\n                    'video',\n                    'image'\n                ]\n            },\n            style: style,\n            styleSpec: styleSpec\n        });\n    }\n}\nfunction validatePromoteId(ref) {\n    var key = ref.key;\n    var value = ref.value;\n    if
  (getType(value) === 'string') {\n        return validateString({\n            key: key,\n            value: value\n        });\n    } else {\n        var errors = [];\n        for (var prop in value) {\n            errors.push.apply(errors, validateString({\n                key: key + '.' + prop,\n                value: value[prop]\n            }));\n        }\n        return errors;\n    }\n}\n\nfunction validateLight(options) {\n    var light = options.value;\n    var styleSpec = options.styleSpec;\n    var lightSpec = styleSpec.light;\n    var style = options.style;\n    var errors = [];\n    var rootType = getType(light);\n    if (light === undefined) {\n        return errors;\n    } else if (rootType !== 'object') {\n        errors = errors.concat([new ValidationError('light', light, 'object expected, ' + rootType + ' found')]);\n        return errors;\n    }\n    for (var key in light) {\n        var transitionMatch = key.match(/^(.*)-transition$/);\n        if (transitionMat
 ch && lightSpec[transitionMatch[1]] && lightSpec[transitionMatch[1]].transition) {\n            errors = errors.concat(validate({\n                key: key,\n                value: light[key],\n                valueSpec: styleSpec.transition,\n                style: style,\n                styleSpec: styleSpec\n            }));\n        } else if (lightSpec[key]) {\n            errors = errors.concat(validate({\n                key: key,\n                value: light[key],\n                valueSpec: lightSpec[key],\n                style: style,\n                styleSpec: styleSpec\n            }));\n        } else {\n            errors = errors.concat([new ValidationError(key, light[key], 'unknown property \"' + key + '\"')]);\n        }\n    }\n    return errors;\n}\n\nfunction validateFormatted(options) {\n    if (validateString(options).length === 0) {\n        return [];\n    }\n    return validateExpression(options);\n}\n\nfunction validateImage(options) {\n    if (validateS
 tring(options).length === 0) {\n        return [];\n    }\n    return validateExpression(options);\n}\n\nvar VALIDATORS = {\n    '*': function _() {\n        return [];\n    },\n    'array': validateArray,\n    'boolean': validateBoolean,\n    'number': validateNumber,\n    'color': validateColor,\n    'constants': validateConstants,\n    'enum': validateEnum,\n    'filter': validateFilter,\n    'function': validateFunction,\n    'layer': validateLayer,\n    'object': validateObject,\n    'source': validateSource,\n    'light': validateLight,\n    'string': validateString,\n    'formatted': validateFormatted,\n    'resolvedImage': validateImage\n};\nfunction validate(options) {\n    var value = options.value;\n    var valueSpec = options.valueSpec;\n    var styleSpec = options.styleSpec;\n    if (valueSpec.expression && isFunction$1(unbundle(value))) {\n        return validateFunction(options);\n    } else if (valueSpec.expression && isExpression(deepUnbundle(value))) {\n        ret
 urn validateExpression(options);\n    } else if (valueSpec.type && VALIDATORS[valueSpec.type]) {\n        return VALIDATORS[valueSpec.type](options);\n    } else {\n        var valid = validateObject(extend({}, options, { valueSpec: valueSpec.type ? styleSpec[valueSpec.type] : valueSpec }));\n        return valid;\n    }\n}\n\nfunction validateGlyphsURL (options) {\n    var value = options.value;\n    var key = options.key;\n    var errors = validateString(options);\n    if (errors.length) {\n        return errors;\n    }\n    if (value.indexOf('{fontstack}') === -1) {\n        errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{fontstack}\" token'));\n    }\n    if (value.indexOf('{range}') === -1) {\n        errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{range}\" token'));\n    }\n    return errors;\n}\n\nfunction validateStyleMin(style, styleSpec) {\n    if (styleSpec === void 0)\n        styleSpec = v8;\n    var errors = [
 ];\n    errors = errors.concat(validate({\n        key: '',\n        value: style,\n        valueSpec: styleSpec.$root,\n        styleSpec: styleSpec,\n        style: style,\n        objectElementValidators: {\n            glyphs: validateGlyphsURL,\n            '*': function _() {\n                return [];\n            }\n        }\n    }));\n    if (style.constants) {\n        errors = errors.concat(validateConstants({\n            key: 'constants',\n            value: style.constants,\n            style: style,\n            styleSpec: styleSpec\n        }));\n    }\n    return sortErrors(errors);\n}\nvalidateStyleMin.source = wrapCleanErrors(validateSource);\nvalidateStyleMin.light = wrapCleanErrors(validateLight);\nvalidateStyleMin.layer = wrapCleanErrors(validateLayer);\nvalidateStyleMin.filter = wrapCleanErrors(validateFilter);\nvalidateStyleMin.paintProperty = wrapCleanErrors(validatePaintProperty);\nvalidateStyleMin.layoutProperty = wrapCleanErrors(validateLayoutProperty);
 \nfunction sortErrors(errors) {\n    return [].concat(errors).sort(function (a, b) {\n        return a.line - b.line;\n    });\n}\nfunction wrapCleanErrors(inner) {\n    return function () {\n        var args = [], len = arguments.length;\n        while (len--)\n            args[len] = arguments[len];\n        return sortErrors(inner.apply(this, args));\n    };\n}\n\nvar jsonlint = createCommonjsModule(function (module, exports) {\n/* parser generated by jison 0.4.15 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n  
       parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the act
 ion code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boole
 an: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v){ }return o},$V0=[1,12],$V1=[1,13],$V2=[1,9],$V3=[1,10],$V4=[1,11],$V5=[1,14],$V6=[1,15],$V7=[14,18,22,24],$V8=[18,22],$V9=[22,24];\nvar parser = {trace: function trace() { },\nyy: {},\nsymbols_: {\"error\":2,\"JSONString\":3,\"STRING\":4,\"JSONNumber\":5,\"NUMBER\":6,\"JSONNullLiteral\":7,\"NULL\":8,\"JSONBooleanLiteral\":9,\"TRUE\":10,\"FALSE\":11,\"JSONText\":12,\"JSONValue\":13,\"EOF\":14,\"JSONObject\":15,\"JSONArray\":16,\"{\":17,\"}\":18,\"JSONMemberList\":19,\"JSONMember\":20,\":\":21,\",\":22,\"[\":23,\"]\":24,\"JSONElementList\":25,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"STRING\",6:\"NUMBER\",8:\"NULL\",10:\"TRUE\",11:\"FALSE\",14:\"EOF\",17:\"{\",18:\"}\",21:\":\",22:\",\",23:\"[\",24:\"]\"},\nproductions_: [0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1
 ],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n // replace escaped characters with actual character\n          this.$ = new String(yytext.replace(/\\\\(\\\\|\")/g, \"$\"+\"1\")\n                     .replace(/\\\\n/g,'\\n')\n                     .replace(/\\\\r/g,'\\r')\n                     .replace(/\\\\t/g,'\\t')\n                     .replace(/\\\\v/g,'\\v')\n                     .replace(/\\\\f/g,'\\f')\n                     .replace(/\\\\b/g,'\\b'));\n          this.$.__line__ =  this._$.first_line;\n        \nbreak;\ncase 2:\n\n            this.$ = new Number(yytext);\n            this.$.__line__ =  this._$.first_line;\n        \nbreak;\ncase 3:\n\n            this.$ = null;\n        \nbreak;\ncase 4:\n\n            this.$ = new Boolean(true)
 ;\n            this.$.__line__ = this._$.first_line;\n        \nbreak;\ncase 5:\n\n            this.$ = new Boolean(false);\n            this.$.__line__ = this._$.first_line;\n        \nbreak;\ncase 6:\nreturn this.$ = $$[$0-1];\ncase 13:\nthis.$ = {}; Object.defineProperty(this.$, '__line__', {\n            value: this._$.first_line,\n            enumerable: false\n        });\nbreak;\ncase 14: case 19:\nthis.$ = $$[$0-1]; Object.defineProperty(this.$, '__line__', {\n            value: this._$.first_line,\n            enumerable: false\n        });\nbreak;\ncase 15:\nthis.$ = [$$[$0-2], $$[$0]];\nbreak;\ncase 16:\nthis.$ = {}; this.$[$$[$0][0]] = $$[$0][1];\nbreak;\ncase 17:\nthis.$ = $$[$0-2]; $$[$0-2][$$[$0][0]] = $$[$0][1];\nbreak;\ncase 18:\nthis.$ = []; Object.defineProperty(this.$, '__line__', {\n            value: this._$.first_line,\n            enumerable: false\n        });\nbreak;\ncase 20:\nthis.$ = [$$[$0]];\nbreak;\ncase 21:\nthis.$ = $$[$0-2]; $$[$0-2].push($$[$0]);\
 nbreak;\n}\n},\ntable: [{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,12:1,13:2,15:7,16:8,17:$V5,23:$V6},{1:[3]},{14:[1,16]},o($V7,[2,7]),o($V7,[2,8]),o($V7,[2,9]),o($V7,[2,10]),o($V7,[2,11]),o($V7,[2,12]),o($V7,[2,3]),o($V7,[2,4]),o($V7,[2,5]),o([14,18,21,22,24],[2,1]),o($V7,[2,2]),{3:20,4:$V0,18:[1,17],19:18,20:19},{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:23,15:7,16:8,17:$V5,23:$V6,24:[1,21],25:22},{1:[2,6]},o($V7,[2,13]),{18:[1,24],22:[1,25]},o($V8,[2,16]),{21:[1,26]},o($V7,[2,18]),{22:[1,28],24:[1,27]},o($V9,[2,20]),o($V7,[2,14]),{3:20,4:$V0,20:29},{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:30,15:7,16:8,17:$V5,23:$V6},o($V7,[2,19]),{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:31,15:7,16:8,17:$V5,23:$V6},o($V8,[2,17]),o($V8,[2,15]),o($V9,[2,21])],\ndefaultActions: {16:[2,6]},\nparseError: function parseError(str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        throw new Error(str);\n    }\n},\nparse: function par
 se(input) {\n    var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    \n        function lex() {\n          
   var token;\n            token = lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, state, action, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n                    if (typeof action === 'undefined' || !action.length || !action[0]) {\n                var errStr = '';\n                expected = [];\n                for (p in table[state]) {\n                    if (this.terminals_[p] && p > TERROR) {\n                        expected.push('\\'' + this.terminals_[p] + '\\'');\n                
     }\n                }\n                if (lexer.showPosition) {\n                    errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n                } else {\n                    errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n                }\n                this.parseError(errStr, {\n                    text: lexer.match,\n                    token: this.terminals_[symbol] || symbol,\n                    line: lexer.yylineno,\n                    loc: yyloc,\n                    expected: expected\n                });\n            }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch 
 (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range
 [0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}
 };\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () 
 {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1
 );\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// Wh
 en called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') +
  past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function (match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n      
           yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc
  = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false
 ;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n     
            match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consum
 es input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex() {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin(condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState() {\n        var n = this.conditionStack.length
  - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules() {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState(n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(conditio
 n)\npushState:function pushState(condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nswitch($avoiding_name_collisions) {\ncase 0:/* skip whitespace */\nbreak;\ncase 1:return 6\ncase 2:yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2); return 4\ncase 3:return 17\ncase 4:return 18\ncase 5:return 23\ncase 6:return 24\ncase 7:return 22\ncase 8:return 21\ncase 9:return 10\ncase 10:return 11\ncase 11:return 8\ncase 12:return 14\ncase 13:return 'INVALID'\n}\n},\nrules: [/^(?:\\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\\.[0-9]+)?([eE][-+]?[0-9]+)?\\b)/,/^(?:\"(?:\\\\[\\\\\"bfnrt/]|\\\\u[a-fA-F0-9]{4}|[^\\\\\\0-\\x09\\x0a-\\x1f\"])*\")/,/^(?:\\{)/,/^(?:\\})/,/^(?:\\[)/,/^(?:\\])/,/^(?:,)/,/^(?::)/,/^(?:true\\b)/,/^(?:false\\b)/,/^(?:null\\b)/,/^(?:$)/,/^(?:
 .)/],\nconditions: {\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof commonjsRequire !== 'undefined' && 'object' !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\n}\n});\nvar jsonlint_1 = jsonlint.parser;\nvar jsonlint_2 = jsonlint.Parser;\nvar jsonlint_3 = jsonlint.parse;\n\nfunction readStyle(style) {\n    if (style instanceof String || typeof style === 'string' || style instanceof Buffer) {\n        try {\n            return jsonlint.parse(style.toString());\n        } catch (e) {\n            throw new ParsingError$1(e);\n        }\n    }\n    return style;\n}\n\nfunction validateStyle(style, styleSpec) {\n    if (styleSpec === void 0)\n        styleSpec = v8;\
 n    var s = style;\n    try {\n        s = readStyle(s);\n    } catch (e) {\n        return [e];\n    }\n    return validateStyleMin(s, styleSpec);\n}\n\nvar SUPPORTED_SPEC_VERSION = 8;\nvar MAX_SOURCES_IN_STYLE = 15;\nfunction isValid(value, regex) {\n    if (!value || getType(value) !== 'string') {\n        return true;\n    }\n    return !!value.match(regex);\n}\nfunction getSourceCount(source) {\n    if (source.url) {\n        return source.url.split(',').length;\n    } else {\n        return 0;\n    }\n}\nfunction getAllowedKeyErrors(obj, keys, path) {\n    var allowed = new Set(keys);\n    var errors = [];\n    Object.keys(obj).forEach(function (k) {\n        if (!allowed.has(k)) {\n            var prop = path ? path + '.' + k : null;\n            errors.push(new ValidationError(prop, obj[k], 'Unsupported property \"' + k + '\"'));\n        }\n    });\n    return errors;\n}\nfunction getSourceErrors(source, i) {\n    var errors = [];\n    var sourceKeys = [\n        'type',\n
         'url',\n        'tileSize'\n    ];\n    errors.push.apply(errors, getAllowedKeyErrors(source, sourceKeys, 'source'));\n    var sourceUrlPattern = /^mapbox:\\/\\/([^/]*)$/;\n    if (!isValid(source.url, sourceUrlPattern)) {\n        errors.push(new ValidationError('sources[' + i + ']', source.url, 'Source url must be a valid Mapbox tileset url'));\n    }\n    return errors;\n}\nfunction getSourcesErrors(sources) {\n    var errors = [];\n    var count = 0;\n    Object.keys(sources).forEach(function (s, i) {\n        var sourceErrors = getSourceErrors(sources[s], i);\n        if (!sourceErrors.length) {\n            count = count + getSourceCount(sources[s]);\n        }\n        errors.push.apply(errors, sourceErrors);\n    });\n    if (count > MAX_SOURCES_IN_STYLE) {\n        errors.push(new ValidationError('sources', null, 'Styles must contain ' + MAX_SOURCES_IN_STYLE + ' or fewer sources'));\n    }\n    return errors;\n}\nfunction getRootErrors(style, specKeys) {\n    var er
 rors = [];\n    var optionalRootProperties = [\n        'owner',\n        'id',\n        'cacheControl',\n        'draft',\n        'created',\n        'modified',\n        'visibility'\n    ];\n    var allowedKeyErrors = getAllowedKeyErrors(style, specKeys.concat(optionalRootProperties));\n    errors.push.apply(errors, allowedKeyErrors);\n    if (style.version > SUPPORTED_SPEC_VERSION || style.version < SUPPORTED_SPEC_VERSION) {\n        errors.push(new ValidationError('version', style.version, 'Style version must be ' + SUPPORTED_SPEC_VERSION));\n    }\n    var glyphUrlPattern = /^mapbox:\\/\\/fonts\\/([^/]*)\\/{fontstack}\\/{range}.pbf$/;\n    if (!isValid(style.glyphs, glyphUrlPattern)) {\n        errors.push(new ValidationError('glyphs', style.glyphs, 'Styles must reference glyphs hosted by Mapbox'));\n    }\n    var spriteUrlPattern = /^mapbox:\\/\\/sprites\\/([^/]*)\\/([^/]*)\\/?([^/]*)?$/;\n    if (!isValid(style.sprite, spriteUrlPattern)) {\n        errors.push(new Validati
 onError('sprite', style.sprite, 'Styles must reference sprites hosted by Mapbox'));\n    }\n    var visibilityPattern = /^(public|private)$/;\n    if (!isValid(style.visibility, visibilityPattern)) {\n        errors.push(new ValidationError('visibility', style.visibility, 'Style visibility must be public or private'));\n    }\n    return errors;\n}\nfunction validateMapboxApiSupported(style) {\n    var s = style;\n    try {\n        s = readStyle(s);\n    } catch (e) {\n        return [e];\n    }\n    var errors = validateStyleMin(s, v8).concat(getRootErrors(s, Object.keys(v8.$root)));\n    if (s.sources) {\n        errors = errors.concat(getSourcesErrors(s.sources));\n    }\n    return errors;\n}\n\nvar expression$1 = {\n    StyleExpression: StyleExpression,\n    isExpression: isExpression,\n    isExpressionFilter: isExpressionFilter,\n    createExpression: createExpression,\n    createPropertyExpression: createPropertyExpression,\n    normalizePropertyExpression: normalizeProperty
 Expression,\n    ZoomConstantExpression: ZoomConstantExpression,\n    ZoomDependentExpression: ZoomDependentExpression,\n    StylePropertyFunction: StylePropertyFunction\n};\nvar styleFunction = {\n    convertFunction: convertFunction,\n    createFunction: createFunction,\n    isFunction: isFunction$1\n};\nvar visit = {\n    eachSource: eachSource,\n    eachLayer: eachLayer,\n    eachProperty: eachProperty\n};\nvalidateStyle.parsed = validateStyle;\nvalidateStyle.latest = validateStyle;\n\nexport { Color, ParsingError$1 as ParsingError, ValidationError, composite, convertFilter$1 as convertFilter, derefLayers, diffStyles as diff, expression$1 as expression, createFilter as featureFilter, format, styleFunction as function, v8 as latest, migrate, v8, validateStyle as validate, validateMapboxApiSupported, visit };\n//# sourceMappingURL=index.es.js.map\n","(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\ntypeof d
 efine === 'function' && define.amd ? define(factory) :\n(global = global || self, global.RBush = factory());\n}(this, function () { 'use strict';\n\nfunction quickselect(arr, k, left, right, compare) {\n    quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);\n}\n\nfunction quickselectStep(arr, k, left, right, compare) {\n\n    while (right > left) {\n        if (right - left > 600) {\n            var n = right - left + 1;\n            var m = k - left + 1;\n            var z = Math.log(n);\n            var s = 0.5 * Math.exp(2 * z / 3);\n            var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n            var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n            var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n            quickselectStep(arr, k, newLeft, newRight, compare);\n        }\n\n        var t = arr[k];\n        var i = left;\n        var j = right;\n\n        swap(arr,
  left, k);\n        if (compare(arr[right], t) > 0) { swap(arr, left, right); }\n\n        while (i < j) {\n            swap(arr, i, j);\n            i++;\n            j--;\n            while (compare(arr[i], t) < 0) { i++; }\n            while (compare(arr[j], t) > 0) { j--; }\n        }\n\n        if (compare(arr[left], t) === 0) { swap(arr, left, j); }\n        else {\n            j++;\n            swap(arr, j, right);\n        }\n\n        if (j <= k) { left = j + 1; }\n        if (k <= j) { right = j - 1; }\n    }\n}\n\nfunction swap(arr, i, j) {\n    var tmp = arr[i];\n    arr[i] = arr[j];\n    arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\n\nvar RBush = function RBush(maxEntries) {\n    if ( maxEntries === void 0 ) maxEntries = 9;\n\n    // max entries in a node is 9 by default; min node fill is 40% for best performance\n    this._maxEntries = Math.max(4, maxEntries);\n    this._minEntries = Math.max(2, Math.ceil(this._maxEntri
 es * 0.4));\n    this.clear();\n};\n\nRBush.prototype.all = function all () {\n    return this._all(this.data, []);\n};\n\nRBush.prototype.search = function search (bbox) {\n    var node = this.data;\n    var result = [];\n\n    if (!intersects(bbox, node)) { return result; }\n\n    var toBBox = this.toBBox;\n    var nodesToSearch = [];\n\n    while (node) {\n        for (var i = 0; i < node.children.length; i++) {\n            var child = node.children[i];\n            var childBBox = node.leaf ? toBBox(child) : child;\n\n            if (intersects(bbox, childBBox)) {\n                if (node.leaf) { result.push(child); }\n                else if (contains(bbox, childBBox)) { this._all(child, result); }\n                else { nodesToSearch.push(child); }\n            }\n        }\n        node = nodesToSearch.pop();\n    }\n\n    return result;\n};\n\nRBush.prototype.collides = function collides (bbox) {\n    var node = this.data;\n\n    if (!intersects(bbox, node)) { return fals
 e; }\n\n    var nodesToSearch = [];\n    while (node) {\n        for (var i = 0; i < node.children.length; i++) {\n            var child = node.children[i];\n            var childBBox = node.leaf ? this.toBBox(child) : child;\n\n            if (intersects(bbox, childBBox)) {\n                if (node.leaf || contains(bbox, childBBox)) { return true; }\n                nodesToSearch.push(child);\n            }\n        }\n        node = nodesToSearch.pop();\n    }\n\n    return false;\n};\n\nRBush.prototype.load = function load (data) {\n    if (!(data && data.length)) { return this; }\n\n    if (data.length < this._minEntries) {\n        for (var i = 0; i < data.length; i++) {\n            this.insert(data[i]);\n        }\n        return this;\n    }\n\n    // recursively build the tree with the given data from scratch using OMT algorithm\n    var node = this._build(data.slice(), 0, data.length - 1, 0);\n\n    if (!this.data.children.length) {\n        // save as is if tree is empty
 \n        this.data = node;\n\n    } else if (this.data.height === node.height) {\n        // split root if trees have the same height\n        this._splitRoot(this.data, node);\n\n    } else {\n        if (this.data.height < node.height) {\n            // swap trees if inserted one is bigger\n            var tmpNode = this.data;\n            this.data = node;\n            node = tmpNode;\n        }\n\n        // insert the small tree into the large tree at appropriate level\n        this._insert(node, this.data.height - node.height - 1, true);\n    }\n\n    return this;\n};\n\nRBush.prototype.insert = function insert (item) {\n    if (item) { this._insert(item, this.data.height - 1); }\n    return this;\n};\n\nRBush.prototype.clear = function clear () {\n    this.data = createNode([]);\n    return this;\n};\n\nRBush.prototype.remove = function remove (item, equalsFn) {\n    if (!item) { return this; }\n\n    var node = this.data;\n    var bbox = this.toBBox(item);\n    var path = [
 ];\n    var indexes = [];\n    var i, parent, goingUp;\n\n    // depth-first iterative tree traversal\n    while (node || path.length) {\n\n        if (!node) { // go up\n            node = path.pop();\n            parent = path[path.length - 1];\n            i = indexes.pop();\n            goingUp = true;\n        }\n\n        if (node.leaf) { // check current node\n            var index = findItem(item, node.children, equalsFn);\n\n            if (index !== -1) {\n                // item found, remove the item and condense tree upwards\n                node.children.splice(index, 1);\n                path.push(node);\n                this._condense(path);\n                return this;\n            }\n        }\n\n        if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n            path.push(node);\n            indexes.push(i);\n            i = 0;\n            parent = node;\n            node = node.children[0];\n\n        } else if (parent) { // go right\n        
     i++;\n            node = parent.children[i];\n            goingUp = false;\n\n        } else { node = null; } // nothing found\n    }\n\n    return this;\n};\n\nRBush.prototype.toBBox = function toBBox (item) { return item; };\n\nRBush.prototype.compareMinX = function compareMinX (a, b) { return a.minX - b.minX; };\nRBush.prototype.compareMinY = function compareMinY (a, b) { return a.minY - b.minY; };\n\nRBush.prototype.toJSON = function toJSON () { return this.data; };\n\nRBush.prototype.fromJSON = function fromJSON (data) {\n    this.data = data;\n    return this;\n};\n\nRBush.prototype._all = function _all (node, result) {\n    var nodesToSearch = [];\n    while (node) {\n        if (node.leaf) { result.push.apply(result, node.children); }\n        else { nodesToSearch.push.apply(nodesToSearch, node.children); }\n\n        node = nodesToSearch.pop();\n    }\n    return result;\n};\n\nRBush.prototype._build = function _build (items, left, right, height) {\n\n    var N = right 
 - left + 1;\n    var M = this._maxEntries;\n    var node;\n\n    if (N <= M) {\n        // reached leaf level; return leaf\n        node = createNode(items.slice(left, right + 1));\n        calcBBox(node, this.toBBox);\n        return node;\n    }\n\n    if (!height) {\n        // target height of the bulk-loaded tree\n        height = Math.ceil(Math.log(N) / Math.log(M));\n\n        // target number of root entries to maximize storage utilization\n        M = Math.ceil(N / Math.pow(M, height - 1));\n    }\n\n    node = createNode([]);\n    node.leaf = false;\n    node.height = height;\n\n    // split the items into M mostly square tiles\n\n    var N2 = Math.ceil(N / M);\n    var N1 = N2 * Math.ceil(Math.sqrt(M));\n\n    multiSelect(items, left, right, N1, this.compareMinX);\n\n    for (var i = left; i <= right; i += N1) {\n\n        var right2 = Math.min(i + N1 - 1, right);\n\n        multiSelect(items, i, right2, N2, this.compareMinY);\n\n        for (var j = i; j <= right2; j += 
 N2) {\n\n            var right3 = Math.min(j + N2 - 1, right2);\n\n            // pack each entry recursively\n            node.children.push(this._build(items, j, right3, height - 1));\n        }\n    }\n\n    calcBBox(node, this.toBBox);\n\n    return node;\n};\n\nRBush.prototype._chooseSubtree = function _chooseSubtree (bbox, node, level, path) {\n    while (true) {\n        path.push(node);\n\n        if (node.leaf || path.length - 1 === level) { break; }\n\n        var minArea = Infinity;\n        var minEnlargement = Infinity;\n        var targetNode = (void 0);\n\n        for (var i = 0; i < node.children.length; i++) {\n            var child = node.children[i];\n            var area = bboxArea(child);\n            var enlargement = enlargedArea(bbox, child) - area;\n\n            // choose entry with the least area enlargement\n            if (enlargement < minEnlargement) {\n                minEnlargement = enlargement;\n                minArea = area < minArea ? area : min
 Area;\n                targetNode = child;\n\n            } else if (enlargement === minEnlargement) {\n                // otherwise choose one with the smallest area\n                if (area < minArea) {\n                    minArea = area;\n                    targetNode = child;\n                }\n            }\n        }\n\n        node = targetNode || node.children[0];\n    }\n\n    return node;\n};\n\nRBush.prototype._insert = function _insert (item, level, isNode) {\n    var bbox = isNode ? item : this.toBBox(item);\n    var insertPath = [];\n\n    // find the best node for accommodating the item, saving all nodes along the path too\n    var node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n    // put the item into the node\n    node.children.push(item);\n    extend(node, bbox);\n\n    // split on node overflow; propagate upwards if necessary\n    while (level >= 0) {\n        if (insertPath[level].children.length > this._maxEntries) {\n            this._sp
 lit(insertPath, level);\n            level--;\n        } else { break; }\n    }\n\n    // adjust bboxes along the insertion path\n    this._adjustParentBBoxes(bbox, insertPath, level);\n};\n\n// split overflowed node into two\nRBush.prototype._split = function _split (insertPath, level) {\n    var node = insertPath[level];\n    var M = node.children.length;\n    var m = this._minEntries;\n\n    this._chooseSplitAxis(node, m, M);\n\n    var splitIndex = this._chooseSplitIndex(node, m, M);\n\n    var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n    newNode.height = node.height;\n    newNode.leaf = node.leaf;\n\n    calcBBox(node, this.toBBox);\n    calcBBox(newNode, this.toBBox);\n\n    if (level) { insertPath[level - 1].children.push(newNode); }\n    else { this._splitRoot(node, newNode); }\n};\n\nRBush.prototype._splitRoot = function _splitRoot (node, newNode) {\n    // split root node\n    this.data = createNode([node, newNode]);\n    
 this.data.height = node.height + 1;\n    this.data.leaf = false;\n    calcBBox(this.data, this.toBBox);\n};\n\nRBush.prototype._chooseSplitIndex = function _chooseSplitIndex (node, m, M) {\n    var index;\n    var minOverlap = Infinity;\n    var minArea = Infinity;\n\n    for (var i = m; i <= M - m; i++) {\n        var bbox1 = distBBox(node, 0, i, this.toBBox);\n        var bbox2 = distBBox(node, i, M, this.toBBox);\n\n        var overlap = intersectionArea(bbox1, bbox2);\n        var area = bboxArea(bbox1) + bboxArea(bbox2);\n\n        // choose distribution with minimum overlap\n        if (overlap < minOverlap) {\n            minOverlap = overlap;\n            index = i;\n\n            minArea = area < minArea ? area : minArea;\n\n        } else if (overlap === minOverlap) {\n            // otherwise choose distribution with minimum area\n            if (area < minArea) {\n                minArea = area;\n                index = i;\n            }\n        }\n    }\n\n    return i
 ndex || M - m;\n};\n\n// sorts node children by the best axis for split\nRBush.prototype._chooseSplitAxis = function _chooseSplitAxis (node, m, M) {\n    var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX;\n    var compareMinY = node.leaf ? this.compareMinY : compareNodeMinY;\n    var xMargin = this._allDistMargin(node, m, M, compareMinX);\n    var yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n    // if total distributions margin value is minimal for x, sort by minX,\n    // otherwise it's already sorted by minY\n    if (xMargin < yMargin) { node.children.sort(compareMinX); }\n};\n\n// total margin of all possible split distributions where each node is at least m full\nRBush.prototype._allDistMargin = function _allDistMargin (node, m, M, compare) {\n    node.children.sort(compare);\n\n    var toBBox = this.toBBox;\n    var leftBBox = distBBox(node, 0, m, toBBox);\n    var rightBBox = distBBox(node, M - m, M, toBBox);\n    var margin = bboxMargin(leftBBox) 
 + bboxMargin(rightBBox);\n\n    for (var i = m; i < M - m; i++) {\n        var child = node.children[i];\n        extend(leftBBox, node.leaf ? toBBox(child) : child);\n        margin += bboxMargin(leftBBox);\n    }\n\n    for (var i$1 = M - m - 1; i$1 >= m; i$1--) {\n        var child$1 = node.children[i$1];\n        extend(rightBBox, node.leaf ? toBBox(child$1) : child$1);\n        margin += bboxMargin(rightBBox);\n    }\n\n    return margin;\n};\n\nRBush.prototype._adjustParentBBoxes = function _adjustParentBBoxes (bbox, path, level) {\n    // adjust bboxes along the given tree path\n    for (var i = level; i >= 0; i--) {\n        extend(path[i], bbox);\n    }\n};\n\nRBush.prototype._condense = function _condense (path) {\n    // go through the path, removing empty nodes and updating bboxes\n    for (var i = path.length - 1, siblings = (void 0); i >= 0; i--) {\n        if (path[i].children.length === 0) {\n            if (i > 0) {\n                siblings = path[i - 1].children;\
 n                siblings.splice(siblings.indexOf(path[i]), 1);\n\n            } else { this.clear(); }\n\n        } else { calcBBox(path[i], this.toBBox); }\n    }\n};\n\nfunction findItem(item, items, equalsFn) {\n    if (!equalsFn) { return items.indexOf(item); }\n\n    for (var i = 0; i < items.length; i++) {\n        if (equalsFn(item, items[i])) { return i; }\n    }\n    return -1;\n}\n\n// calculate node's bbox from bboxes of its children\nfunction calcBBox(node, toBBox) {\n    distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n    if (!destNode) { destNode = createNode(null); }\n    destNode.minX = Infinity;\n    destNode.minY = Infinity;\n    destNode.maxX = -Infinity;\n    destNode.maxY = -Infinity;\n\n    for (var i = k; i < p; i++) {\n        var child = node.children[i];\n        extend(destNode, node.leaf ? toBBox(child) : child);\n    }\n\n    return 
 destNode;\n}\n\nfunction extend(a, b) {\n    a.minX = Math.min(a.minX, b.minX);\n    a.minY = Math.min(a.minY, b.minY);\n    a.maxX = Math.max(a.maxX, b.maxX);\n    a.maxY = Math.max(a.maxY, b.maxY);\n    return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a)   { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n    return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n           (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n    var minX = Math.max(a.minX, b.minX);\n    var minY = Math.max(a.minY, b.minY);\n    var maxX = Math.min(a.maxX, b.maxX);\n    var maxY = Math.min(a.maxY, b.maxY);\n\n    return Math.max(0, maxX - minX) *\n           Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n    return a.minX <
 = b.minX &&\n           a.minY <= b.minY &&\n           b.maxX <= a.maxX &&\n           b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n    return b.minX <= a.maxX &&\n           b.minY <= a.maxY &&\n           b.maxX >= a.minX &&\n           b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n    return {\n        children: children,\n        height: 1,\n        leaf: true,\n        minX: Infinity,\n        minY: Infinity,\n        maxX: -Infinity,\n        maxY: -Infinity\n    };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n    var stack = [left, right];\n\n    while (stack.length) {\n        right = stack.pop();\n        left = stack.pop();\n\n        if (right - left <= n) { continue; }\n\n        var mid = left + Math.ceil((right - left) / n / 2) * n;\n        quickselect(arr,
  mid, left, right, compare);\n\n        stack.push(left, mid, mid, right);\n    }\n}\n\nreturn RBush;\n\n}));\n","var fontWeights = {\n  thin: 100,\n  hairline: 100,\n  'ultra-light': 100,\n  'extra-light': 100,\n  light: 200,\n  book: 300,\n  regular: 400,\n  normal: 400,\n  plain: 400,\n  roman: 400,\n  standard: 400,\n  medium: 500,\n  'semi-bold': 600,\n  'demi-bold': 600,\n  bold: 700,\n  heavy: 800,\n  black: 800,\n  'extra-bold': 800,\n  'ultra-black': 900,\n  'extra-black': 900,\n  'ultra-bold': 900,\n  'heavy-black': 900,\n  fat: 900,\n  poster: 900\n};\nvar sp = ' ';\nvar italicRE = /(italic|oblique)$/i;\n\nvar fontCache = {};\n\nmodule.exports = function(fonts, size, lineHeight) {\n  var cssData = fontCache[fonts];\n  if (!cssData) {\n    if (!Array.isArray(fonts)) {\n      fonts = [fonts];\n    }\n    var weight = 400;\n    var style = 'normal';\n    var fontFamilies = [];\n    var haveWeight, haveStyle;\n    for (var i = 0, ii = fonts.length; i < ii; ++i) {\n      var f
 ont = fonts[i];\n      var parts = font.split(' ');\n      var maybeWeight = parts[parts.length - 1].toLowerCase();\n      if (maybeWeight == 'normal' || maybeWeight == 'italic' || maybeWeight == 'oblique') {\n        style = haveStyle ? style : maybeWeight;\n        parts.pop();\n        maybeWeight = parts[parts.length - 1].toLowerCase();\n      } else if (italicRE.test(maybeWeight)) {\n        maybeWeight = maybeWeight.replace(italicRE, '');\n        style = haveStyle ? style : parts[parts.length - 1].replace(maybeWeight, '');\n      }\n      for (var w in fontWeights) {\n        if (maybeWeight == w || maybeWeight == w.replace('-', '') || maybeWeight == w.replace('-', sp)) {\n          weight = haveWeight ? weight : fontWeights[w];\n          parts.pop();\n          break;\n        }\n      }\n      if (!haveWeight && typeof maybeWeight == 'number') {\n        weight = maybeWeight;\n      }\n      var fontFamily = parts.join(sp)\n        .replace('Klokantech Noto Sans', 'Noto Sa
 ns');\n      if (fontFamily.indexOf(sp) !== -1) {\n        fontFamily = '\"' + fontFamily + '\"';\n      }\n      fontFamilies.push(fontFamily);\n    }\n    // CSS font property: font-style font-weight font-size/line-height font-family\n    cssData = fontCache[fonts] = [style, weight, fontFamilies];\n  }\n  return cssData[0] + sp + cssData[1] + sp + size + 'px' + (lineHeight ? '/' + lineHeight : '') + sp + cssData[2];\n};\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i 
 += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n
     }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothin
 g here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","'use strict';\n\nmodule.exports = Pbf;\n\nvar ieee754 = require('ieee754');\n\nfunction Pbf(buf) {\n    this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);\n    this.pos = 0;\n    this.type = 0;\n    this.length = this.buf.length;\n}\n\nPbf.Varint  = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum\nPbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64\nPbf.Bytes   = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nPbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32\n\nvar SHIFT_LEFT_32 = (1 << 16) * (1 << 16),\n    SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\n// Threshold chosen based on both benchmarking and knowledge about browser string\n// data structures (which currently switch structure types at 12 bytes or more)\nvar TEXT_DECODER_MIN_LENGTH = 12;\nvar utf8TextDecoder = typeof TextDecoder === 'un
 defined' ? null : new TextDecoder('utf8');\n\nPbf.prototype = {\n\n    destroy: function() {\n        this.buf = null;\n    },\n\n    // === READING =================================================================\n\n    readFields: function(readField, result, end) {\n        end = end || this.length;\n\n        while (this.pos < end) {\n            var val = this.readVarint(),\n                tag = val >> 3,\n                startPos = this.pos;\n\n            this.type = val & 0x7;\n            readField(tag, result, this);\n\n            if (this.pos === startPos) this.skip(val);\n        }\n        return result;\n    },\n\n    readMessage: function(readField, result) {\n        return this.readFields(readField, result, this.readVarint() + this.pos);\n    },\n\n    readFixed32: function() {\n        var val = readUInt32(this.buf, this.pos);\n        this.pos += 4;\n        return val;\n    },\n\n    readSFixed32: function() {\n        var val = readInt32(this.buf, this.pos);\n
         this.pos += 4;\n        return val;\n    },\n\n    // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n    readFixed64: function() {\n        var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n        this.pos += 8;\n        return val;\n    },\n\n    readSFixed64: function() {\n        var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n        this.pos += 8;\n        return val;\n    },\n\n    readFloat: function() {\n        var val = ieee754.read(this.buf, this.pos, true, 23, 4);\n        this.pos += 4;\n        return val;\n    },\n\n    readDouble: function() {\n        var val = ieee754.read(this.buf, this.pos, true, 52, 8);\n        this.pos += 8;\n        return val;\n    },\n\n    readVarint: function(isSigned) {\n        var buf = this.buf,\n            val, b;\n\n        b = buf[this.pos++]; val  =  b & 0x7f;        if (b < 0x80) return va
 l;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 7;  if (b < 0x80) return val;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n        b = buf[this.pos];   val |= (b & 0x0f) << 28;\n\n        return readVarintRemainder(val, isSigned, this);\n    },\n\n    readVarint64: function() { // for compatibility with v2.0.1\n        return this.readVarint(true);\n    },\n\n    readSVarint: function() {\n        var num = this.readVarint();\n        return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n    },\n\n    readBoolean: function() {\n        return Boolean(this.readVarint());\n    },\n\n    readString: function() {\n        var end = this.readVarint() + this.pos;\n        var pos = this.pos;\n        this.pos = end;\n\n        if (end - pos >= TEXT_DECODER_MIN_LENGTH && utf8TextDecoder) {\n            // longer strings are fast with the built-in browse
 r TextDecoder API\n            return readUtf8TextDecoder(this.buf, pos, end);\n        }\n        // short strings are fast with our custom implementation\n        return readUtf8(this.buf, pos, end);\n    },\n\n    readBytes: function() {\n        var end = this.readVarint() + this.pos,\n            buffer = this.buf.subarray(this.pos, end);\n        this.pos = end;\n        return buffer;\n    },\n\n    // verbose for performance reasons; doesn't affect gzipped size\n\n    readPackedVarint: function(arr, isSigned) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readVarint(isSigned));\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readVarint(isSigned));\n        return arr;\n    },\n    readPackedSVarint: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readSVarint());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this
 .readSVarint());\n        return arr;\n    },\n    readPackedBoolean: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readBoolean());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readBoolean());\n        return arr;\n    },\n    readPackedFloat: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readFloat());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFloat());\n        return arr;\n    },\n    readPackedDouble: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readDouble());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readDouble());\n        return arr;\n    },\n    readPackedFixed32: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readFixed32());\n        var end = readPacked
 End(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFixed32());\n        return arr;\n    },\n    readPackedSFixed32: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed32());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readSFixed32());\n        return arr;\n    },\n    readPackedFixed64: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readFixed64());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFixed64());\n        return arr;\n    },\n    readPackedSFixed64: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed64());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readSFixed64());\n        return arr;\n    },\n\n    skip: function(val) {\n        var type 
 = val & 0x7;\n        if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}\n        else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;\n        else if (type === Pbf.Fixed32) this.pos += 4;\n        else if (type === Pbf.Fixed64) this.pos += 8;\n        else throw new Error('Unimplemented type: ' + type);\n    },\n\n    // === WRITING =================================================================\n\n    writeTag: function(tag, type) {\n        this.writeVarint((tag << 3) | type);\n    },\n\n    realloc: function(min) {\n        var length = this.length || 16;\n\n        while (length < this.pos + min) length *= 2;\n\n        if (length !== this.length) {\n            var buf = new Uint8Array(length);\n            buf.set(this.buf);\n            this.buf = buf;\n            this.length = length;\n        }\n    },\n\n    finish: function() {\n        this.length = this.pos;\n        this.pos = 0;\n        return this.buf.subarray(0, this.length);\n   
  },\n\n    writeFixed32: function(val) {\n        this.realloc(4);\n        writeInt32(this.buf, val, this.pos);\n        this.pos += 4;\n    },\n\n    writeSFixed32: function(val) {\n        this.realloc(4);\n        writeInt32(this.buf, val, this.pos);\n        this.pos += 4;\n    },\n\n    writeFixed64: function(val) {\n        this.realloc(8);\n        writeInt32(this.buf, val & -1, this.pos);\n        writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n        this.pos += 8;\n    },\n\n    writeSFixed64: function(val) {\n        this.realloc(8);\n        writeInt32(this.buf, val & -1, this.pos);\n        writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n        this.pos += 8;\n    },\n\n    writeVarint: function(val) {\n        val = +val || 0;\n\n        if (val > 0xfffffff || val < 0) {\n            writeBigVarint(val, this);\n            return;\n        }\n\n        this.realloc(4);\n\n        this.buf[this.pos++] =           val & 0x
 7f  | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] =   (val >>> 7) & 0x7f;\n    },\n\n    writeSVarint: function(val) {\n        this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);\n    },\n\n    writeBoolean: function(val) {\n        this.writeVarint(Boolean(val));\n    },\n\n    writeString: function(str) {\n        str = String(str);\n        this.realloc(str.length * 4);\n\n        this.pos++; // reserve 1 byte for short string length\n\n        var startPos = this.pos;\n        // write the string directly to the buffer and see how much was written\n        this.pos = writeUtf8(this.buf, str, this.pos);\n        var len = this.pos - startPos;\n\n        if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n        // finally
 , write the message length in the reserved place and restore the position\n        this.pos = startPos - 1;\n        this.writeVarint(len);\n        this.pos += len;\n    },\n\n    writeFloat: function(val) {\n        this.realloc(4);\n        ieee754.write(this.buf, val, this.pos, true, 23, 4);\n        this.pos += 4;\n    },\n\n    writeDouble: function(val) {\n        this.realloc(8);\n        ieee754.write(this.buf, val, this.pos, true, 52, 8);\n        this.pos += 8;\n    },\n\n    writeBytes: function(buffer) {\n        var len = buffer.length;\n        this.writeVarint(len);\n        this.realloc(len);\n        for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n    },\n\n    writeRawMessage: function(fn, obj) {\n        this.pos++; // reserve 1 byte for short message length\n\n        // write the message directly to the buffer and see how much was written\n        var startPos = this.pos;\n        fn(obj, this);\n        var len = this.pos - startPos;\n\n      
   if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n        // finally, write the message length in the reserved place and restore the position\n        this.pos = startPos - 1;\n        this.writeVarint(len);\n        this.pos += len;\n    },\n\n    writeMessage: function(tag, fn, obj) {\n        this.writeTag(tag, Pbf.Bytes);\n        this.writeRawMessage(fn, obj);\n    },\n\n    writePackedVarint:   function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedVarint, arr);   },\n    writePackedSVarint:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSVarint, arr);  },\n    writePackedBoolean:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedBoolean, arr);  },\n    writePackedFloat:    function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFloat, arr);    },\n    writePackedDouble:   function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedDouble, arr);   },\n    writePackedFixed3
 2:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed32, arr);  },\n    writePackedSFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr); },\n    writePackedFixed64:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed64, arr);  },\n    writePackedSFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr); },\n\n    writeBytesField: function(tag, buffer) {\n        this.writeTag(tag, Pbf.Bytes);\n        this.writeBytes(buffer);\n    },\n    writeFixed32Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeFixed32(val);\n    },\n    writeSFixed32Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeSFixed32(val);\n    },\n    writeFixed64Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeFixed64(val);\n    },\n    writeSFixed64Field: function(tag, 
 val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeSFixed64(val);\n    },\n    writeVarintField: function(tag, val) {\n        this.writeTag(tag, Pbf.Varint);\n        this.writeVarint(val);\n    },\n    writeSVarintField: function(tag, val) {\n        this.writeTag(tag, Pbf.Varint);\n        this.writeSVarint(val);\n    },\n    writeStringField: function(tag, str) {\n        this.writeTag(tag, Pbf.Bytes);\n        this.writeString(str);\n    },\n    writeFloatField: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeFloat(val);\n    },\n    writeDoubleField: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeDouble(val);\n    },\n    writeBooleanField: function(tag, val) {\n        this.writeVarintField(tag, Boolean(val));\n    }\n};\n\nfunction readVarintRemainder(l, s, p) {\n    var buf = p.buf,\n        h, b;\n\n    b = buf[p.pos++]; h  = (b & 0x70) >> 4;  if (b < 0x80) return toNum(l, h, s);\n    b =
  buf[p.pos++]; h |= (b & 0x7f) << 3;  if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\n    throw new Error('Expected varint not more than 10 bytes');\n}\n\nfunction readPackedEnd(pbf) {\n    return pbf.type === Pbf.Bytes ?\n        pbf.readVarint() + pbf.pos : pbf.pos + 1;\n}\n\nfunction toNum(low, high, isSigned) {\n    if (isSigned) {\n        return high * 0x100000000 + (low >>> 0);\n    }\n\n    return ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\nfunction writeBigVarint(val, pbf) {\n    var low, high;\n\n    if (val >= 0) {\n        low  = (val % 0x100000000) | 0;\n        high = (val / 0x100000000) | 0;\n    } else {\n        low  = ~(-val % 0x100000000);\
 n        high = ~(-val / 0x100000000);\n\n        if (low ^ 0xffffffff) {\n            low = (low + 1) | 0;\n        } else {\n            low = 0;\n            high = (high + 1) | 0;\n        }\n    }\n\n    if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n        throw new Error('Given varint doesn\\'t fit into 10 bytes');\n    }\n\n    pbf.realloc(10);\n\n    writeBigVarintLow(low, high, pbf);\n    writeBigVarintHigh(high, pbf);\n}\n\nfunction writeBigVarintLow(low, high, pbf) {\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos]   = low & 0x7f;\n}\n\nfunction writeBigVarintHigh(high, pbf) {\n    var lsb = (high & 0x07) << 4;\n\n    pbf.buf[pbf.pos++] |= lsb         | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) 
 ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f;\n}\n\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n    var extraLen =\n        len <= 0x3fff ? 1 :\n        len <= 0x1fffff ? 2 :\n        len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));\n\n    // if 1 byte isn't enough for encoding message length, shift the data to the right\n    pbf.realloc(extraLen);\n    for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\nfunction writePackedVarint(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]);   }\nfunction writePackedSVarint(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]);  }\nfunction writePack
 edFloat(arr, pbf)    { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]);    }\nfunction writePackedDouble(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]);   }\nfunction writePackedBoolean(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]);  }\nfunction writePackedFixed32(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]);  }\nfunction writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }\nfunction writePackedFixed64(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]);  }\nfunction writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\nfunction readUInt32(buf, pos) {\n    return ((buf[pos]) |\n        (buf[pos + 1] << 8) |\n        (buf[pos + 2] << 16)) +\n        (buf[pos + 3] * 0x1000000);\n}\n\nfunction writeIn
 t32(buf, val, pos) {\n    buf[pos] = val;\n    buf[pos + 1] = (val >>> 8);\n    buf[pos + 2] = (val >>> 16);\n    buf[pos + 3] = (val >>> 24);\n}\n\nfunction readInt32(buf, pos) {\n    return ((buf[pos]) |\n        (buf[pos + 1] << 8) |\n        (buf[pos + 2] << 16)) +\n        (buf[pos + 3] << 24);\n}\n\nfunction readUtf8(buf, pos, end) {\n    var str = '';\n    var i = pos;\n\n    while (i < end) {\n        var b0 = buf[i];\n        var c = null; // codepoint\n        var bytesPerSequence =\n            b0 > 0xEF ? 4 :\n            b0 > 0xDF ? 3 :\n            b0 > 0xBF ? 2 : 1;\n\n        if (i + bytesPerSequence > end) break;\n\n        var b1, b2, b3;\n\n        if (bytesPerSequence === 1) {\n            if (b0 < 0x80) {\n                c = b0;\n            }\n        } else if (bytesPerSequence === 2) {\n            b1 = buf[i + 1];\n            if ((b1 & 0xC0) === 0x80) {\n                c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n                if (c <= 0x7F) {\n              
       c = null;\n                }\n            }\n        } else if (bytesPerSequence === 3) {\n            b1 = buf[i + 1];\n            b2 = buf[i + 2];\n            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n                c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n                if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n                    c = null;\n                }\n            }\n        } else if (bytesPerSequence === 4) {\n            b1 = buf[i + 1];\n            b2 = buf[i + 2];\n            b3 = buf[i + 3];\n            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n                c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n                if (c <= 0xFFFF || c >= 0x110000) {\n                    c = null;\n                }\n            }\n        }\n\n        if (c === null) {\n            c = 0xFFFD;\n            bytesPerSequence = 1;\n\n        } else if (c > 0xF
 FFF) {\n            c -= 0x10000;\n            str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n            c = 0xDC00 | c & 0x3FF;\n        }\n\n        str += String.fromCharCode(c);\n        i += bytesPerSequence;\n    }\n\n    return str;\n}\n\nfunction readUtf8TextDecoder(buf, pos, end) {\n    return utf8TextDecoder.decode(buf.subarray(pos, end));\n}\n\nfunction writeUtf8(buf, str, pos) {\n    for (var i = 0, c, lead; i < str.length; i++) {\n        c = str.charCodeAt(i); // code point\n\n        if (c > 0xD7FF && c < 0xE000) {\n            if (lead) {\n                if (c < 0xDC00) {\n                    buf[pos++] = 0xEF;\n                    buf[pos++] = 0xBF;\n                    buf[pos++] = 0xBD;\n                    lead = c;\n                    continue;\n                } else {\n                    c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n                    lead = null;\n                }\n            } else {\n                if (c > 0xDBFF || (i +
  1 === str.length)) {\n                    buf[pos++] = 0xEF;\n                    buf[pos++] = 0xBF;\n                    buf[pos++] = 0xBD;\n                } else {\n                    lead = c;\n                }\n                continue;\n            }\n        } else if (lead) {\n            buf[pos++] = 0xEF;\n            buf[pos++] = 0xBF;\n            buf[pos++] = 0xBD;\n            lead = null;\n        }\n\n        if (c < 0x80) {\n            buf[pos++] = c;\n        } else {\n            if (c < 0x800) {\n                buf[pos++] = c >> 0x6 | 0xC0;\n            } else {\n                if (c < 0x10000) {\n                    buf[pos++] = c >> 0xC | 0xE0;\n                } else {\n                    buf[pos++] = c >> 0x12 | 0xF0;\n                    buf[pos++] = c >> 0xC & 0x3F | 0x80;\n                }\n                buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n            }\n            buf[pos++] = c & 0x3F | 0x80;\n        }\n    }\n    return pos;\n}\n","// Gene
 rated by CoffeeScript 1.10.0\n(function() {\n  var families;\n\n  module.exports = {\n    icon: 'icons/google.svg',\n    name: 'google',\n    title: 'Google Fonts',\n    link: 'google.com/fonts',\n    getNames: function() {\n      return families;\n    },\n    getLink: function(name) {\n      return \"https://fonts.google.com/specimen/\" + (name.replace(/( )/g, '+'));\n    },\n    normalizeName: function(name) {\n      return name;\n    }\n  };\n\n  families = [\"ABeeZee\", \"Abel\", \"Abril Fatface\", \"Aclonica\", \"Acme\", \"Actor\", \"Adamina\", \"Advent Pro\", \"Aguafina Script\", \"Akronim\", \"Aladin\", \"Aldrich\", \"Alef\", \"Alegreya\", \"Alegreya SC\", \"Alegreya Sans\", \"Alegreya Sans SC\", \"Alex Brush\", \"Alfa Slab One\", \"Alice\", \"Alike\", \"Alike Angular\", \"Allan\", \"Allerta\", \"Allerta Stencil\", \"Allura\", \"Almendra\", \"Almendra Display\", \"Almendra SC\", \"Amarante\", \"Amaranth\", \"Amatic SC\", \"Amethysta\", \"Amiri\", \"Amita\", \"Anaheim\", \"And
 ada\", \"Andika\", \"Angkor\", \"Annie Use Your Telescope\", \"Anonymous Pro\", \"Antic\", \"Antic Didone\", \"Antic Slab\", \"Anton\", \"Arapey\", \"Arbutus\", \"Arbutus Slab\", \"Architects Daughter\", \"Archivo Black\", \"Archivo Narrow\", \"Arimo\", \"Arizonia\", \"Armata\", \"Artifika\", \"Arvo\", \"Arya\", \"Asap\", \"Asar\", \"Asset\", \"Astloch\", \"Asul\", \"Atomic Age\", \"Aubrey\", \"Audiowide\", \"Autour One\", \"Average\", \"Average Sans\", \"Averia Gruesa Libre\", \"Averia Libre\", \"Averia Sans Libre\", \"Averia Serif Libre\", \"Bad Script\", \"Balthazar\", \"Bangers\", \"Basic\", \"Battambang\", \"Baumans\", \"Bayon\", \"Belgrano\", \"Belleza\", \"BenchNine\", \"Bentham\", \"Berkshire Swash\", \"Bevan\", \"Bigelow Rules\", \"Bigshot One\", \"Bilbo\", \"Bilbo Swash Caps\", \"Biryani\", \"Bitter\", \"Black Ops One\", \"Bokor\", \"Bonbon\", \"Boogaloo\", \"Bowlby One\", \"Bowlby One SC\", \"Brawler\", \"Bree Serif\", \"Bubblegum Sans\", \"Bubbler One\", \"Buda\", \"Buen
 ard\", \"Butcherman\", \"Butterfly Kids\", \"Cabin\", \"Cabin Condensed\", \"Cabin Sketch\", \"Caesar Dressing\", \"Cagliostro\", \"Calligraffitti\", \"Cambay\", \"Cambo\", \"Candal\", \"Cantarell\", \"Cantata One\", \"Cantora One\", \"Capriola\", \"Cardo\", \"Carme\", \"Carrois Gothic\", \"Carrois Gothic SC\", \"Carter One\", \"Catamaran\", \"Caudex\", \"Caveat\", \"Caveat Brush\", \"Cedarville Cursive\", \"Ceviche One\", \"Changa One\", \"Chango\", \"Chau Philomene One\", \"Chela One\", \"Chelsea Market\", \"Chenla\", \"Cherry Cream Soda\", \"Cherry Swash\", \"Chewy\", \"Chicle\", \"Chivo\", \"Chonburi\", \"Cinzel\", \"Cinzel Decorative\", \"Clicker Script\", \"Coda\", \"Coda Caption\", \"Codystar\", \"Combo\", \"Comfortaa\", \"Coming Soon\", \"Concert One\", \"Condiment\", \"Content\", \"Contrail One\", \"Convergence\", \"Cookie\", \"Copse\", \"Corben\", \"Courgette\", \"Cousine\", \"Coustard\", \"Covered By Your Grace\", \"Crafty Girls\", \"Creepster\", \"Crete Round\", \"Crimso
 n Text\", \"Croissant One\", \"Crushed\", \"Cuprum\", \"Cutive\", \"Cutive Mono\", \"Damion\", \"Dancing Script\", \"Dangrek\", \"Dawning of a New Day\", \"Days One\", \"Dekko\", \"Delius\", \"Delius Swash Caps\", \"Delius Unicase\", \"Della Respira\", \"Denk One\", \"Devonshire\", \"Dhurjati\", \"Didact Gothic\", \"Diplomata\", \"Diplomata SC\", \"Domine\", \"Donegal One\", \"Doppio One\", \"Dorsa\", \"Dosis\", \"Dr Sugiyama\", \"Droid Sans\", \"Droid Sans Mono\", \"Droid Serif\", \"Duru Sans\", \"Dynalight\", \"EB Garamond\", \"Eagle Lake\", \"Eater\", \"Economica\", \"Eczar\", \"Ek Mukta\", \"Electrolize\", \"Elsie\", \"Elsie Swash Caps\", \"Emblema One\", \"Emilys Candy\", \"Engagement\", \"Englebert\", \"Enriqueta\", \"Erica One\", \"Esteban\", \"Euphoria Script\", \"Ewert\", \"Exo\", \"Exo 2\", \"Expletus Sans\", \"Fanwood Text\", \"Fascinate\", \"Fascinate Inline\", \"Faster One\", \"Fasthand\", \"Fauna One\", \"Federant\", \"Federo\", \"Felipa\", \"Fenix\", \"Finger Paint\",
  \"Fira Mono\", \"Fira Sans\", \"Fjalla One\", \"Fjord One\", \"Flamenco\", \"Flavors\", \"Fondamento\", \"Fontdiner Swanky\", \"Forum\", \"Francois One\", \"Freckle Face\", \"Fredericka the Great\", \"Fredoka One\", \"Freehand\", \"Fresca\", \"Frijole\", \"Fruktur\", \"Fugaz One\", \"GFS Didot\", \"GFS Neohellenic\", \"Gabriela\", \"Gafata\", \"Galdeano\", \"Galindo\", \"Gentium Basic\", \"Gentium Book Basic\", \"Geo\", \"Geostar\", \"Geostar Fill\", \"Germania One\", \"Gidugu\", \"Gilda Display\", \"Give You Glory\", \"Glass Antiqua\", \"Glegoo\", \"Gloria Hallelujah\", \"Goblin One\", \"Gochi Hand\", \"Gorditas\", \"Goudy Bookletter 1911\", \"Graduate\", \"Grand Hotel\", \"Gravitas One\", \"Great Vibes\", \"Griffy\", \"Gruppo\", \"Gudea\", \"Gurajada\", \"Habibi\", \"Halant\", \"Hammersmith One\", \"Hanalei\", \"Hanalei Fill\", \"Handlee\", \"Hanuman\", \"Happy Monkey\", \"Headland One\", \"Henny Penny\", \"Herr Von Muellerhoff\", \"Hind\", \"Hind Siliguri\", \"Hind Vadodara\", \
 "Holtwood One SC\", \"Homemade Apple\", \"Homenaje\", \"IM Fell DW Pica\", \"IM Fell DW Pica SC\", \"IM Fell Double Pica\", \"IM Fell Double Pica SC\", \"IM Fell English\", \"IM Fell English SC\", \"IM Fell French Canon\", \"IM Fell French Canon SC\", \"IM Fell Great Primer\", \"IM Fell Great Primer SC\", \"Iceberg\", \"Iceland\", \"Imprima\", \"Inconsolata\", \"Inder\", \"Indie Flower\", \"Inika\", \"Inknut Antiqua\", \"Irish Grover\", \"Istok Web\", \"Italiana\", \"Italianno\", \"Itim\", \"Jacques Francois\", \"Jacques Francois Shadow\", \"Jaldi\", \"Jim Nightshade\", \"Jockey One\", \"Jolly Lodger\", \"Josefin Sans\", \"Josefin Slab\", \"Joti One\", \"Judson\", \"Julee\", \"Julius Sans One\", \"Junge\", \"Jura\", \"Just Another Hand\", \"Just Me Again Down Here\", \"Kadwa\", \"Kalam\", \"Kameron\", \"Kantumruy\", \"Karla\", \"Karma\", \"Kaushan Script\", \"Kavoon\", \"Kdam Thmor\", \"Keania One\", \"Kelly Slab\", \"Kenia\", \"Khand\", \"Khmer\", \"Khula\", \"Kite One\", \"Knewave
 \", \"Kotta One\", \"Koulen\", \"Kranky\", \"Kreon\", \"Kristi\", \"Krona One\", \"Kurale\", \"La Belle Aurore\", \"Laila\", \"Lakki Reddy\", \"Lancelot\", \"Lateef\", \"Lato\", \"League Script\", \"Leckerli One\", \"Ledger\", \"Lekton\", \"Lemon\", \"Libre Baskerville\", \"Life Savers\", \"Lilita One\", \"Lily Script One\", \"Limelight\", \"Linden Hill\", \"Lobster\", \"Lobster Two\", \"Londrina Outline\", \"Londrina Shadow\", \"Londrina Sketch\", \"Londrina Solid\", \"Lora\", \"Love Ya Like A Sister\", \"Loved by the King\", \"Lovers Quarrel\", \"Luckiest Guy\", \"Lusitana\", \"Lustria\", \"Macondo\", \"Macondo Swash Caps\", \"Magra\", \"Maiden Orange\", \"Mako\", \"Mallanna\", \"Mandali\", \"Marcellus\", \"Marcellus SC\", \"Marck Script\", \"Margarine\", \"Marko One\", \"Marmelad\", \"Martel\", \"Martel Sans\", \"Marvel\", \"Mate\", \"Mate SC\", \"Maven Pro\", \"McLaren\", \"Meddon\", \"MedievalSharp\", \"Medula One\", \"Megrim\", \"Meie Script\", \"Merienda\", \"Merienda One\", 
 \"Merriweather\", \"Merriweather Sans\", \"Metal\", \"Metal Mania\", \"Metamorphous\", \"Metrophobic\", \"Michroma\", \"Milonga\", \"Miltonian\", \"Miltonian Tattoo\", \"Miniver\", \"Miss Fajardose\", \"Modak\", \"Modern Antiqua\", \"Molengo\", \"Molle\", \"Monda\", \"Monofett\", \"Monoton\", \"Monsieur La Doulaise\", \"Montaga\", \"Montez\", \"Montserrat\", \"Montserrat Alternates\", \"Montserrat Subrayada\", \"Moul\", \"Moulpali\", \"Mountains of Christmas\", \"Mouse Memoirs\", \"Mr Bedfort\", \"Mr Dafoe\", \"Mr De Haviland\", \"Mrs Saint Delafield\", \"Mrs Sheppards\", \"Muli\", \"Mystery Quest\", \"NTR\", \"Neucha\", \"Neuton\", \"New Rocker\", \"News Cycle\", \"Niconne\", \"Nixie One\", \"Nobile\", \"Nokora\", \"Norican\", \"Nosifer\", \"Nothing You Could Do\", \"Noticia Text\", \"Noto Sans\", \"Noto Serif\", \"Nova Cut\", \"Nova Flat\", \"Nova Mono\", \"Nova Oval\", \"Nova Round\", \"Nova Script\", \"Nova Slim\", \"Nova Square\", \"Numans\", \"Nunito\", \"Odor Mean Chey\", \"O
 ffside\", \"Old Standard TT\", \"Oldenburg\", \"Oleo Script\", \"Oleo Script Swash Caps\", \"Open Sans\", \"Open Sans Condensed\", \"Oranienbaum\", \"Orbitron\", \"Oregano\", \"Orienta\", \"Original Surfer\", \"Oswald\", \"Over the Rainbow\", \"Overlock\", \"Overlock SC\", \"Ovo\", \"Oxygen\", \"Oxygen Mono\", \"PT Mono\", \"PT Sans\", \"PT Sans Caption\", \"PT Sans Narrow\", \"PT Serif\", \"PT Serif Caption\", \"Pacifico\", \"Palanquin\", \"Palanquin Dark\", \"Paprika\", \"Parisienne\", \"Passero One\", \"Passion One\", \"Pathway Gothic One\", \"Patrick Hand\", \"Patrick Hand SC\", \"Patua One\", \"Paytone One\", \"Peddana\", \"Peralta\", \"Permanent Marker\", \"Petit Formal Script\", \"Petrona\", \"Philosopher\", \"Piedra\", \"Pinyon Script\", \"Pirata One\", \"Plaster\", \"Play\", \"Playball\", \"Playfair Display\", \"Playfair Display SC\", \"Podkova\", \"Poiret One\", \"Poller One\", \"Poly\", \"Pompiere\", \"Pontano Sans\", \"Poppins\", \"Port Lligat Sans\", \"Port Lligat Slab\
 ", \"Pragati Narrow\", \"Prata\", \"Preahvihear\", \"Press Start 2P\", \"Princess Sofia\", \"Prociono\", \"Prosto One\", \"Puritan\", \"Purple Purse\", \"Quando\", \"Quantico\", \"Quattrocento\", \"Quattrocento Sans\", \"Questrial\", \"Quicksand\", \"Quintessential\", \"Qwigley\", \"Racing Sans One\", \"Radley\", \"Rajdhani\", \"Raleway\", \"Raleway Dots\", \"Ramabhadra\", \"Ramaraja\", \"Rambla\", \"Rammetto One\", \"Ranchers\", \"Rancho\", \"Ranga\", \"Rationale\", \"Ravi Prakash\", \"Redressed\", \"Reenie Beanie\", \"Revalia\", \"Rhodium Libre\", \"Ribeye\", \"Ribeye Marrow\", \"Righteous\", \"Risque\", \"Roboto\", \"Roboto Condensed\", \"Roboto Mono\", \"Roboto Slab\", \"Rochester\", \"Rock Salt\", \"Rokkitt\", \"Romanesco\", \"Ropa Sans\", \"Rosario\", \"Rosarivo\", \"Rouge Script\", \"Rozha One\", \"Rubik\", \"Rubik Mono One\", \"Rubik One\", \"Ruda\", \"Rufina\", \"Ruge Boogie\", \"Ruluko\", \"Rum Raisin\", \"Ruslan Display\", \"Russo One\", \"Ruthie\", \"Rye\", \"Sacramento\
 ", \"Sahitya\", \"Sail\", \"Salsa\", \"Sanchez\", \"Sancreek\", \"Sansita One\", \"Sarala\", \"Sarina\", \"Sarpanch\", \"Satisfy\", \"Scada\", \"Scheherazade\", \"Schoolbell\", \"Seaweed Script\", \"Sevillana\", \"Seymour One\", \"Shadows Into Light\", \"Shadows Into Light Two\", \"Shanti\", \"Share\", \"Share Tech\", \"Share Tech Mono\", \"Shojumaru\", \"Short Stack\", \"Siemreap\", \"Sigmar One\", \"Signika\", \"Signika Negative\", \"Simonetta\", \"Sintony\", \"Sirin Stencil\", \"Six Caps\", \"Skranji\", \"Slabo 13px\", \"Slabo 27px\", \"Slackey\", \"Smokum\", \"Smythe\", \"Sniglet\", \"Snippet\", \"Snowburst One\", \"Sofadi One\", \"Sofia\", \"Sonsie One\", \"Sorts Mill Goudy\", \"Source Code Pro\", \"Source Sans Pro\", \"Source Serif Pro\", \"Special Elite\", \"Spicy Rice\", \"Spinnaker\", \"Spirax\", \"Squada One\", \"Sree Krushnadevaraya\", \"Stalemate\", \"Stalinist One\", \"Stardos Stencil\", \"Stint Ultra Condensed\", \"Stint Ultra Expanded\", \"Stoke\", \"Strait\", \"Sue E
 llen Francisco\", \"Sumana\", \"Sunshiney\", \"Supermercado One\", \"Sura\", \"Suranna\", \"Suravaram\", \"Suwannaphum\", \"Swanky and Moo Moo\", \"Syncopate\", \"Tangerine\", \"Taprom\", \"Tauri\", \"Teko\", \"Telex\", \"Tenali Ramakrishna\", \"Tenor Sans\", \"Text Me One\", \"The Girl Next Door\", \"Tienne\", \"Tillana\", \"Timmana\", \"Tinos\", \"Titan One\", \"Titillium Web\", \"Trade Winds\", \"Trocchi\", \"Trochut\", \"Trykker\", \"Tulpen One\", \"Ubuntu\", \"Ubuntu Condensed\", \"Ubuntu Mono\", \"Ultra\", \"Uncial Antiqua\", \"Underdog\", \"Unica One\", \"UnifrakturCook\", \"UnifrakturMaguntia\", \"Unkempt\", \"Unlock\", \"Unna\", \"VT323\", \"Vampiro One\", \"Varela\", \"Varela Round\", \"Vast Shadow\", \"Vesper Libre\", \"Vibur\", \"Vidaloka\", \"Viga\", \"Voces\", \"Volkhov\", \"Vollkorn\", \"Voltaire\", \"Waiting for the Sunrise\", \"Wallpoet\", \"Walter Turncoat\", \"Warnes\", \"Wellfleet\", \"Wendy One\", \"Wire One\", \"Work Sans\", \"Yanone Kaffeesatz\", \"Yantramanav
 \", \"Yellowtail\", \"Yeseva One\", \"Yesteryear\", \"Zeyada\"];\n\n}).call(this);\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <http://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instan
 ces,\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n *     incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n  try {\n    var arr = new Uint8Array(1)\n    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n    return arr.foo() === 42 && // typed array instances can be augmented\n        typeof arr.subarray === 'function' && // chrome 9
 -10 lack `subarray`\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n  } catch (e) {\n    return false\n  }\n}\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = new Uint8Array(length)\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    if (that === null) {\n      that = new Buffer(length)\n    }\n    that.length = length\n  }\n\n  return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` 
 methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype\n  return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    thro
 w new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype\n  Buffer.__proto__ = Uint8Array\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\n      Buffer[Symbol.species] === Buffer) {\n    // Fix subarray() in ES2016. See: https://github.co
 m/feross/buffer/pull/97\n    Object.defineProperty(Buffer, Symbol.species, {\n      value: null,\n      configurable: true\n    })\n  }\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  } else if (size < 0) {\n    throw new RangeError('\"size\" argument must not be negative')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(that, size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function 
 (size, fill, encoding) {\n  return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n  assertSize(size)\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; ++i) {\n      that[i] = 0\n    }\n  }\n  return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0\n  that = create
 Buffer(that, length)\n\n  var actual = that.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    that = that.slice(0, actual)\n  }\n\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\n  that = createBuffer(that, length)\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (byteOff
 set === undefined && length === undefined) {\n    array = new Uint8Array(array)\n  } else if (length === undefined) {\n    array = new Uint8Array(array, byteOffset)\n  } else {\n    array = new Uint8Array(array, byteOffset, length)\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = array\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    that = fromArrayLike(that, array)\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    that = createBuffer(that, len)\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len)\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n 
        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < kMaxLength()` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!Buffer.i
 sBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === und
 efined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i]\n    if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string\n  }\n\n  var len = string.length\n  if (len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'l
 atin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n      case undefined:\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6
 th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n  
       return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must 
 be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length | 0\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str 
 = ''\n  var max = exports.INSPECT_MAX_BYTES\n  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n    if (this.length > max) str += ' ... '\n  }\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>
 = 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\
 n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset  // Coerce to Number.\n  if (isNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is
  true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\n        typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding)
 .toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var i\n  if (dir) {\n    var foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; 
 i--) {\n      var found = true\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  // must be an even numb
 er of digits\n  var strLen = string.length\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (isNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffe
 r.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset | 0\n    if (isFinite(length)) {\n      length = length | 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  // legacy write(string, encoding, offset, length) - remove in v0.13\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length >
  0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n     
    encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n      : (firstByte > 0xBF) ? 2\n      : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n    
       break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n
             tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUME
 NTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || 
 end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; ++i) {\n    out += toHex(buf[i])\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end)\n    newBuf.__proto__ = Buffer.prototype\n  } else {\n    var sliceLen = end - start\n    newBuf = new Buffer(sliceLen, undefined)
 \n    for (var i = 0; i < sliceLen; ++i) {\n      newBuf[i] = this[i + start]\n    }\n  }\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n 
  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt3
 2BE = function readUInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[of
 fset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n
     (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.le
 ngth)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = 
 +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i
 ) * 8\n  }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n    buf[offs
 et + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n  }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 1] = (value >>> 8)\n    this[offset] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  ret
 urn offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mu
 l *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE
  (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 3] = (value >>> 24)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4,
  0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writ
 eFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetSt
 art) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n  var i\n\n  if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    // ascending copy from start\n    for (i = 0; i < len; ++i) {\n      ta
 rget[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if (code < 256) {\n        val = code\n      }\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.is
 Encoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    var bytes = Buffer.isBuffer(val)\n      ? val\n      : utf8ToBytes(new Buffer(val, encoding).toString())\n    var len = bytes.length\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  
 // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction stringtrim (str) {\n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n    
     // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.pu
 sh(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (st
 r, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i <
  len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\
 nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  var i\n  for (i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[c
 urByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3
 \n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(\n      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n    ))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n","/**\n * @module ol/util\n */\n/**\n * @return {?} Any return.\n */\nexport function abstract() {
 \n    return /** @type {?} */ ((function () {\n        throw new Error('Unimplemented abstract method.');\n    })());\n}\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nvar uidCounter_ = 0;\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with the same object as a parameter returns the same value. Unique IDs are generated\n * as a strictly increasing sequence. Adapted from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {string} The unique ID for the object.\n * @api\n */\nexport function getUid(obj) {\n    return obj.ol_uid || (obj.ol_uid = String(++uidCounter_));\n}\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport var VERSION = '6.4.2';\n//# sourceMappingURL=util.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Arra
 y && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/AssertionError\n */\nimport { VERSION } from './util.js';\n/**\n * Error object thrown when an assertion failed. This is an ECMA-262 Error,\n * extended with a `code` property.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error.\n */\nvar AssertionError = /** @class */ (function (_super) {\n    __extends(AssertionError, _super);\n    /**\n     * @param {number} code Error code.\n     */\n    function AssertionError(code) {\n        var _this = this;\n        var path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0]
 ;\n        var message = 'Assertion failed. See https://openlayers.org/en/' +\n            path +\n            '/doc/errors/#' +\n            code +\n            ' for details.';\n        _this = _super.call(this, message) || this;\n        /**\n         * Error code. The meaning of the code can be found on\n         * https://openlayers.org/en/latest/doc/errors/ (replace `latest` with\n         * the version found in the OpenLayers script's header comment if a version\n         * other than the latest is used).\n         * @type {number}\n         * @api\n         */\n        _this.code = code;\n        /**\n         * @type {string}\n         */\n        _this.name = 'AssertionError';\n        // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40\n        _this.message = message;\n        return _this;\n    }\n    return AssertionError;\n}(Error));\nexport default AssertionError;\n//# sourceMappingURL=AssertionError.js.map","/**\n * @module ol/events/Event\n */\
 n/**\n * @classdesc\n * Stripped down implementation of the W3C DOM Level 2 Event interface.\n * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface.\n *\n * This implementation only provides `type` and `target` properties, and\n * `stopPropagation` and `preventDefault` methods. It is meant as base class\n * for higher level events defined in the library, and works with\n * {@link module:ol/events/Target~Target}.\n */\nvar BaseEvent = /** @class */ (function () {\n    /**\n     * @param {string} type Type.\n     */\n    function BaseEvent(type) {\n        /**\n         * @type {boolean}\n         */\n        this.propagationStopped;\n        /**\n         * The event type.\n         * @type {string}\n         * @api\n         */\n        this.type = type;\n        /**\n         * The event target.\n         * @type {Object}\n         * @api\n         */\n        this.target = null;\n    }\n    /**\n     * Stop event propagation.\n     * @api\n     */\n    BaseE
 vent.prototype.preventDefault = function () {\n        this.propagationStopped = true;\n    };\n    /**\n     * Stop event propagation.\n     * @api\n     */\n    BaseEvent.prototype.stopPropagation = function () {\n        this.propagationStopped = true;\n    };\n    return BaseEvent;\n}());\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n    evt.stopPropagation();\n}\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n    evt.preventDefault();\n}\nexport default BaseEvent;\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/ObjectEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered when a property is changed.\n     * @event module:ol/Object.ObjectEvent#propertychange\n     * @api\n     */\n    PROPERTYCHANGE: 'propertychange',\n};\n//# sourceMappingURL=ObjectEventType.js.map","/**\n * @module ol/Disposable\n */\n/**\n * @c
 lassdesc\n * Objects that need to clean up after themselves.\n */\nvar Disposable = /** @class */ (function () {\n    function Disposable() {\n        /**\n         * The object has already been disposed.\n         * @type {boolean}\n         * @protected\n         */\n        this.disposed = false;\n    }\n    /**\n     * Clean up.\n     */\n    Disposable.prototype.dispose = function () {\n        if (!this.disposed) {\n            this.disposed = true;\n            this.disposeInternal();\n        }\n    };\n    /**\n     * Extension point for disposable objects.\n     * @protected\n     */\n    Disposable.prototype.disposeInternal = function () { };\n    return Disposable;\n}());\nexport default Disposable;\n//# sourceMappingURL=Disposable.js.map","/**\n * @module ol/array\n */\n/**\n * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.\n * https://github.com/darkskyapp/binary-search\n *\n * @par
 am {Array<*>} haystack Items to search through.\n * @param {*} needle The item to look for.\n * @param {Function=} opt_comparator Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nexport function binarySearch(haystack, needle, opt_comparator) {\n    var mid, cmp;\n    var comparator = opt_comparator || numberSafeCompareFunction;\n    var low = 0;\n    var high = haystack.length;\n    var found = false;\n    while (low < high) {\n        /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n         * to double (which gives the wrong results). */\n        mid = low + ((high - low) >> 1);\n        cmp = +comparator(haystack[mid], needle);\n        if (cmp < 0.0) {\n            /* Too low. */\n            low = mid + 1;\n        }\n        else {\n            /* Key found or too high */\n            high = mid;\n            found = !cmp;\n        }\n    }\n    /* Key not found. */\n    return found ? low : ~low;\n}\n/**\n 
 * Compare function for array sort that is safe for numbers.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n *     argument is less than, equal to, or greater than the second.\n */\nexport function numberSafeCompareFunction(a, b) {\n    return a > b ? 1 : a < b ? -1 : 0;\n}\n/**\n * Whether the array contains the given object.\n * @param {Array<*>} arr The array to test for the presence of the element.\n * @param {*} obj The object for which to test.\n * @return {boolean} The object is in the array.\n */\nexport function includes(arr, obj) {\n    return arr.indexOf(obj) >= 0;\n}\n/**\n * @param {Array<number>} arr Array.\n * @param {number} target Target.\n * @param {number} direction 0 means return the nearest, > 0\n *    means return the largest nearest, < 0 means return the\n *    smallest nearest.\n * @return {number} Index.\n */\nexport function 
 linearFindNearest(arr, target, direction) {\n    var n = arr.length;\n    if (arr[0] <= target) {\n        return 0;\n    }\n    else if (target <= arr[n - 1]) {\n        return n - 1;\n    }\n    else {\n        var i = void 0;\n        if (direction > 0) {\n            for (i = 1; i < n; ++i) {\n                if (arr[i] < target) {\n                    return i - 1;\n                }\n            }\n        }\n        else if (direction < 0) {\n            for (i = 1; i < n; ++i) {\n                if (arr[i] <= target) {\n                    return i;\n                }\n            }\n        }\n        else {\n            for (i = 1; i < n; ++i) {\n                if (arr[i] == target) {\n                    return i;\n                }\n                else if (arr[i] < target) {\n                    if (arr[i - 1] - target < target - arr[i]) {\n                        return i - 1;\n                    }\n                    else {\n                        return i;\n     
                }\n                }\n            }\n        }\n        return n - 1;\n    }\n}\n/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nexport function reverseSubArray(arr, begin, end) {\n    while (begin < end) {\n        var tmp = arr[begin];\n        arr[begin] = arr[end];\n        arr[end] = tmp;\n        ++begin;\n        --end;\n    }\n}\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {!Array<VALUE>|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n    var extension = Array.isArray(data) ? data : [data];\n    var length = extension.length;\n    for (var i = 0; i < length; i++) {\n        arr[arr.length] = extension[i];\n    }\n}\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nexpor
 t function remove(arr, obj) {\n    var i = arr.indexOf(obj);\n    var found = i > -1;\n    if (found) {\n        arr.splice(i, 1);\n    }\n    return found;\n}\n/**\n * @param {Array<VALUE>} arr The array to search in.\n * @param {function(VALUE, number, ?) : boolean} func The function to compare.\n * @template VALUE\n * @return {VALUE|null} The element found or null.\n */\nexport function find(arr, func) {\n    var length = arr.length >>> 0;\n    var value;\n    for (var i = 0; i < length; i++) {\n        value = arr[i];\n        if (func(value, i, arr)) {\n            return value;\n        }\n    }\n    return null;\n}\n/**\n * @param {Array|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nexport function equals(arr1, arr2) {\n    var len1 = arr1.length;\n    if (len1 !== arr2.length) {\n        return false;\n    }\n    for (var i = 0; i < len1;
  i++) {\n        if (arr1[i] !== arr2[i]) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Sort the passed array such that the relative order of equal elements is preverved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\nexport function stableSort(arr, compareFnc) {\n    var length = arr.length;\n    var tmp = Array(arr.length);\n    var i;\n    for (i = 0; i < length; i++) {\n        tmp[i] = { index: i, value: arr[i] };\n    }\n    tmp.sort(function (a, b) {\n        return compareFnc(a.value, b.value) || a.index - b.index;\n    });\n    for (i = 0; i < arr.length; i++) {\n        arr[i] = tmp[i].value;\n    }\n}\n/**\n * @param {Array<*>} arr The array to search in.\n * @param {Function} func Comparison function.\n * @return {number} Return index.\n */\nexport function findI
 ndex(arr, func) {\n    var index;\n    var found = !arr.every(function (el, idx) {\n        index = idx;\n        return !func(el, idx, arr);\n    });\n    return found ? index : -1;\n}\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function=} opt_func Comparison function.\n * @param {boolean=} opt_strict Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, opt_func, opt_strict) {\n    var compare = opt_func || numberSafeCompareFunction;\n    return arr.every(function (currentVal, index) {\n        if (index === 0) {\n            return true;\n        }\n        var res = compare(arr[index - 1], currentVal);\n        return !(res > 0 || (opt_strict && res === 0));\n    });\n}\n//# sourceMappingURL=array.js.map","/**\n * @module ol/functions\n */\nimport { equals as arrayEquals } from './array.js';\n/**\n * Always returns true.\n * @returns {boolean} true.\n */\nexport function TRUE() {\n    return true;\n}\n/**\n * A
 lways returns false.\n * @returns {boolean} false.\n */\nexport function FALSE() {\n    return false;\n}\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {void} Nothing.\n */\nexport function VOID() { }\n/**\n * Wrap a function in another function that remembers the last return.  If the\n * returned function is called twice in a row with the same arguments and the same\n * this object, it will return the value from the first call in the second call.\n *\n * @param {function(...any): ReturnType} fn The function to memoize.\n * @return {function(...any): ReturnType} The memoized function.\n * @template ReturnType\n */\nexport function memoizeOne(fn) {\n    var called = false;\n    /** @type {ReturnType} */\n    var lastResult;\n    /** @type {Array<any>} */\n    var lastArgs;\n    var lastThis;\n    return function () {\n        var nextArgs = Array.prototype.slice.call(arguments);\n        if (!called || this !== lastThis || !arrayEquals(nextArgs, l
 astArgs)) {\n            called = true;\n            lastThis = this;\n            lastArgs = nextArgs;\n            lastResult = fn.apply(this, arguments);\n        }\n        return lastResult;\n    };\n}\n//# sourceMappingURL=functions.js.map","/**\n * @module ol/obj\n */\n/**\n * Polyfill for Object.assign().  Assigns enumerable and own properties from\n * one or more source objects to a target object.\n * See https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign.\n *\n * @param {!Object} target The target object.\n * @param {...Object} var_sources The source object(s).\n * @return {!Object} The modified target object.\n */\nexport var assign = typeof Object.assign === 'function'\n    ? Object.assign\n    : function (target, var_sources) {\n        if (target === undefined || target === null) {\n            throw new TypeError('Cannot convert undefined or null to object');\n        }\n        var output = Object(target);\n        for (var i 
 = 1, ii = arguments.length; i < ii; ++i) {\n            var source = arguments[i];\n            if (source !== undefined && source !== null) {\n                for (var key in source) {\n                    if (source.hasOwnProperty(key)) {\n                        output[key] = source[key];\n                    }\n                }\n            }\n        }\n        return output;\n    };\n/**\n * Removes all properties from an object.\n * @param {Object} object The object to clear.\n */\nexport function clear(object) {\n    for (var property in object) {\n        delete object[property];\n    }\n}\n/**\n * Polyfill for Object.values().  Get an array of property values from an object.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values\n *\n * @param {!Object<K,V>} object The object from which to get the values.\n * @return {!Array<V>} The property values.\n * @template K,V\n */\nexport var getValues = typeof Object.values === 'fun
 ction'\n    ? Object.values\n    : function (object) {\n        var values = [];\n        for (var property in object) {\n            values.push(object[property]);\n        }\n        return values;\n    };\n/**\n * Determine if an object has any properties.\n * @param {Object} object The object to check.\n * @return {boolean} The object is empty.\n */\nexport function isEmpty(object) {\n    var property;\n    for (property in object) {\n        return false;\n    }\n    return !property;\n}\n//# sourceMappingURL=obj.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { 
 this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport Event from './Event.js';\nimport { VOID } from '../functions.js';\nimport { clear } from '../obj.js';\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n/**\n * @classdesc\n * A simplified implementation of the W3C DOM Level 2 EventTarget interface.\n * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.\n *\n * There are two important simplifications compared to the specification:\n *\n * 1. The handling of `useCapture` in `addEventListener` and\n *    `removeEventListener`. There is no real capture model.\n * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.\n *    There is no event target hierarchy. When a listener calls\n *    `stopPropagation` or `preventDefault` on an event ob
 ject, it means that no\n *    more listeners after this one will be called. Same as when the listener\n *    returns false.\n */\nvar Target = /** @class */ (function (_super) {\n    __extends(Target, _super);\n    /**\n     * @param {*=} opt_target Default event target for dispatched events.\n     */\n    function Target(opt_target) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {*}\n         */\n        _this.eventTarget_ = opt_target;\n        /**\n         * @private\n         * @type {Object<string, number>}\n         */\n        _this.pendingRemovals_ = null;\n        /**\n         * @private\n         * @type {Object<string, number>}\n         */\n        _this.dispatching_ = null;\n        /**\n         * @private\n         * @type {Object<string, Array<import(\"../events.js\").Listener>>}\n         */\n        _this.listeners_ = null;\n        return _this;\n    }\n    /**\n     * @param {string} type Type.\n     * @par
 am {import(\"../events.js\").Listener} listener Listener.\n     */\n    Target.prototype.addEventListener = function (type, listener) {\n        if (!type || !listener) {\n            return;\n        }\n        var listeners = this.listeners_ || (this.listeners_ = {});\n        var listenersForType = listeners[type] || (listeners[type] = []);\n        if (listenersForType.indexOf(listener) === -1) {\n            listenersForType.push(listener);\n        }\n    };\n    /**\n     * Dispatches an event and calls all listeners listening for events\n     * of this type. The event parameter can either be a string or an\n     * Object with a `type` property.\n     *\n     * @param {import(\"./Event.js\").default|string} event Event object.\n     * @return {boolean|undefined} `false` if anyone called preventDefault on the\n     *     event object or if any of the listeners returned false.\n     * @api\n     */\n    Target.prototype.dispatchEvent = function (event) {\n        /** @type {imp
 ort(\"./Event.js\").default|Event} */\n        var evt = typeof event === 'string' ? new Event(event) : event;\n        var type = evt.type;\n        if (!evt.target) {\n            evt.target = this.eventTarget_ || this;\n        }\n        var listeners = this.listeners_ && this.listeners_[type];\n        var propagate;\n        if (listeners) {\n            var dispatching = this.dispatching_ || (this.dispatching_ = {});\n            var pendingRemovals = this.pendingRemovals_ || (this.pendingRemovals_ = {});\n            if (!(type in dispatching)) {\n                dispatching[type] = 0;\n                pendingRemovals[type] = 0;\n            }\n            ++dispatching[type];\n            for (var i = 0, ii = listeners.length; i < ii; ++i) {\n                if ('handleEvent' in listeners[i]) {\n                    propagate = /** @type {import(\"../events.js\").ListenerObject} */ (listeners[i]).handleEvent(evt);\n                }\n                else {\n                 
    propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (listeners[i]).call(this, evt);\n                }\n                if (propagate === false || evt.propagationStopped) {\n                    propagate = false;\n                    break;\n                }\n            }\n            --dispatching[type];\n            if (dispatching[type] === 0) {\n                var pr = pendingRemovals[type];\n                delete pendingRemovals[type];\n                while (pr--) {\n                    this.removeEventListener(type, VOID);\n                }\n                delete dispatching[type];\n            }\n            return propagate;\n        }\n    };\n    /**\n     * Clean up.\n     */\n    Target.prototype.disposeInternal = function () {\n        this.listeners_ && clear(this.listeners_);\n    };\n    /**\n     * Get the listeners for a specified event type. Listeners are returned in the\n     * order that they will be called in.\n     *\n     * @param {
 string} type Type.\n     * @return {Array<import(\"../events.js\").Listener>|undefined} Listeners.\n     */\n    Target.prototype.getListeners = function (type) {\n        return (this.listeners_ && this.listeners_[type]) || undefined;\n    };\n    /**\n     * @param {string=} opt_type Type. If not provided,\n     *     `true` will be returned if this event target has any listeners.\n     * @return {boolean} Has listeners.\n     */\n    Target.prototype.hasListener = function (opt_type) {\n        if (!this.listeners_) {\n            return false;\n        }\n        return opt_type\n            ? opt_type in this.listeners_\n            : Object.keys(this.listeners_).length > 0;\n    };\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../events.js\").Listener} listener Listener.\n     */\n    Target.prototype.removeEventListener = function (type, listener) {\n        var listeners = this.listeners_ && this.listeners_[type];\n        if (listeners) {\n           
  var index = listeners.indexOf(listener);\n            if (index !== -1) {\n                if (this.pendingRemovals_ && type in this.pendingRemovals_) {\n                    // make listener a no-op, and remove later in #dispatchEvent()\n                    listeners[index] = VOID;\n                    ++this.pendingRemovals_[type];\n                }\n                else {\n                    listeners.splice(index, 1);\n                    if (listeners.length === 0) {\n                        delete this.listeners_[type];\n                    }\n                }\n            }\n        }\n    };\n    return Target;\n}(Disposable));\nexport default Target;\n//# sourceMappingURL=Target.js.map","/**\n * @module ol/events/EventType\n */\n/**\n * @enum {string}\n * @const\n */\nexport default {\n    /**\n     * Generic change event. Triggered when the revision counter is increased.\n     * @event module:ol/events/Event~BaseEvent#change\n     * @api\n     */\n    CHANGE: 'change',\
 n    /**\n     * Generic error event. Triggered when an error occurs.\n     * @event module:ol/events/Event~BaseEvent#error\n     * @api\n     */\n    ERROR: 'error',\n    BLUR: 'blur',\n    CLEAR: 'clear',\n    CONTEXTMENU: 'contextmenu',\n    CLICK: 'click',\n    DBLCLICK: 'dblclick',\n    DRAGENTER: 'dragenter',\n    DRAGOVER: 'dragover',\n    DROP: 'drop',\n    FOCUS: 'focus',\n    KEYDOWN: 'keydown',\n    KEYPRESS: 'keypress',\n    LOAD: 'load',\n    RESIZE: 'resize',\n    TOUCHMOVE: 'touchmove',\n    WHEEL: 'wheel',\n};\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/events\n */\nimport { clear } from './obj.js';\n/**\n * Key to use with {@link module:ol/Observable~Observable#unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener\n * @property {import(\"./events/Target.js\").EventTargetLike} target\n * @property {string} type\n * @api\n */\n/**\n * Listener function. This function is called with an event object as argument.\n * When the
  function returns `false`, event propagation will stop.\n *\n * @typedef {function((Event|import(\"./events/Event.js\").default)): (void|boolean)} ListenerFunction\n * @api\n */\n/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent\n */\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\n/**\n * Registers an event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` to a `this` object, and returns\n * a key for use with {@link module:ol/events~unlistenByKey}.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object=} opt_this Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @param {boolean=} opt_once If true, add the listener a
 s one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nexport function listen(target, type, listener, opt_this, opt_once) {\n    if (opt_this && opt_this !== target) {\n        listener = listener.bind(opt_this);\n    }\n    if (opt_once) {\n        var originalListener_1 = listener;\n        listener = function () {\n            target.removeEventListener(type, listener);\n            originalListener_1.apply(this, arguments);\n        };\n    }\n    var eventsKey = {\n        target: target,\n        type: type,\n        listener: listener,\n    };\n    target.addEventListener(type, listener);\n    return eventsKey;\n}\n/**\n * Registers a one-off event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` as self-unregistering listener\n * to a `this` object, and returns a key for use with\n * {@link module:ol/events~unlist
 enByKey} in case the listener needs to be\n * unregistered before it is called.\n *\n * When {@link module:ol/events~listen} is called with the same arguments after this\n * function, the self-unregistering listener will be turned into a permanent\n * listener.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object=} opt_this Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\nexport function listenOnce(target, type, listener, opt_this) {\n    return listen(target, type, listener, opt_this, true);\n}\n/**\n * Unregisters event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * The argument passed to this function is the key returned from\n * {@link module:ol/events~lis
 ten} or {@link module:ol/events~listenOnce}.\n *\n * @param {EventsKey} key The key.\n */\nexport function unlistenByKey(key) {\n    if (key && key.target) {\n        key.target.removeEventListener(key.type, key.listener);\n        clear(key);\n    }\n}\n//# sourceMappingURL=events.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Observable\n */\nimport EventTarget from './events/Target.js';\nimport EventType from '
 ./events/EventType.js';\nimport { listen, listenOnce, unlistenByKey } from './events.js';\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * An event target providing convenient methods for listener registration\n * and unregistration. A generic `change` event is always available through\n * {@link module:ol/Observable~Observable#changed}.\n *\n * @fires import(\"./events/Event.js\").default\n * @api\n */\nvar Observable = /** @class */ (function (_super) {\n    __extends(Observable, _super);\n    function Observable() {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.revision_ = 0;\n        return _this;\n    }\n    /**\n     * Increases the revision counter and dispatches a 'change' event.\n     * @api\n     */\n    Observable.prototype.changed = function () {\n        ++this.revision_;\n        this.dispatchEvent(Event
 Type.CHANGE);\n    };\n    /**\n     * Get the version number for this object.  Each time the object is modified,\n     * its version number will be incremented.\n     * @return {number} Revision.\n     * @api\n     */\n    Observable.prototype.getRevision = function () {\n        return this.revision_;\n    };\n    /**\n     * Listen for a certain type of event.\n     * @param {string|Array<string>} type The event type or array of event types.\n     * @param {function(?): ?} listener The listener function.\n     * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n     *     called with an array of event types as the first argument, the return\n     *     will be an array of keys.\n     * @api\n     */\n    Observable.prototype.on = function (type, listener) {\n        if (Array.isArray(type)) {\n            var len = type.length;\n            var keys = new Array(len);\n            for (var i = 0; i < len; ++i) {\n
                 keys[i] = listen(this, type[i], listener);\n            }\n            return keys;\n        }\n        else {\n            return listen(this, /** @type {string} */ (type), listener);\n        }\n    };\n    /**\n     * Listen once for a certain type of event.\n     * @param {string|Array<string>} type The event type or array of event types.\n     * @param {function(?): ?} listener The listener function.\n     * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n     *     called with an array of event types as the first argument, the return\n     *     will be an array of keys.\n     * @api\n     */\n    Observable.prototype.once = function (type, listener) {\n        var key;\n        if (Array.isArray(type)) {\n            var len = type.length;\n            key = new Array(len);\n            for (var i = 0; i < len; ++i) {\n                key[i] = listenOnce(this, type[i], listener);\n          
   }\n        }\n        else {\n            key = listenOnce(this, /** @type {string} */ (type), listener);\n        }\n        /** @type {Object} */ (listener).ol_key = key;\n        return key;\n    };\n    /**\n     * Unlisten for a certain type of event.\n     * @param {string|Array<string>} type The event type or array of event types.\n     * @param {function(?): ?} listener The listener function.\n     * @api\n     */\n    Observable.prototype.un = function (type, listener) {\n        var key = /** @type {Object} */ (listener).ol_key;\n        if (key) {\n            unByKey(key);\n        }\n        else if (Array.isArray(type)) {\n            for (var i = 0, ii = type.length; i < ii; ++i) {\n                this.removeEventListener(type[i], listener);\n            }\n        }\n        else {\n            this.removeEventListener(type, listener);\n        }\n    };\n    return Observable;\n}(EventTarget));\n/**\n * Removes an event listener using the key returned by `on()` o
 r `once()`.\n * @param {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} key The key returned by `on()`\n *     or `once()` (or an array of keys).\n * @api\n */\nexport function unByKey(key) {\n    if (Array.isArray(key)) {\n        for (var i = 0, ii = key.length; i < ii; ++i) {\n            unlistenByKey(key[i]);\n        }\n    }\n    else {\n        unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n    }\n}\nexport default Observable;\n//# sourceMappingURL=Observable.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() {
  this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Object\n */\nimport Event from './events/Event.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport { assign, isEmpty } from './obj.js';\nimport { getUid } from './util.js';\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nvar ObjectEvent = /** @class */ (function (_super) {\n    __extends(ObjectEvent, _super);\n    /**\n     * @param {string} type The event type.\n     * @param {string} key The property name.\n     * @param {*} oldValue The old value for `key`.\n     */\n    function ObjectEvent(type, key, oldValue) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The name of the property whose value is changing.\n         * @type {string}\n         * @api\n         */\n 
        _this.key = key;\n        /**\n         * The old value. To get the new value use `e.target.get(e.key)` where\n         * `e` is the event object.\n         * @type {*}\n         * @api\n         */\n        _this.oldValue = oldValue;\n        return _this;\n    }\n    return ObjectEvent;\n}(Event));\nexport { ObjectEvent };\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Most non-trivial classes inherit from this.\n *\n * This extends {@link module:ol/Observable} with observable\n * properties, where each property is observable as well as the object as a\n * whole.\n *\n * Classes that inherit from this have pre-defined properties, to which you can\n * add your owns. The pre-defined properties are listed in this documentation as\n * 'Observable Properties', and have their own accessors; for example,\n * {@link module:ol/Map~Map} has a `target` property, accessed with\n * `getTarget()` and changed w
 ith `setTarget()`. Not all properties are however\n * settable. There are also general-purpose accessors `get()` and `set()`. For\n * example, `get('target')` is equivalent to `getTarget()`.\n *\n * The `set` accessors trigger a change event, and you can monitor this by\n * registering a listener. For example, {@link module:ol/View~View} has a\n * `center` property, so `view.on('change:center', function(evt) {...});` would\n * call the function whenever the value of the center property changes. Within\n * the function, `evt.target` would be the view, so `evt.target.getCenter()`\n * would return the new center.\n *\n * You can add your own observable properties with\n * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.\n * You can listen for changes on that property value with\n * `object.on('change:prop', listener)`. You can get a list of all\n * properties with {@link module:ol/Object~BaseObject#getProperties}.\n *\n * Note that the observable properties a
 re separate from standard JS properties.\n * You can, for example, give your map object a title with\n * `map.title='New title'` and with `map.set('title', 'Another title')`. The\n * first will be a `hasOwnProperty`; the second will appear in\n * `getProperties()`. Only the second is observable.\n *\n * Properties can be deleted by using the unset method. E.g.\n * object.unset('foo').\n *\n * @fires ObjectEvent\n * @api\n */\nvar BaseObject = /** @class */ (function (_super) {\n    __extends(BaseObject, _super);\n    /**\n     * @param {Object<string, *>=} opt_values An object with key-value pairs.\n     */\n    function BaseObject(opt_values) {\n        var _this = _super.call(this) || this;\n        // Call {@link module:ol/util~getUid} to ensure that the order of objects' ids is\n        // the same as the order in which they were created.  This also helps to\n        // ensure that object properties are always added in the same order, which\n        // helps many JavaScript engi
 nes generate faster code.\n        getUid(_this);\n        /**\n         * @private\n         * @type {Object<string, *>}\n         */\n        _this.values_ = null;\n        if (opt_values !== undefined) {\n            _this.setProperties(opt_values);\n        }\n        return _this;\n    }\n    /**\n     * Gets a value.\n     * @param {string} key Key name.\n     * @return {*} Value.\n     * @api\n     */\n    BaseObject.prototype.get = function (key) {\n        var value;\n        if (this.values_ && this.values_.hasOwnProperty(key)) {\n            value = this.values_[key];\n        }\n        return value;\n    };\n    /**\n     * Get a list of object property names.\n     * @return {Array<string>} List of property names.\n     * @api\n     */\n    BaseObject.prototype.getKeys = function () {\n        return (this.values_ && Object.keys(this.values_)) || [];\n    };\n    /**\n     * Get an object of all property names and values.\n     * @return {Object<string, *>} Object.\n  
    * @api\n     */\n    BaseObject.prototype.getProperties = function () {\n        return (this.values_ && assign({}, this.values_)) || {};\n    };\n    /**\n     * @return {boolean} The object has properties.\n     */\n    BaseObject.prototype.hasProperties = function () {\n        return !!this.values_;\n    };\n    /**\n     * @param {string} key Key name.\n     * @param {*} oldValue Old value.\n     */\n    BaseObject.prototype.notify = function (key, oldValue) {\n        var eventType;\n        eventType = getChangeEventType(key);\n        this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n        eventType = ObjectEventType.PROPERTYCHANGE;\n        this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n    };\n    /**\n     * Sets a value.\n     * @param {string} key Key name.\n     * @param {*} value Value.\n     * @param {boolean=} opt_silent Update without triggering an event.\n     * @api\n     */\n    BaseObject.prototype.set = function (key, value,
  opt_silent) {\n        var values = this.values_ || (this.values_ = {});\n        if (opt_silent) {\n            values[key] = value;\n        }\n        else {\n            var oldValue = values[key];\n            values[key] = value;\n            if (oldValue !== value) {\n                this.notify(key, oldValue);\n            }\n        }\n    };\n    /**\n     * Sets a collection of key-value pairs.  Note that this changes any existing\n     * properties and adds new ones (it does not remove any existing properties).\n     * @param {Object<string, *>} values Values.\n     * @param {boolean=} opt_silent Update without triggering an event.\n     * @api\n     */\n    BaseObject.prototype.setProperties = function (values, opt_silent) {\n        for (var key in values) {\n            this.set(key, values[key], opt_silent);\n        }\n    };\n    /**\n     * Unsets a property.\n     * @param {string} key Key name.\n     * @param {boolean=} opt_silent Unset without triggering an ev
 ent.\n     * @api\n     */\n    BaseObject.prototype.unset = function (key, opt_silent) {\n        if (this.values_ && key in this.values_) {\n            var oldValue = this.values_[key];\n            delete this.values_[key];\n            if (isEmpty(this.values_)) {\n                this.values_ = null;\n            }\n            if (!opt_silent) {\n                this.notify(key, oldValue);\n            }\n        }\n    };\n    return BaseObject;\n}(Observable));\n/**\n * @type {Object<string, string>}\n */\nvar changeEventTypeCache = {};\n/**\n * @param {string} key Key name.\n * @return {string} Change name.\n */\nexport function getChangeEventType(key) {\n    return changeEventTypeCache.hasOwnProperty(key)\n        ? changeEventTypeCache[key]\n        : (changeEventTypeCache[key] = 'change:' + key);\n}\nexport default BaseObject;\n//# sourceMappingURL=Object.js.map","/**\n * @module ol/CollectionEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     *
  Triggered when an item is added to the collection.\n     * @event module:ol/Collection.CollectionEvent#add\n     * @api\n     */\n    ADD: 'add',\n    /**\n     * Triggered when an item is removed from the collection.\n     * @event module:ol/Collection.CollectionEvent#remove\n     * @api\n     */\n    REMOVE: 'remove',\n};\n//# sourceMappingURL=CollectionEventType.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/C
 ollection\n */\nimport AssertionError from './AssertionError.js';\nimport BaseObject from './Object.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport Event from './events/Event.js';\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    LENGTH: 'length',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n */\nvar CollectionEvent = /** @class */ (function (_super) {\n    __extends(CollectionEvent, _super);\n    /**\n     * @param {import(\"./CollectionEventType.js\").default} type Type.\n     * @param {*=} opt_element Element.\n     * @param {number=} opt_index The index of the added or removed element.\n     */\n    function CollectionEvent(type, opt_element, opt_index) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The element that is added to or removed from the collection.\n         * @type {*}\n         * @api\n         */\n        _th
 is.element = opt_element;\n        /**\n         * The index of the added or removed element.\n         * @type {number}\n         * @api\n         */\n        _this.index = opt_index;\n        return _this;\n    }\n    return CollectionEvent;\n}(Event));\nexport { CollectionEvent };\n/**\n * @typedef {Object} Options\n * @property {boolean} [unique=false] Disallow the same item from being added to\n * the collection twice.\n */\n/**\n * @classdesc\n * An expanded version of standard JS Array, adding convenience methods for\n * manipulation. Add and remove changes to the Collection trigger a Collection\n * event. Note that this does not cover changes to the objects _within_ the\n * Collection; they trigger events on the appropriate object, not on the\n * Collection as a whole.\n *\n * @fires CollectionEvent\n *\n * @template T\n * @api\n */\nvar Collection = /** @class */ (function (_super) {\n    __extends(Collection, _super);\n    /**\n     * @param {Array<T>=} opt_array Array.\n 
     * @param {Options=} opt_options Collection options.\n     */\n    function Collection(opt_array, opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.unique_ = !!options.unique;\n        /**\n         * @private\n         * @type {!Array<T>}\n         */\n        _this.array_ = opt_array ? opt_array : [];\n        if (_this.unique_) {\n            for (var i = 0, ii = _this.array_.length; i < ii; ++i) {\n                _this.assertUnique_(_this.array_[i], i);\n            }\n        }\n        _this.updateLength_();\n        return _this;\n    }\n    /**\n     * Remove all elements from the collection.\n     * @api\n     */\n    Collection.prototype.clear = function () {\n        while (this.getLength() > 0) {\n            this.pop();\n        }\n    };\n    /**\n     * Add elements to the collection.  This pushes each item in the provide
 d array\n     * to the end of the collection.\n     * @param {!Array<T>} arr Array.\n     * @return {Collection<T>} This collection.\n     * @api\n     */\n    Collection.prototype.extend = function (arr) {\n        for (var i = 0, ii = arr.length; i < ii; ++i) {\n            this.push(arr[i]);\n        }\n        return this;\n    };\n    /**\n     * Iterate over each element, calling the provided callback.\n     * @param {function(T, number, Array<T>): *} f The function to call\n     *     for every element. This function takes 3 arguments (the element, the\n     *     index and the array). The return value is ignored.\n     * @api\n     */\n    Collection.prototype.forEach = function (f) {\n        var array = this.array_;\n        for (var i = 0, ii = array.length; i < ii; ++i) {\n            f(array[i], i, array);\n        }\n    };\n    /**\n     * Get a reference to the underlying Array object. Warning: if the array\n     * is mutated, no events will be dispatched by the coll
 ection, and the\n     * collection's \"length\" property won't be in sync with the actual length\n     * of the array.\n     * @return {!Array<T>} Array.\n     * @api\n     */\n    Collection.prototype.getArray = function () {\n        return this.array_;\n    };\n    /**\n     * Get the element at the provided index.\n     * @param {number} index Index.\n     * @return {T} Element.\n     * @api\n     */\n    Collection.prototype.item = function (index) {\n        return this.array_[index];\n    };\n    /**\n     * Get the length of this collection.\n     * @return {number} The length of the array.\n     * @observable\n     * @api\n     */\n    Collection.prototype.getLength = function () {\n        return this.get(Property.LENGTH);\n    };\n    /**\n     * Insert an element at the provided index.\n     * @param {number} index Index.\n     * @param {T} elem Element.\n     * @api\n     */\n    Collection.prototype.insertAt = function (index, elem) {\n        if (this.unique_) {\n    
         this.assertUnique_(elem);\n        }\n        this.array_.splice(index, 0, elem);\n        this.updateLength_();\n        this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD, elem, index));\n    };\n    /**\n     * Remove the last element of the collection and return it.\n     * Return `undefined` if the collection is empty.\n     * @return {T|undefined} Element.\n     * @api\n     */\n    Collection.prototype.pop = function () {\n        return this.removeAt(this.getLength() - 1);\n    };\n    /**\n     * Insert the provided element at the end of the collection.\n     * @param {T} elem Element.\n     * @return {number} New length of the collection.\n     * @api\n     */\n    Collection.prototype.push = function (elem) {\n        if (this.unique_) {\n            this.assertUnique_(elem);\n        }\n        var n = this.getLength();\n        this.insertAt(n, elem);\n        return this.getLength();\n    };\n    /**\n     * Remove the first occurrence of an element
  from the collection.\n     * @param {T} elem Element.\n     * @return {T|undefined} The removed element or undefined if none found.\n     * @api\n     */\n    Collection.prototype.remove = function (elem) {\n        var arr = this.array_;\n        for (var i = 0, ii = arr.length; i < ii; ++i) {\n            if (arr[i] === elem) {\n                return this.removeAt(i);\n            }\n        }\n        return undefined;\n    };\n    /**\n     * Remove the element at the provided index and return it.\n     * Return `undefined` if the collection does not contain this index.\n     * @param {number} index Index.\n     * @return {T|undefined} Value.\n     * @api\n     */\n    Collection.prototype.removeAt = function (index) {\n        var prev = this.array_[index];\n        this.array_.splice(index, 1);\n        this.updateLength_();\n        this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE, prev, index));\n        return prev;\n    };\n    /**\n     * Set the elemen
 t at the provided index.\n     * @param {number} index Index.\n     * @param {T} elem Element.\n     * @api\n     */\n    Collection.prototype.setAt = function (index, elem) {\n        var n = this.getLength();\n        if (index < n) {\n            if (this.unique_) {\n                this.assertUnique_(elem, index);\n            }\n            var prev = this.array_[index];\n            this.array_[index] = elem;\n            this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE, prev, index));\n            this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD, elem, index));\n        }\n        else {\n            for (var j = n; j < index; ++j) {\n                this.insertAt(j, undefined);\n            }\n            this.insertAt(index, elem);\n        }\n    };\n    /**\n     * @private\n     */\n    Collection.prototype.updateLength_ = function () {\n        this.set(Property.LENGTH, this.array_.length);\n    };\n    /**\n     * @private\n     * @param 
 {T} elem Element.\n     * @param {number=} opt_except Optional index to ignore.\n     */\n    Collection.prototype.assertUnique_ = function (elem, opt_except) {\n        for (var i = 0, ii = this.array_.length; i < ii; ++i) {\n            if (this.array_[i] === elem && i !== opt_except) {\n                throw new AssertionError(58);\n            }\n        }\n    };\n    return Collection;\n}(BaseObject));\nexport default Collection;\n//# sourceMappingURL=Collection.js.map","/**\n * @module ol/asserts\n */\nimport AssertionError from './AssertionError.js';\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {number} errorCode Error code.\n */\nexport function assert(assertion, errorCode) {\n    if (!assertion) {\n        throw new AssertionError(errorCode);\n    }\n}\n//# sourceMappingURL=asserts.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n
             ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Feature\n */\nimport BaseObject, { getChangeEventType } from './Object.js';\nimport EventType from './events/EventType.js';\nimport { assert } from './asserts.js';\nimport { listen, unlistenByKey } from './events.js';\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to th
 e features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object} properties on\n * the feature object, so they are observable, and have get/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature.  For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature';\n * import Polygon from 'ol/geom/Polygon';\n * import Point from 'ol/g
 eom/Point';\n *\n * var feature = new Feature({\n *   geometry: new Polygon(polyCoords),\n *   labelPoint: new Point(labelCoords),\n *   name: 'My Polygon'\n * });\n *\n * // get the polygon geometry\n * var poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * var point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} Geometry\n */\nvar Feature = /** @class */ (function (_super) {\n    __extends(Feature, _super);\n    /**\n     * @param {Geometry|Object<string, *>=} opt_geometryOrProperties\n     *     You may pass a Geometry object directly, or an object literal containing\n     *     properties. If you pass an object literal, you may include a Geometry\n     *     associated with a `geometry` key.\n     */\n    function Feature(opt_geometryOrProperties) {\n        var _this = _super.call(this) |
 | this;\n        /**\n         * @private\n         * @type {number|string|undefined}\n         */\n        _this.id_ = undefined;\n        /**\n         * @type {string}\n         * @private\n         */\n        _this.geometryName_ = 'geometry';\n        /**\n         * User provided style.\n         * @private\n         * @type {import(\"./style/Style.js\").StyleLike}\n         */\n        _this.style_ = null;\n        /**\n         * @private\n         * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n         */\n        _this.styleFunction_ = undefined;\n        /**\n         * @private\n         * @type {?import(\"./events.js\").EventsKey}\n         */\n        _this.geometryChangeKey_ = null;\n        _this.addEventListener(getChangeEventType(_this.geometryName_), _this.handleGeometryChanged_);\n        if (opt_geometryOrProperties) {\n            if (typeof (\n            /** @type {?} */ (opt_geometryOrProperties).getSimplifiedGeometry) === 'function') {\n   
              var geometry = /** @type {Geometry} */ (opt_geometryOrProperties);\n                _this.setGeometry(geometry);\n            }\n            else {\n                /** @type {Object<string, *>} */\n                var properties = opt_geometryOrProperties;\n                _this.setProperties(properties);\n            }\n        }\n        return _this;\n    }\n    /**\n     * Clone this feature. If the original feature has a geometry it\n     * is also cloned. The feature id is not set in the clone.\n     * @return {Feature} The clone.\n     * @api\n     */\n    Feature.prototype.clone = function () {\n        var clone = new Feature(this.hasProperties() ? this.getProperties() : null);\n        clone.setGeometryName(this.getGeometryName());\n        var geometry = this.getGeometry();\n        if (geometry) {\n            clone.setGeometry(geometry.clone());\n        }\n        var style = this.getStyle();\n        if (style) {\n            clone.setStyle(style);\n    
     }\n        return clone;\n    };\n    /**\n     * Get the feature's default geometry.  A feature may have any number of named\n     * geometries.  The \"default\" geometry (the one that is rendered by default) is\n     * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n     * @return {Geometry|undefined} The default geometry for the feature.\n     * @api\n     * @observable\n     */\n    Feature.prototype.getGeometry = function () {\n        return /** @type {Geometry|undefined} */ (this.get(this.geometryName_));\n    };\n    /**\n     * Get the feature identifier.  This is a stable identifier for the feature and\n     * is either set when reading data from a remote source or set explicitly by\n     * calling {@link module:ol/Feature~Feature#setId}.\n     * @return {number|string|undefined} Id.\n     * @api\n     */\n    Feature.prototype.getId = function () {\n        return this.id_;\n    };\n    /**\n     * Get the name of the feature's default geometry.  By d
 efault, the default\n     * geometry is named `geometry`.\n     * @return {string} Get the property name associated with the default geometry\n     *     for this feature.\n     * @api\n     */\n    Feature.prototype.getGeometryName = function () {\n        return this.geometryName_;\n    };\n    /**\n     * Get the feature's style. Will return what was provided to the\n     * {@link module:ol/Feature~Feature#setStyle} method.\n     * @return {import(\"./style/Style.js\").StyleLike|undefined} The feature style.\n     * @api\n     */\n    Feature.prototype.getStyle = function () {\n        return this.style_;\n    };\n    /**\n     * Get the feature's style function.\n     * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n     * representing the current style of this feature.\n     * @api\n     */\n    Feature.prototype.getStyleFunction = function () {\n        return this.styleFunction_;\n    };\n    /**\n     * @private\n     */\n    Feature.protot
 ype.handleGeometryChange_ = function () {\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    Feature.prototype.handleGeometryChanged_ = function () {\n        if (this.geometryChangeKey_) {\n            unlistenByKey(this.geometryChangeKey_);\n            this.geometryChangeKey_ = null;\n        }\n        var geometry = this.getGeometry();\n        if (geometry) {\n            this.geometryChangeKey_ = listen(geometry, EventType.CHANGE, this.handleGeometryChange_, this);\n        }\n        this.changed();\n    };\n    /**\n     * Set the default geometry for the feature.  This will update the property\n     * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n     * @param {Geometry|undefined} geometry The new geometry.\n     * @api\n     * @observable\n     */\n    Feature.prototype.setGeometry = function (geometry) {\n        this.set(this.geometryName_, geometry);\n    };\n    /**\n     * Set the style for the feature to override
  the layer style.  This can be a\n     * single style object, an array of styles, or a function that takes a\n     * resolution and returns an array of styles. To unset the feature style, call\n     * `setStyle()` without arguments or a falsey value.\n     * @param {import(\"./style/Style.js\").StyleLike=} opt_style Style for this feature.\n     * @api\n     * @fires module:ol/events/Event~BaseEvent#event:change\n     */\n    Feature.prototype.setStyle = function (opt_style) {\n        this.style_ = opt_style;\n        this.styleFunction_ = !opt_style\n            ? undefined\n            : createStyleFunction(opt_style);\n        this.changed();\n    };\n    /**\n     * Set the feature id.  The feature id is considered stable and may be used when\n     * requesting features or comparing identifiers returned from a remote source.\n     * The feature id can be used with the\n     * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n     * @param {number|string|undef
 ined} id The feature id.\n     * @api\n     * @fires module:ol/events/Event~BaseEvent#event:change\n     */\n    Feature.prototype.setId = function (id) {\n        this.id_ = id;\n        this.changed();\n    };\n    /**\n     * Set the property name to be used when getting the feature's default geometry.\n     * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n     * this name will be returned.\n     * @param {string} name The property name of the default geometry.\n     * @api\n     */\n    Feature.prototype.setGeometryName = function (name) {\n        this.removeEventListener(getChangeEventType(this.geometryName_), this.handleGeometryChanged_);\n        this.geometryName_ = name;\n        this.addEventListener(getChangeEventType(this.geometryName_), this.handleGeometryChanged_);\n        this.handleGeometryChanged_();\n    };\n    return Feature;\n}(BaseObject));\n/**\n * Convert the provided object into a feature style function.  Functi
 ons passed\n * through unchanged.  Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array<import(\"./style/Style.js\").default>|!import(\"./style/Style.js\").default} obj\n *     A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nexport function createStyleFunction(obj) {\n    if (typeof obj === 'function') {\n        return obj;\n    }\n    else {\n        /**\n         * @type {Array<import(\"./style/Style.js\").default>}\n         */\n        var styles_1;\n        if (Array.isArray(obj)) {\n            styles_1 = obj;\n        }\n        else {\n            assert(typeof ( /** @type {?} */(obj).getZIndex) === 'function', 41); // Expected an `import(\"./style/Style.js\").Style` or an array of `import(\"./style/Style.js\").Style`\n            var style = /** @type {import(\"./style/Style.js\").de
 fault} */ (obj);\n            styles_1 = [style];\n        }\n        return function () {\n            return styles_1;\n        };\n    }\n}\nexport default Feature;\n//# sourceMappingURL=Feature.js.map","/**\n * @module ol/geom/GeometryLayout\n */\n/**\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available. Supported values are `'XY'`,\n * `'XYZ'`, `'XYM'`, `'XYZM'`.\n * @enum {string}\n */\nexport default {\n    XY: 'XY',\n    XYZ: 'XYZ',\n    XYM: 'XYM',\n    XYZM: 'XYZM',\n};\n//# sourceMappingURL=GeometryLayout.js.map","/**\n * @module ol/geom/GeometryType\n */\n/**\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, `'Circle'`.\n * @enum {string}\n */\nexport default {\n    POINT: 'Point',\n    LINE_STRING: 'LineString',\n    LINEAR_RING: 'LinearRing',\n    POLYGON: 'Polygon',\n    MUL
 TI_POINT: 'MultiPoint',\n    MULTI_LINE_STRING: 'MultiLineString',\n    MULTI_POLYGON: 'MultiPolygon',\n    GEOMETRY_COLLECTION: 'GeometryCollection',\n    CIRCLE: 'Circle',\n};\n//# sourceMappingURL=GeometryType.js.map","/**\n * @module ol/proj/Units\n */\n/**\n * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or\n * `'us-ft'`.\n * @enum {string}\n */\nvar Units = {\n    DEGREES: 'degrees',\n    FEET: 'ft',\n    METERS: 'm',\n    PIXELS: 'pixels',\n    TILE_PIXELS: 'tile-pixels',\n    USFEET: 'us-ft',\n};\n/**\n * Meters per unit lookup table.\n * @const\n * @type {Object<Units, number>}\n * @api\n */\nexport var METERS_PER_UNIT = {};\n// use the radius of the Normal sphere\nMETERS_PER_UNIT[Units.DEGREES] = (2 * Math.PI * 6370997) / 360;\nMETERS_PER_UNIT[Units.FEET] = 0.3048;\nMETERS_PER_UNIT[Units.METERS] = 1;\nMETERS_PER_UNIT[Units.USFEET] = 1200 / 3937;\nexport default Units;\n//# sourceMappingURL=Units.js.map","/**\n * @module ol/transform\n */\nimpor
 t { assert } from './asserts.js';\n/**\n * An array representing an affine 2d transformation for use with\n * {@link module:ol/transform} functions. The array has 6 elements.\n * @typedef {!Array<number>} Transform\n * @api\n */\n/**\n * Collection of affine 2d transformation functions. The functions work on an\n * array of 6 elements. The element order is compatible with the [SVGMatrix\n * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is\n * a subset (elements a to f) of a 3×3 matrix:\n * ```\n * [ a c e ]\n * [ b d f ]\n * [ 0 0 1 ]\n * ```\n */\n/**\n * @private\n * @type {Transform}\n */\nvar tmp_ = new Array(6);\n/**\n * Create an identity transform.\n * @return {!Transform} Identity transform.\n */\nexport function create() {\n    return [1, 0, 0, 1, 0, 0];\n}\n/**\n * Resets the given transform to an identity transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Transform.\n */\nexport function reset(transform) {\n    r
 eturn set(transform, 1, 0, 0, 1, 0, 0);\n}\n/**\n * Multiply the underlying matrices of two transforms and return the result in\n * the first transform.\n * @param {!Transform} transform1 Transform parameters of matrix 1.\n * @param {!Transform} transform2 Transform parameters of matrix 2.\n * @return {!Transform} transform1 multiplied with transform2.\n */\nexport function multiply(transform1, transform2) {\n    var a1 = transform1[0];\n    var b1 = transform1[1];\n    var c1 = transform1[2];\n    var d1 = transform1[3];\n    var e1 = transform1[4];\n    var f1 = transform1[5];\n    var a2 = transform2[0];\n    var b2 = transform2[1];\n    var c2 = transform2[2];\n    var d2 = transform2[3];\n    var e2 = transform2[4];\n    var f2 = transform2[5];\n    transform1[0] = a1 * a2 + c1 * b2;\n    transform1[1] = b1 * a2 + d1 * b2;\n    transform1[2] = a1 * c2 + c1 * d2;\n    transform1[3] = b1 * c2 + d1 * d2;\n    transform1[4] = a1 * e2 + c1 * f2 + e1;\n    transform1[5] = b1 * e2 + d
 1 * f2 + f1;\n    return transform1;\n}\n/**\n * Set the transform components a-f on a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} a The a component of the transform.\n * @param {number} b The b component of the transform.\n * @param {number} c The c component of the transform.\n * @param {number} d The d component of the transform.\n * @param {number} e The e component of the transform.\n * @param {number} f The f component of the transform.\n * @return {!Transform} Matrix with transform applied.\n */\nexport function set(transform, a, b, c, d, e, f) {\n    transform[0] = a;\n    transform[1] = b;\n    transform[2] = c;\n    transform[3] = d;\n    transform[4] = e;\n    transform[5] = f;\n    return transform;\n}\n/**\n * Set transform on one matrix from another matrix.\n * @param {!Transform} transform1 Matrix to set transform to.\n * @param {!Transform} transform2 Matrix to set transform from.\n * @return {!Transform} transform1 with transfor
 m from transform2 applied.\n */\nexport function setFromArray(transform1, transform2) {\n    transform1[0] = transform2[0];\n    transform1[1] = transform2[1];\n    transform1[2] = transform2[2];\n    transform1[3] = transform2[3];\n    transform1[4] = transform2[4];\n    transform1[5] = transform2[5];\n    return transform1;\n}\n/**\n * Transforms the given coordinate with the given transform returning the\n * resulting, transformed coordinate. The coordinate will be modified in-place.\n *\n * @param {Transform} transform The transformation.\n * @param {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} coordinate The coordinate to transform.\n * @return {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} return coordinate so that operations can be\n *     chained together.\n */\nexport function apply(transform, coordinate) {\n    var x = coordinate[0];\n    var y = coordinate[1];\n    coordinate[0] = transform[0] * x + transform[2] * y + transfo
 rm[4];\n    coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n    return coordinate;\n}\n/**\n * Applies rotation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} angle Angle in radians.\n * @return {!Transform} The rotated transform.\n */\nexport function rotate(transform, angle) {\n    var cos = Math.cos(angle);\n    var sin = Math.sin(angle);\n    return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\n/**\n * Applies scale to a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scaled transform.\n */\nexport function scale(transform, x, y) {\n    return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0));\n}\n/**\n * Creates a scale transform.\n * @param {!Transform} target Transform to overwrite.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform}
  The scale transform.\n */\nexport function makeScale(target, x, y) {\n    return set(target, x, 0, 0, y, 0, 0);\n}\n/**\n * Applies translation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} dx Translation x.\n * @param {number} dy Translation y.\n * @return {!Transform} The translated transform.\n */\nexport function translate(transform, dx, dy) {\n    return multiply(transform, set(tmp_, 1, 0, 0, 1, dx, dy));\n}\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative).\n * @param {!Transform} transform The transform (will be modified in place).\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 
 Final translation y.\n * @return {!Transform} The composite transform.\n */\nexport function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n    var sin = Math.sin(angle);\n    var cos = Math.cos(angle);\n    transform[0] = sx * cos;\n    transform[1] = sy * sin;\n    transform[2] = -sx * sin;\n    transform[3] = sy * cos;\n    transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n    transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;\n    return transform;\n}\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative). The resulting transform\n * string can be applied as `transform` porperty of an HTMLElement's style.\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Fina
 l translation x.\n * @param {number} dy2 Final translation y.\n * @return {string} The composite css transform.\n * @api\n */\nexport function composeCssTransform(dx1, dy1, sx, sy, angle, dx2, dy2) {\n    return toString(compose(create(), dx1, dy1, sx, sy, angle, dx2, dy2));\n}\n/**\n * Invert the given transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (source) transform.\n */\nexport function invert(source) {\n    return makeInverse(source, source);\n}\n/**\n * Invert the given transform.\n * @param {!Transform} target Transform to be set as the inverse of\n *     the source transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (target) transform.\n */\nexport function makeInverse(target, source) {\n    var det = determinant(source);\n    assert(det !== 0, 32); // Transformation matrix cannot be inverted\n    var a = source[0];\n    var b = source[1];\n    var c =
  source[2];\n    var d = source[3];\n    var e = source[4];\n    var f = source[5];\n    target[0] = d / det;\n    target[1] = -b / det;\n    target[2] = -c / det;\n    target[3] = a / det;\n    target[4] = (c * f - d * e) / det;\n    target[5] = -(a * f - b * e) / det;\n    return target;\n}\n/**\n * Returns the determinant of the given matrix.\n * @param {!Transform} mat Matrix.\n * @return {number} Determinant.\n */\nexport function determinant(mat) {\n    return mat[0] * mat[3] - mat[1] * mat[2];\n}\n/**\n * A string version of the transform.  This can be used\n * for CSS transforms.\n * @param {!Transform} mat Matrix.\n * @return {string} The transform as a string.\n */\nexport function toString(mat) {\n    return 'matrix(' + mat.join(', ') + ')';\n}\n//# sourceMappingURL=transform.js.map","/**\n * @module ol/extent/Corner\n */\n/**\n * Extent corner.\n * @enum {string}\n */\nexport default {\n    BOTTOM_LEFT: 'bottom-left',\n    BOTTOM_RIGHT: 'bottom-right',\n    TOP_LEFT: 'to
 p-left',\n    TOP_RIGHT: 'top-right',\n};\n//# sourceMappingURL=Corner.js.map","/**\n * @module ol/extent/Relationship\n */\n/**\n * Relationship to an extent.\n * @enum {number}\n */\nexport default {\n    UNKNOWN: 0,\n    INTERSECTING: 1,\n    ABOVE: 2,\n    RIGHT: 4,\n    BELOW: 8,\n    LEFT: 16,\n};\n//# sourceMappingURL=Relationship.js.map","/**\n * @module ol/extent\n */\nimport Corner from './extent/Corner.js';\nimport Relationship from './extent/Relationship.js';\nimport { assert } from './asserts.js';\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array<number>} Extent\n * @api\n */\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Bounding extent.\n * @api\n */\nexport function boundingExtent(coordinates) {\n    var extent = createEmpty();\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n      
   extendCoordinate(extent, coordinates[i]);\n    }\n    return extent;\n}\n/**\n * @param {Array<number>} xs Xs.\n * @param {Array<number>} ys Ys.\n * @param {Extent=} opt_extent Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, opt_extent) {\n    var minX = Math.min.apply(null, xs);\n    var minY = Math.min.apply(null, ys);\n    var maxX = Math.max.apply(null, xs);\n    var maxY = Math.max.apply(null, ys);\n    return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n}\n/**\n * Return extent increased by the provided value.\n * @param {Extent} extent Extent.\n * @param {number} value The amount by which the extent should be buffered.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n * @api\n */\nexport function buffer(extent, value, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = extent[0] - value;\n        opt_extent[1] = extent[1] - value;\n        opt_extent[2] = extent[2] + value;\n     
    opt_extent[3] = extent[3] + value;\n        return opt_extent;\n    }\n    else {\n        return [\n            extent[0] - value,\n            extent[1] - value,\n            extent[2] + value,\n            extent[3] + value,\n        ];\n    }\n}\n/**\n * Creates a clone of an extent.\n *\n * @param {Extent} extent Extent to clone.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} The clone.\n */\nexport function clone(extent, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = extent[0];\n        opt_extent[1] = extent[1];\n        opt_extent[2] = extent[2];\n        opt_extent[3] = extent[3];\n        return opt_extent;\n    }\n    else {\n        return extent.slice();\n    }\n}\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {number} Closest squared distance.\n */\nexport function closestSquaredDistanceXY(extent, x, y) {\n    var dx, dy;\n    if (x < extent[0]) {\n        dx = extent[0] - x;\n    }\
 n    else if (extent[2] < x) {\n        dx = x - extent[2];\n    }\n    else {\n        dx = 0;\n    }\n    if (y < extent[1]) {\n        dy = extent[1] - y;\n    }\n    else if (extent[3] < y) {\n        dy = y - extent[3];\n    }\n    else {\n        dy = 0;\n    }\n    return dx * dx + dy * dy;\n}\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} The coordinate is contained in the extent.\n * @api\n */\nexport function containsCoordinate(extent, coordinate) {\n    return containsXY(extent, coordinate[0], coordinate[1]);\n}\n/**\n * Check if one extent contains another.\n *\n * An extent is deemed contained if it lies completely within the other extent,\n * including if they share one or more edges.\n *\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The second exte
 nt is contained by or on the edge of the\n *     first.\n * @api\n */\nexport function containsExtent(extent1, extent2) {\n    return (extent1[0] <= extent2[0] &&\n        extent2[2] <= extent1[2] &&\n        extent1[1] <= extent2[1] &&\n        extent2[3] <= extent1[3]);\n}\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n * @return {boolean} The x, y values are contained in the extent.\n * @api\n */\nexport function containsXY(extent, x, y) {\n    return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];\n}\n/**\n * Get the relationship between a coordinate and extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate The coordinate.\n * @return {import(\"./extent/Relationship.js\").default} The relationship (bitwise compare with\n *     import(\"./extent/Relationship
 .js\").Relationship).\n */\nexport function coordinateRelationship(extent, coordinate) {\n    var minX = extent[0];\n    var minY = extent[1];\n    var maxX = extent[2];\n    var maxY = extent[3];\n    var x = coordinate[0];\n    var y = coordinate[1];\n    var relationship = Relationship.UNKNOWN;\n    if (x < minX) {\n        relationship = relationship | Relationship.LEFT;\n    }\n    else if (x > maxX) {\n        relationship = relationship | Relationship.RIGHT;\n    }\n    if (y < minY) {\n        relationship = relationship | Relationship.BELOW;\n    }\n    else if (y > maxY) {\n        relationship = relationship | Relationship.ABOVE;\n    }\n    if (relationship === Relationship.UNKNOWN) {\n        relationship = Relationship.INTERSECTING;\n    }\n    return relationship;\n}\n/**\n * Create an empty extent.\n * @return {Extent} Empty extent.\n * @api\n */\nexport function createEmpty() {\n    return [Infinity, Infinity, -Infinity, -Infinity];\n}\n/**\n * Create a new extent o
 r update the provided extent.\n * @param {number} minX Minimum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxX Maximum X.\n * @param {number} maxY Maximum Y.\n * @param {Extent=} opt_extent Destination extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdate(minX, minY, maxX, maxY, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = minX;\n        opt_extent[1] = minY;\n        opt_extent[2] = maxX;\n        opt_extent[3] = maxY;\n        return opt_extent;\n    }\n    else {\n        return [minX, minY, maxX, maxY];\n    }\n}\n/**\n * Create a new empty extent or make the provided one empty.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateEmpty(opt_extent) {\n    return createOrUpdate(Infinity, Infinity, -Infinity, -Infinity, opt_extent);\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Ext
 ent.\n */\nexport function createOrUpdateFromCoordinate(coordinate, opt_extent) {\n    var x = coordinate[0];\n    var y = coordinate[1];\n    return createOrUpdate(x, y, x, y, opt_extent);\n}\n/**\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinates(coordinates, opt_extent) {\n    var extent = createOrUpdateEmpty(opt_extent);\n    return extendCoordinates(extent, coordinates);\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(flatCoordinates, offset, end, stride, opt_extent) {\n    var extent = createOrUpdateEmpty(opt_extent);\n    return extendFlatCoordinates(extent, flatCoordinates, offset, e
 nd, stride);\n}\n/**\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, opt_extent) {\n    var extent = createOrUpdateEmpty(opt_extent);\n    return extendRings(extent, rings);\n}\n/**\n * Determine if two extents are equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The two extents are equivalent.\n * @api\n */\nexport function equals(extent1, extent2) {\n    return (extent1[0] == extent2[0] &&\n        extent1[2] == extent2[2] &&\n        extent1[1] == extent2[1] &&\n        extent1[3] == extent2[3]);\n}\n/**\n * Determine if two extents are approximately equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {number} tolerance Tolerance in extent coordinate units.\n * @return {boolean} The two extents differ by less than the toler
 ance.\n */\nexport function approximatelyEquals(extent1, extent2, tolerance) {\n    return (Math.abs(extent1[0] - extent2[0]) < tolerance &&\n        Math.abs(extent1[2] - extent2[2]) < tolerance &&\n        Math.abs(extent1[1] - extent2[1]) < tolerance &&\n        Math.abs(extent1[3] - extent2[3]) < tolerance);\n}\n/**\n * Modify an extent to include another extent.\n * @param {Extent} extent1 The extent to be modified.\n * @param {Extent} extent2 The extent that will be included in the first.\n * @return {Extent} A reference to the first (extended) extent.\n * @api\n */\nexport function extend(extent1, extent2) {\n    if (extent2[0] < extent1[0]) {\n        extent1[0] = extent2[0];\n    }\n    if (extent2[2] > extent1[2]) {\n        extent1[2] = extent2[2];\n    }\n    if (extent2[1] < extent1[1]) {\n        extent1[1] = extent2[1];\n    }\n    if (extent2[3] > extent1[3]) {\n        extent1[3] = extent2[3];\n    }\n    return extent1;\n}\n/**\n * @param {Extent} extent Extent.\n 
 * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n */\nexport function extendCoordinate(extent, coordinate) {\n    if (coordinate[0] < extent[0]) {\n        extent[0] = coordinate[0];\n    }\n    if (coordinate[0] > extent[2]) {\n        extent[2] = coordinate[0];\n    }\n    if (coordinate[1] < extent[1]) {\n        extent[1] = coordinate[1];\n    }\n    if (coordinate[1] > extent[3]) {\n        extent[3] = coordinate[1];\n    }\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        extendCoordinate(extent, coordinates[i]);\n    }\n    return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {n
 umber} stride Stride.\n * @return {Extent} Extent.\n */\nexport function extendFlatCoordinates(extent, flatCoordinates, offset, end, stride) {\n    for (; offset < end; offset += stride) {\n        extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n    }\n    return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @return {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n    for (var i = 0, ii = rings.length; i < ii; ++i) {\n        extendCoordinates(extent, rings[i]);\n    }\n    return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n */\nexport function extendXY(extent, x, y) {\n    extent[0] = Math.min(extent[0], x);\n    extent[1] = Math.min(extent[1], y);\n    extent[2] = Math.max(extent[2], x);\n    extent[3] = Math.max(extent[3], y);\n}\n/**\n * This function calls `callback` for each corner of the 
 extent. If the\n * callback returns a truthy value the function returns that value\n * immediately. Otherwise the function returns `false`.\n * @param {Extent} extent Extent.\n * @param {function(import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @return {S|boolean} Value.\n * @template S\n */\nexport function forEachCorner(extent, callback) {\n    var val;\n    val = callback(getBottomLeft(extent));\n    if (val) {\n        return val;\n    }\n    val = callback(getBottomRight(extent));\n    if (val) {\n        return val;\n    }\n    val = callback(getTopRight(extent));\n    if (val) {\n        return val;\n    }\n    val = callback(getTopLeft(extent));\n    if (val) {\n        return val;\n    }\n    return false;\n}\n/**\n * Get the size of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Area.\n * @api\n */\nexport function getArea(extent) {\n    var area = 0;\n    if (!isEmpty(extent)) {\n        area = getWidth(extent) * getHeight(extent);\n 
    }\n    return area;\n}\n/**\n * Get the bottom left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom left coordinate.\n * @api\n */\nexport function getBottomLeft(extent) {\n    return [extent[0], extent[1]];\n}\n/**\n * Get the bottom right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom right coordinate.\n * @api\n */\nexport function getBottomRight(extent) {\n    return [extent[2], extent[1]];\n}\n/**\n * Get the center coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Center.\n * @api\n */\nexport function getCenter(extent) {\n    return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];\n}\n/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./extent/Corner.js\").default} corner Corner.\n * @return {import(\"./coor
 dinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n    var coordinate;\n    if (corner === Corner.BOTTOM_LEFT) {\n        coordinate = getBottomLeft(extent);\n    }\n    else if (corner === Corner.BOTTOM_RIGHT) {\n        coordinate = getBottomRight(extent);\n    }\n    else if (corner === Corner.TOP_LEFT) {\n        coordinate = getTopLeft(extent);\n    }\n    else if (corner === Corner.TOP_RIGHT) {\n        coordinate = getTopRight(extent);\n    }\n    else {\n        assert(false, 13); // Invalid corner\n    }\n    return coordinate;\n}\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Enlarged area.\n */\nexport function getEnlargedArea(extent1, extent2) {\n    var minX = Math.min(extent1[0], extent2[0]);\n    var minY = Math.min(extent1[1], extent2[1]);\n    var maxX = Math.max(extent1[2], extent2[2]);\n    var maxY = Math.max(extent1[3], extent2[3]);\n    return (maxX - minX) * (max
 Y - minY);\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @param {Extent=} opt_extent Destination extent.\n * @return {Extent} Extent.\n */\nexport function getForViewAndSize(center, resolution, rotation, size, opt_extent) {\n    var dx = (resolution * size[0]) / 2;\n    var dy = (resolution * size[1]) / 2;\n    var cosRotation = Math.cos(rotation);\n    var sinRotation = Math.sin(rotation);\n    var xCos = dx * cosRotation;\n    var xSin = dx * sinRotation;\n    var yCos = dy * cosRotation;\n    var ySin = dy * sinRotation;\n    var x = center[0];\n    var y = center[1];\n    var x0 = x - xCos + ySin;\n    var x1 = x - xCos - ySin;\n    var x2 = x + xCos - ySin;\n    var x3 = x + xCos + ySin;\n    var y0 = y - xSin - yCos;\n    var y1 = y - xSin + yCos;\n    var y2 = y + xSin + yCos;\n    var y3 = y + xSin - yCos;\n    
 return createOrUpdate(Math.min(x0, x1, x2, x3), Math.min(y0, y1, y2, y3), Math.max(x0, x1, x2, x3), Math.max(y0, y1, y2, y3), opt_extent);\n}\n/**\n * Get the height of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Height.\n * @api\n */\nexport function getHeight(extent) {\n    return extent[3] - extent[1];\n}\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Intersection area.\n */\nexport function getIntersectionArea(extent1, extent2) {\n    var intersection = getIntersection(extent1, extent2);\n    return getArea(intersection);\n}\n/**\n * Get the intersection of two extents.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {Extent=} opt_extent Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nexport function getIntersection(extent1, extent2, opt_extent) {\n    var intersection = opt_extent ? opt_extent : createEmpty(
 );\n    if (intersects(extent1, extent2)) {\n        if (extent1[0] > extent2[0]) {\n            intersection[0] = extent1[0];\n        }\n        else {\n            intersection[0] = extent2[0];\n        }\n        if (extent1[1] > extent2[1]) {\n            intersection[1] = extent1[1];\n        }\n        else {\n            intersection[1] = extent2[1];\n        }\n        if (extent1[2] < extent2[2]) {\n            intersection[2] = extent1[2];\n        }\n        else {\n            intersection[2] = extent2[2];\n        }\n        if (extent1[3] < extent2[3]) {\n            intersection[3] = extent1[3];\n        }\n        else {\n            intersection[3] = extent2[3];\n        }\n    }\n    else {\n        createOrUpdateEmpty(intersection);\n    }\n    return intersection;\n}\n/**\n * @param {Extent} extent Extent.\n * @return {number} Margin.\n */\nexport function getMargin(extent) {\n    return getWidth(extent) + getHeight(extent);\n}\n/**\n * Get the size (width, heig
 ht) of an extent.\n * @param {Extent} extent The extent.\n * @return {import(\"./size.js\").Size} The extent size.\n * @api\n */\nexport function getSize(extent) {\n    return [extent[2] - extent[0], extent[3] - extent[1]];\n}\n/**\n * Get the top left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top left coordinate.\n * @api\n */\nexport function getTopLeft(extent) {\n    return [extent[0], extent[3]];\n}\n/**\n * Get the top right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top right coordinate.\n * @api\n */\nexport function getTopRight(extent) {\n    return [extent[2], extent[3]];\n}\n/**\n * Get the width of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Width.\n * @api\n */\nexport function getWidth(extent) {\n    return extent[2] - extent[0];\n}\n/**\n * Determine if one extent intersects another.\n * @param {Extent} exte
 nt1 Extent 1.\n * @param {Extent} extent2 Extent.\n * @return {boolean} The two extents intersect.\n * @api\n */\nexport function intersects(extent1, extent2) {\n    return (extent1[0] <= extent2[2] &&\n        extent1[2] >= extent2[0] &&\n        extent1[1] <= extent2[3] &&\n        extent1[3] >= extent2[1]);\n}\n/**\n * Determine if an extent is empty.\n * @param {Extent} extent Extent.\n * @return {boolean} Is empty.\n * @api\n */\nexport function isEmpty(extent) {\n    return extent[2] < extent[0] || extent[3] < extent[1];\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function returnOrUpdate(extent, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = extent[0];\n        opt_extent[1] = extent[1];\n        opt_extent[2] = extent[2];\n        opt_extent[3] = extent[3];\n        return opt_extent;\n    }\n    else {\n        return extent;\n    }\n}\n/**\n * @param {Extent} extent Extent.\n * @
 param {number} value Value.\n */\nexport function scaleFromCenter(extent, value) {\n    var deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n    var deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);\n    extent[0] -= deltaX;\n    extent[2] += deltaX;\n    extent[1] -= deltaY;\n    extent[3] += deltaY;\n}\n/**\n * Determine if the segment between two coordinates intersects (crosses,\n * touches, or is contained by) the provided extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} start Segment start coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} end Segment end coordinate.\n * @return {boolean} The segment intersects the extent.\n */\nexport function intersectsSegment(extent, start, end) {\n    var intersects = false;\n    var startRel = coordinateRelationship(extent, start);\n    var endRel = coordinateRelationship(extent, end);\n    if (startRel === Relationship.INTERSECTING ||\n        endRel === Relationship
 .INTERSECTING) {\n        intersects = true;\n    }\n    else {\n        var minX = extent[0];\n        var minY = extent[1];\n        var maxX = extent[2];\n        var maxY = extent[3];\n        var startX = start[0];\n        var startY = start[1];\n        var endX = end[0];\n        var endY = end[1];\n        var slope = (endY - startY) / (endX - startX);\n        var x = void 0, y = void 0;\n        if (!!(endRel & Relationship.ABOVE) && !(startRel & Relationship.ABOVE)) {\n            // potentially intersects top\n            x = endX - (endY - maxY) / slope;\n            intersects = x >= minX && x <= maxX;\n        }\n        if (!intersects &&\n            !!(endRel & Relationship.RIGHT) &&\n            !(startRel & Relationship.RIGHT)) {\n            // potentially intersects right\n            y = endY - (endX - maxX) * slope;\n            intersects = y >= minY && y <= maxY;\n        }\n        if (!intersects &&\n            !!(endRel & Relationship.BELOW) &&\n      
       !(startRel & Relationship.BELOW)) {\n            // potentially intersects bottom\n            x = endX - (endY - minY) / slope;\n            intersects = x >= minX && x <= maxX;\n        }\n        if (!intersects &&\n            !!(endRel & Relationship.LEFT) &&\n            !(startRel & Relationship.LEFT)) {\n            // potentially intersects left\n            y = endY - (endX - minX) * slope;\n            intersects = y >= minY && y <= maxY;\n        }\n    }\n    return intersects;\n}\n/**\n * Apply a transform function to the extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./proj.js\").TransformFunction} transformFn Transform function.\n * Called with `[minX, minY, maxX, maxY]` extent coordinates.\n * @param {Extent=} opt_extent Destination extent.\n * @param {number=} opt_stops Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {Extent} Extent.\n * @api\n */\nexport function applyTransform(extent, t
 ransformFn, opt_extent, opt_stops) {\n    var coordinates = [];\n    if (opt_stops > 1) {\n        var width = extent[2] - extent[0];\n        var height = extent[3] - extent[1];\n        for (var i = 0; i < opt_stops; ++i) {\n            coordinates.push(extent[0] + (width * i) / opt_stops, extent[1], extent[2], extent[1] + (height * i) / opt_stops, extent[2] - (width * i) / opt_stops, extent[3], extent[0], extent[3] - (height * i) / opt_stops);\n        }\n    }\n    else {\n        coordinates = [\n            extent[0],\n            extent[1],\n            extent[2],\n            extent[1],\n            extent[2],\n            extent[3],\n            extent[0],\n            extent[3],\n        ];\n    }\n    transformFn(coordinates, coordinates, 2);\n    var xs = [];\n    var ys = [];\n    for (var i = 0, l = coordinates.length; i < l; i += 2) {\n        xs.push(coordinates[i]);\n        ys.push(coordinates[i + 1]);\n    }\n    return _boundingExtentXYs(xs, ys, opt_extent);\n}\n
 /**\n * Modifies the provided extent in-place to be within the real world\n * extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Extent} The extent within the real world extent.\n */\nexport function wrapX(extent, projection) {\n    var projectionExtent = projection.getExtent();\n    var center = getCenter(extent);\n    if (projection.canWrapX() &&\n        (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])) {\n        var worldWidth = getWidth(projectionExtent);\n        var worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth);\n        var offset = worldsAway * worldWidth;\n        extent[0] -= offset;\n        extent[2] -= offset;\n    }\n    return extent;\n}\n//# sourceMappingURL=extent.js.map","/**\n * @module ol/proj/Projection\n */\nimport { METERS_PER_UNIT } from './Units.js';\n/**\n * @typedef {Object} Options\n * @property {string} code The SRS identi
 fier code, e.g. `EPSG:4326`.\n * @property {import(\"./Units.js\").default|string} [units] Units. Required unless a\n * proj4 projection is defined for `code`.\n * @property {import(\"../extent.js\").Extent} [extent] The validity extent for the SRS.\n * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.\n * @property {boolean} [global=false] Whether the projection is valid for the whole globe.\n * @property {number} [metersPerUnit] The meters per unit for the SRS.\n * If not provided, the `units` are used to get the meters per unit from the {@link module:ol/proj/Units~METERS_PER_UNIT}\n * lookup table.\n * @property {import(\"../extent.js\").Extent} [worldExtent] The world extent for the SRS.\n * @property {function(number, import(\"../coordinate.js\").Coordinate):number} [getPointResolution]\n * Function to determine resolution at a point. The function is called with a\n * `{number}` view resolution and an `{import(\"../coordinate.js\").Coordinat
 e}` as arguments, and returns\n * the `{number}` resolution in projection units at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj#getPointResolution} function will be used.\n */\n/**\n * @classdesc\n * Projection definition class. One of these is created for each projection\n * supported in the application and stored in the {@link module:ol/proj} namespace.\n * You can use these in applications, but this is not required, as API params\n * and options use {@link module:ol/proj~ProjectionLike} which means the simple string\n * code will suffice.\n *\n * You can use {@link module:ol/proj~get} to retrieve the object for a particular\n * projection.\n *\n * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together\n * with the following aliases:\n * * `EPSG:4326`: CRS:84, urn:ogc:def:crs:EPSG:6.6:4326,\n *     urn:ogc:def:crs:OGC:1.3:CRS84, urn:ogc:def:crs:OGC:2:84,\n *     http://www.opengis.net/gml/srs/epsg.xml#4326,\n *     urn:x-
 ogc:def:crs:EPSG:4326\n * * `EPSG:3857`: EPSG:102100, EPSG:102113, EPSG:900913,\n *     urn:ogc:def:crs:EPSG:6.18:3:3857,\n *     http://www.opengis.net/gml/srs/epsg.xml#3857\n *\n * If you use [proj4js](https://github.com/proj4js/proj4js), aliases can\n * be added using `proj4.defs()`. After all required projection definitions are\n * added, call the {@link module:ol/proj/proj4~register} function.\n *\n * @api\n */\nvar Projection = /** @class */ (function () {\n    /**\n     * @param {Options} options Projection options.\n     */\n    function Projection(options) {\n        /**\n         * @private\n         * @type {string}\n         */\n        this.code_ = options.code;\n        /**\n         * Units of projected coordinates. When set to `TILE_PIXELS`, a\n         * `this.extent_` and `this.worldExtent_` must be configured properly for each\n         * tile.\n         * @private\n         * @type {import(\"./Units.js\").default}\n         */\n        this.units_ = /** @type {im
 port(\"./Units.js\").default} */ (options.units);\n        /**\n         * Validity extent of the projection in projected coordinates. For projections\n         * with `TILE_PIXELS` units, this is the extent of the tile in\n         * tile pixel space.\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        this.extent_ = options.extent !== undefined ? options.extent : null;\n        /**\n         * Extent of the world in EPSG:4326. For projections with\n         * `TILE_PIXELS` units, this is the extent of the tile in\n         * projected coordinate space.\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        this.worldExtent_ =\n            options.worldExtent !== undefined ? options.worldExtent : null;\n        /**\n         * @private\n         * @type {string}\n         */\n        this.axisOrientation_ =\n            options.axisOrientation !== undefined ? options.axisOrientation : 'enu';\n       
  /**\n         * @private\n         * @type {boolean}\n         */\n        this.global_ = options.global !== undefined ? options.global : false;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.canWrapX_ = !!(this.global_ && this.extent_);\n        /**\n         * @private\n         * @type {function(number, import(\"../coordinate.js\").Coordinate):number|undefined}\n         */\n        this.getPointResolutionFunc_ = options.getPointResolution;\n        /**\n         * @private\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        this.defaultTileGrid_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.metersPerUnit_ = options.metersPerUnit;\n    }\n    /**\n     * @return {boolean} The projection is suitable for wrapping the x-axis\n     */\n    Projection.prototype.canWrapX = function () {\n        return this.canWrapX_;\n    };\n    /**\n     * Get the 
 code for this projection, e.g. 'EPSG:4326'.\n     * @return {string} Code.\n     * @api\n     */\n    Projection.prototype.getCode = function () {\n        return this.code_;\n    };\n    /**\n     * Get the validity extent for this projection.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    Projection.prototype.getExtent = function () {\n        return this.extent_;\n    };\n    /**\n     * Get the units of this projection.\n     * @return {import(\"./Units.js\").default} Units.\n     * @api\n     */\n    Projection.prototype.getUnits = function () {\n        return this.units_;\n    };\n    /**\n     * Get the amount of meters per unit of this projection.  If the projection is\n     * not configured with `metersPerUnit` or a units identifier, the return is\n     * `undefined`.\n     * @return {number|undefined} Meters.\n     * @api\n     */\n    Projection.prototype.getMetersPerUnit = function () {\n        return this.metersPerUnit_ || METERS_
 PER_UNIT[this.units_];\n    };\n    /**\n     * Get the world extent for this projection.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    Projection.prototype.getWorldExtent = function () {\n        return this.worldExtent_;\n    };\n    /**\n     * Get the axis orientation of this projection.\n     * Example values are:\n     * enu - the default easting, northing, elevation.\n     * neu - northing, easting, up - useful for \"lat/long\" geographic coordinates,\n     *     or south orientated transverse mercator.\n     * wnu - westing, northing, up - some planetary coordinate systems have\n     *     \"west positive\" coordinate systems\n     * @return {string} Axis orientation.\n     * @api\n     */\n    Projection.prototype.getAxisOrientation = function () {\n        return this.axisOrientation_;\n    };\n    /**\n     * Is this projection a global projection which spans the whole world?\n     * @return {boolean} Whether the projection is global
 .\n     * @api\n     */\n    Projection.prototype.isGlobal = function () {\n        return this.global_;\n    };\n    /**\n     * Set if the projection is a global projection which spans the whole world\n     * @param {boolean} global Whether the projection is global.\n     * @api\n     */\n    Projection.prototype.setGlobal = function (global) {\n        this.global_ = global;\n        this.canWrapX_ = !!(global && this.extent_);\n    };\n    /**\n     * @return {import(\"../tilegrid/TileGrid.js\").default} The default tile grid.\n     */\n    Projection.prototype.getDefaultTileGrid = function () {\n        return this.defaultTileGrid_;\n    };\n    /**\n     * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n     */\n    Projection.prototype.setDefaultTileGrid = function (tileGrid) {\n        this.defaultTileGrid_ = tileGrid;\n    };\n    /**\n     * Set the validity extent for this projection.\n     * @param {import(\"../extent.js\").Extent} e
 xtent Extent.\n     * @api\n     */\n    Projection.prototype.setExtent = function (extent) {\n        this.extent_ = extent;\n        this.canWrapX_ = !!(this.global_ && extent);\n    };\n    /**\n     * Set the world extent for this projection.\n     * @param {import(\"../extent.js\").Extent} worldExtent World extent\n     *     [minlon, minlat, maxlon, maxlat].\n     * @api\n     */\n    Projection.prototype.setWorldExtent = function (worldExtent) {\n        this.worldExtent_ = worldExtent;\n    };\n    /**\n     * Set the getPointResolution function (see {@link module:ol/proj~getPointResolution}\n     * for this projection.\n     * @param {function(number, import(\"../coordinate.js\").Coordinate):number} func Function\n     * @api\n     */\n    Projection.prototype.setGetPointResolution = function (func) {\n        this.getPointResolutionFunc_ = func;\n    };\n    /**\n     * Get the custom point resolution function for this projection (if set).\n     * @return {function(number,
  import(\"../coordinate.js\").Coordinate):number|undefined} The custom point\n     * resolution function (if set).\n     */\n    Projection.prototype.getPointResolutionFunc = function () {\n        return this.getPointResolutionFunc_;\n    };\n    return Projection;\n}());\nexport default Projection;\n//# sourceMappingURL=Projection.js.map","/**\n * @module ol/math\n */\n/**\n * Takes a number and clamps it to within the provided bounds.\n * @param {number} value The input number.\n * @param {number} min The minimum value to return.\n * @param {number} max The maximum value to return.\n * @return {number} The input number if it is within bounds, or the nearest\n *     number within the bounds.\n */\nexport function clamp(value, min, max) {\n    return Math.min(Math.max(value, min), max);\n}\n/**\n * Return the hyperbolic cosine of a given number. The method will use the\n * native `Math.cosh` function if it is available, otherwise the hyperbolic\n * cosine will be calculated via the
  reference implementation of the Mozilla\n * developer network.\n *\n * @param {number} x X.\n * @return {number} Hyperbolic cosine of x.\n */\nexport var cosh = (function () {\n    // Wrapped in a iife, to save the overhead of checking for the native\n    // implementation on every invocation.\n    var cosh;\n    if ('cosh' in Math) {\n        // The environment supports the native Math.cosh function, use it…\n        cosh = Math.cosh;\n    }\n    else {\n        // … else, use the reference implementation of MDN:\n        cosh = function (x) {\n            var y = /** @type {Math} */ (Math).exp(x);\n            return (y + 1 / y) / 2;\n        };\n    }\n    return cosh;\n})();\n/**\n * Return the base 2 logarithm of a given number. The method will use the\n * native `Math.log2` function if it is available, otherwise the base 2\n * logarithm will be calculated via the reference implementation of the\n * Mozilla developer network.\n *\n * @param {number} x X.\n * @return {numbe
 r} Base 2 logarithm of x.\n */\nexport var log2 = (function () {\n    // Wrapped in a iife, to save the overhead of checking for the native\n    // implementation on every invocation.\n    var log2;\n    if ('log2' in Math) {\n        // The environment supports the native Math.log2 function, use it…\n        log2 = Math.log2;\n    }\n    else {\n        // … else, use the reference implementation of MDN:\n        log2 = function (x) {\n            return Math.log(x) * Math.LOG2E;\n        };\n    }\n    return log2;\n})();\n/**\n * Returns the square of the closest distance between the point (x, y) and the\n * line segment (x1, y1) to (x2, y2).\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredSegmentDistance(x, y, x1, y1, x2, y2) {\n    var dx = x2 - x1;\n    var dy = y2 - y1;\n    if (dx !== 0 || dy !==
  0) {\n        var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n        if (t > 1) {\n            x1 = x2;\n            y1 = y2;\n        }\n        else if (t > 0) {\n            x1 += dx * t;\n            y1 += dy * t;\n        }\n    }\n    return squaredDistance(x, y, x1, y1);\n}\n/**\n * Returns the square of the distance between the points (x1, y1) and (x2, y2).\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredDistance(x1, y1, x2, y2) {\n    var dx = x2 - x1;\n    var dy = y2 - y1;\n    return dx * dx + dy * dy;\n}\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array<Array<number>>} mat Augmented matrix (n x n + 1 column)\n *                                     in row-major order.\n * @return {Array<number>} The resulting vector.\n */\nexport function solveLinearSystem(mat) {\n    var n = ma
 t.length;\n    for (var i = 0; i < n; i++) {\n        // Find max in the i-th column (ignoring i - 1 first rows)\n        var maxRow = i;\n        var maxEl = Math.abs(mat[i][i]);\n        for (var r = i + 1; r < n; r++) {\n            var absValue = Math.abs(mat[r][i]);\n            if (absValue > maxEl) {\n                maxEl = absValue;\n                maxRow = r;\n            }\n        }\n        if (maxEl === 0) {\n            return null; // matrix is singular\n        }\n        // Swap max row with i-th (current) row\n        var tmp = mat[maxRow];\n        mat[maxRow] = mat[i];\n        mat[i] = tmp;\n        // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n        for (var j = i + 1; j < n; j++) {\n            var coef = -mat[j][i] / mat[i][i];\n            for (var k = i; k < n + 1; k++) {\n                if (i == k) {\n                    mat[j][k] = 0;\n                }\n                else {\n                    mat[j][k] += coef * m
 at[i][k];\n                }\n            }\n        }\n    }\n    // Solve Ax=b for upper triangular matrix A (mat)\n    var x = new Array(n);\n    for (var l = n - 1; l >= 0; l--) {\n        x[l] = mat[l][n] / mat[l][l];\n        for (var m = l - 1; m >= 0; m--) {\n            mat[m][n] -= mat[m][l] * x[l];\n        }\n    }\n    return x;\n}\n/**\n * Converts radians to to degrees.\n *\n * @param {number} angleInRadians Angle in radians.\n * @return {number} Angle in degrees.\n */\nexport function toDegrees(angleInRadians) {\n    return (angleInRadians * 180) / Math.PI;\n}\n/**\n * Converts degrees to radians.\n *\n * @param {number} angleInDegrees Angle in degrees.\n * @return {number} Angle in radians.\n */\nexport function toRadians(angleInDegrees) {\n    return (angleInDegrees * Math.PI) / 180;\n}\n/**\n * Returns the modulo of a / b, depending on the sign of b.\n *\n * @param {number} a Dividend.\n * @param {number} b Divisor.\n * @return {number} Modulo.\n */\nexport functi
 on modulo(a, b) {\n    var r = a % b;\n    return r * b < 0 ? r + b : r;\n}\n/**\n * Calculates the linearly interpolated value of x between a and b.\n *\n * @param {number} a Number\n * @param {number} b Number\n * @param {number} x Value to be interpolated.\n * @return {number} Interpolated value.\n */\nexport function lerp(a, b, x) {\n    return a + x * (b - a);\n}\n//# sourceMappingURL=math.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };
 \n})();\n/**\n * @module ol/proj/epsg3857\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\nimport { cosh } from '../math.js';\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n/**\n * @const\n * @type {number}\n */\nexport var HALF_SIZE = Math.PI * RADIUS;\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var EXTENT = [-HALF_SIZE, -HALF_SIZE, HALF_SIZE, HALF_SIZE];\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var WORLD_EXTENT = [-180, -85, 180, 85];\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nvar EPSG3857Projection = /** @class */ (function (_super) {\n    __extends(EPSG3857Projection, _super);\n    /**\n     * @param {string} code Code.\n     */\n    function EPSG3857Projection(code) {\n        return _super.call(this, {\n            code: code,\n            units: Units.METERS,\n            extent: EXTEN
 T,\n            global: true,\n            worldExtent: WORLD_EXTENT,\n            getPointResolution: function (resolution, point) {\n                return resolution / cosh(point[1] / RADIUS);\n            },\n        }) || this;\n    }\n    return EPSG3857Projection;\n}(Projection));\n/**\n * Projections equal to EPSG:3857.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport var PROJECTIONS = [\n    new EPSG3857Projection('EPSG:3857'),\n    new EPSG3857Projection('EPSG:102100'),\n    new EPSG3857Projection('EPSG:102113'),\n    new EPSG3857Projection('EPSG:900913'),\n    new EPSG3857Projection('urn:ogc:def:crs:EPSG:6.18:3:3857'),\n    new EPSG3857Projection('urn:ogc:def:crs:EPSG::3857'),\n    new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857'),\n];\n/**\n * Transformation from EPSG:4326 to EPSG:3857.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>=} opt_output Output array of coordi
 nate values.\n * @param {number=} opt_dimension Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function fromEPSG4326(input, opt_output, opt_dimension) {\n    var length = input.length;\n    var dimension = opt_dimension > 1 ? opt_dimension : 2;\n    var output = opt_output;\n    if (output === undefined) {\n        if (dimension > 2) {\n            // preserve values beyond second dimension\n            output = input.slice();\n        }\n        else {\n            output = new Array(length);\n        }\n    }\n    var halfSize = HALF_SIZE;\n    for (var i = 0; i < length; i += dimension) {\n        output[i] = (halfSize * input[i]) / 180;\n        var y = RADIUS * Math.log(Math.tan((Math.PI * (+input[i + 1] + 90)) / 360));\n        if (y > halfSize) {\n            y = halfSize;\n        }\n        else if (y < -halfSize) {\n            y = -halfSize;\n        }\n        output[i + 1] = y;\n    }\n    return output;\n}\n/**\n
  * Transformation from EPSG:3857 to EPSG:4326.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function toEPSG4326(input, opt_output, opt_dimension) {\n    var length = input.length;\n    var dimension = opt_dimension > 1 ? opt_dimension : 2;\n    var output = opt_output;\n    if (output === undefined) {\n        if (dimension > 2) {\n            // preserve values beyond second dimension\n            output = input.slice();\n        }\n        else {\n            output = new Array(length);\n        }\n    }\n    for (var i = 0; i < length; i += dimension) {\n        output[i] = (180 * input[i]) / HALF_SIZE;\n        output[i + 1] =\n            (360 * Math.atan(Math.exp(input[i + 1] / RADIUS))) / Math.PI - 90;\n    }\n    return output;\n}\n//# sour
 ceMappingURL=epsg3857.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n/**\n * Extent of the EPSG:4326 projection which is the whole world.\n *\n * @const\n * @type {import(\"../extent.js\").Extent}\n */
 \nexport var EXTENT = [-180, -90, 180, 90];\n/**\n * @const\n * @type {number}\n */\nexport var METERS_PER_UNIT = (Math.PI * RADIUS) / 180;\n/**\n * @classdesc\n * Projection object for WGS84 geographic coordinates (EPSG:4326).\n *\n * Note that OpenLayers does not strictly comply with the EPSG definition.\n * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).\n * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.\n */\nvar EPSG4326Projection = /** @class */ (function (_super) {\n    __extends(EPSG4326Projection, _super);\n    /**\n     * @param {string} code Code.\n     * @param {string=} opt_axisOrientation Axis orientation.\n     */\n    function EPSG4326Projection(code, opt_axisOrientation) {\n        return _super.call(this, {\n            code: code,\n            units: Units.DEGREES,\n            extent: EXTENT,\n            axisOrientation: opt_axisOrientation,\n            global: true,\n            metersPerUnit: METERS_PER_UNIT,\n
             worldExtent: EXTENT,\n        }) || this;\n    }\n    return EPSG4326Projection;\n}(Projection));\n/**\n * Projections equal to EPSG:4326.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport var PROJECTIONS = [\n    new EPSG4326Projection('CRS:84'),\n    new EPSG4326Projection('EPSG:4326', 'neu'),\n    new EPSG4326Projection('urn:ogc:def:crs:EPSG::4326', 'neu'),\n    new EPSG4326Projection('urn:ogc:def:crs:EPSG:6.6:4326', 'neu'),\n    new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),\n    new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),\n    new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),\n    new EPSG4326Projection('urn:x-ogc:def:crs:EPSG:4326', 'neu'),\n];\n//# sourceMappingURL=epsg4326.js.map","/**\n * @module ol/proj/projections\n */\n/**\n * @type {Object<string, import(\"./Projection.js\").default>}\n */\nvar cache = {};\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n   
  cache = {};\n}\n/**\n * Get a cached projection by code.\n * @param {string} code The code for the projection.\n * @return {import(\"./Projection.js\").default} The projection (if cached).\n */\nexport function get(code) {\n    return cache[code] || null;\n}\n/**\n * Add a projection to the cache.\n * @param {string} code The projection code.\n * @param {import(\"./Projection.js\").default} projection The projection to cache.\n */\nexport function add(code, projection) {\n    cache[code] = projection;\n}\n//# sourceMappingURL=projections.js.map","/**\n * @module ol/proj/transforms\n */\nimport { isEmpty } from '../obj.js';\n/**\n * @private\n * @type {!Object<string, Object<string, import(\"../proj.js\").TransformFunction>>}\n */\nvar transforms = {};\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n    transforms = {};\n}\n/**\n * Registers a conversion function to convert coordinates from the source\n * projection to the destination projection.\n *\n * @param 
 {import(\"./Projection.js\").default} source Source.\n * @param {import(\"./Projection.js\").default} destination Destination.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform.\n */\nexport function add(source, destination, transformFn) {\n    var sourceCode = source.getCode();\n    var destinationCode = destination.getCode();\n    if (!(sourceCode in transforms)) {\n        transforms[sourceCode] = {};\n    }\n    transforms[sourceCode][destinationCode] = transformFn;\n}\n/**\n * Unregisters the conversion function to convert coordinates from the source\n * projection to the destination projection.  This method is used to clean up\n * cached transforms during testing.\n *\n * @param {import(\"./Projection.js\").default} source Source projection.\n * @param {import(\"./Projection.js\").default} destination Destination projection.\n * @return {import(\"../proj.js\").TransformFunction} transformFn The unregistered transform.\n */\nexport function remove(sour
 ce, destination) {\n    var sourceCode = source.getCode();\n    var destinationCode = destination.getCode();\n    var transform = transforms[sourceCode][destinationCode];\n    delete transforms[sourceCode][destinationCode];\n    if (isEmpty(transforms[sourceCode])) {\n        delete transforms[sourceCode];\n    }\n    return transform;\n}\n/**\n * Get a transform given a source code and a destination code.\n * @param {string} sourceCode The code for the source projection.\n * @param {string} destinationCode The code for the destination projection.\n * @return {import(\"../proj.js\").TransformFunction|undefined} The transform function (if found).\n */\nexport function get(sourceCode, destinationCode) {\n    var transform;\n    if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {\n        transform = transforms[sourceCode][destinationCode];\n    }\n    return transform;\n}\n//# sourceMappingURL=transforms.js.map","/**\n * @module ol/sphere\n */\nimport Geometry
 Type from './geom/GeometryType.js';\nimport { toDegrees, toRadians } from './math.js';\n/**\n * Object literal with options for the {@link getLength} or {@link getArea}\n * functions.\n * @typedef {Object} SphereMetricOptions\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857']\n * Projection of the  geometry.  By default, the geometry is assumed to be in\n * Web Mercator.\n * @property {number} [radius=6371008.8] Sphere radius.  By default, the\n * [mean Earth radius](https://en.wikipedia.org/wiki/Earth_radius#Mean_radius)\n * for the WGS84 ellipsoid is used.\n */\n/**\n * The mean Earth radius (1/3 * (2a + b)) for the WGS84 ellipsoid.\n * https://en.wikipedia.org/wiki/Earth_radius#Mean_radius\n * @type {number}\n */\nexport var DEFAULT_RADIUS = 6371008.8;\n/**\n * Get the great circle distance (in meters) between two geographic coordinates.\n * @param {Array} c1 Starting coordinate.\n * @param {Array} c2 Ending coordinate.\n * @param {number=} opt_radius T
 he sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {number} The great circle distance between the points (in meters).\n * @api\n */\nexport function getDistance(c1, c2, opt_radius) {\n    var radius = opt_radius || DEFAULT_RADIUS;\n    var lat1 = toRadians(c1[1]);\n    var lat2 = toRadians(c2[1]);\n    var deltaLatBy2 = (lat2 - lat1) / 2;\n    var deltaLonBy2 = toRadians(c2[0] - c1[0]) / 2;\n    var a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) +\n        Math.sin(deltaLonBy2) *\n            Math.sin(deltaLonBy2) *\n            Math.cos(lat1) *\n            Math.cos(lat2);\n    return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n}\n/**\n * Get the cumulative great circle length of linestring coordinates (geographic).\n * @param {Array} coordinates Linestring coordinates.\n * @param {number} radius The sphere radius to use.\n * @return {number} The length (in meters).\n */\nfunction getLengthInternal(coordinat
 es, radius) {\n    var length = 0;\n    for (var i = 0, ii = coordinates.length; i < ii - 1; ++i) {\n        length += getDistance(coordinates[i], coordinates[i + 1], radius);\n    }\n    return length;\n}\n/**\n * Get the spherical length of a geometry.  This length is the sum of the\n * great circle distances between coordinates.  For polygons, the length is\n * the sum of all rings.  For points, the length is zero.  For multi-part\n * geometries, the length is the sum of the length of each part.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions=} opt_options Options for the\n * length calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n * You can change this by providing a `projection` option.\n * @return {number} The spherical length (in meters).\n * @api\n */\nexport function getLength(geometry, opt_options) {\n    var options = opt_options || {};\n    var radius = options.radius || DEFAULT_RADIUS;\n    
 var projection = options.projection || 'EPSG:3857';\n    var type = geometry.getType();\n    if (type !== GeometryType.GEOMETRY_COLLECTION) {\n        geometry = geometry.clone().transform(projection, 'EPSG:4326');\n    }\n    var length = 0;\n    var coordinates, coords, i, ii, j, jj;\n    switch (type) {\n        case GeometryType.POINT:\n        case GeometryType.MULTI_POINT: {\n            break;\n        }\n        case GeometryType.LINE_STRING:\n        case GeometryType.LINEAR_RING: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            length = getLengthInternal(coordinates, radius);\n            break;\n        }\n        case GeometryType.MULTI_LINE_STRING:\n        case GeometryType.POLYGON: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            for (i = 0, ii = coordinates.length; i < ii; ++i) {\n                length +=
  getLengthInternal(coordinates[i], radius);\n            }\n            break;\n        }\n        case GeometryType.MULTI_POLYGON: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            for (i = 0, ii = coordinates.length; i < ii; ++i) {\n                coords = coordinates[i];\n                for (j = 0, jj = coords.length; j < jj; ++j) {\n                    length += getLengthInternal(coords[j], radius);\n                }\n            }\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            var geometries = /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n            for (i = 0, ii = geometries.length; i < ii; ++i) {\n                length += getLength(geometries[i], opt_options);\n            }\n            break;\n        }\n        default: {\n            throw new Error('Unsupported geometry type: ' + type);\n     
    }\n    }\n    return length;\n}\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs-new.jpl.nasa.gov/handle/2014/40409)\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates List of coordinates of a linear\n * ring. If the ring is oriented clockwise, the area will be positive,\n * otherwise it will be negative.\n * @param {number} radius The sphere radius.\n * @return {number} Area (in square meters).\n */\nfunction getAreaInternal(coordinates, radius) {\n    var area = 0;\n    var len = coordinates.length;\n    var x1 = coordinates[len - 1][0];\n    var y1 = coordinates[len - 1][1];\n    for (var i = 0; i < len; i++) {\n        var x2 = coordinates[i][0];\n        var y2 = coordinates[i][1];\n        area +=\n            toRadians(x2 - x1)
  *\n                (2 + Math.sin(toRadians(y1)) + Math.sin(toRadians(y2)));\n        x1 = x2;\n        y1 = y2;\n    }\n    return (area * radius * radius) / 2.0;\n}\n/**\n * Get the spherical area of a geometry.  This is the area (in meters) assuming\n * that polygon edges are segments of great circles on a sphere.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions=} opt_options Options for the area\n *     calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n *     You can change this by providing a `projection` option.\n * @return {number} The spherical area (in square meters).\n * @api\n */\nexport function getArea(geometry, opt_options) {\n    var options = opt_options || {};\n    var radius = options.radius || DEFAULT_RADIUS;\n    var projection = options.projection || 'EPSG:3857';\n    var type = geometry.getType();\n    if (type !== GeometryType.GEOMETRY_COLLECTION) {\n        geometry = geometry.clone
 ().transform(projection, 'EPSG:4326');\n    }\n    var area = 0;\n    var coordinates, coords, i, ii, j, jj;\n    switch (type) {\n        case GeometryType.POINT:\n        case GeometryType.MULTI_POINT:\n        case GeometryType.LINE_STRING:\n        case GeometryType.MULTI_LINE_STRING:\n        case GeometryType.LINEAR_RING: {\n            break;\n        }\n        case GeometryType.POLYGON: {\n            coordinates = /** @type {import(\"./geom/Polygon.js\").default} */ (geometry).getCoordinates();\n            area = Math.abs(getAreaInternal(coordinates[0], radius));\n            for (i = 1, ii = coordinates.length; i < ii; ++i) {\n                area -= Math.abs(getAreaInternal(coordinates[i], radius));\n            }\n            break;\n        }\n        case GeometryType.MULTI_POLYGON: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            for (i = 0, ii = coordinates.length; i < ii; ++i) {\n   
              coords = coordinates[i];\n                area += Math.abs(getAreaInternal(coords[0], radius));\n                for (j = 1, jj = coords.length; j < jj; ++j) {\n                    area -= Math.abs(getAreaInternal(coords[j], radius));\n                }\n            }\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            var geometries = /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n            for (i = 0, ii = geometries.length; i < ii; ++i) {\n                area += getArea(geometries[i], opt_options);\n            }\n            break;\n        }\n        default: {\n            throw new Error('Unsupported geometry type: ' + type);\n        }\n    }\n    return area;\n}\n/**\n * Returns the coordinate at the given distance and bearing from `c1`.\n *\n * @param {import(\"./coordinate.js\").Coordinate} c1 The origin point (`[lon, lat]` in degrees).\n * @param {number} distance The 
 great-circle distance between the origin\n *     point and the target point.\n * @param {number} bearing The bearing (in radians).\n * @param {number=} opt_radius The sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {import(\"./coordinate.js\").Coordinate} The target point.\n */\nexport function offset(c1, distance, bearing, opt_radius) {\n    var radius = opt_radius || DEFAULT_RADIUS;\n    var lat1 = toRadians(c1[1]);\n    var lon1 = toRadians(c1[0]);\n    var dByR = distance / radius;\n    var lat = Math.asin(Math.sin(lat1) * Math.cos(dByR) +\n        Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing));\n    var lon = lon1 +\n        Math.atan2(Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1), Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat));\n    return [toDegrees(lon), toDegrees(lat)];\n}\n//# sourceMappingURL=sphere.js.map","/**\n * @module ol/string\n */\n/**\n * @param {number} number Number to be formatted\n * @par
 am {number} width The desired width\n * @param {number=} opt_precision Precision of the output string (i.e. number of decimal places)\n * @returns {string} Formatted string\n */\nexport function padNumber(number, width, opt_precision) {\n    var numberString = opt_precision !== undefined ? number.toFixed(opt_precision) : '' + number;\n    var decimal = numberString.indexOf('.');\n    decimal = decimal === -1 ? numberString.length : decimal;\n    return decimal > width\n        ? numberString\n        : new Array(1 + width - decimal).join('0') + numberString;\n}\n/**\n * Adapted from https://github.com/omichelsen/compare-versions/blob/master/index.js\n * @param {string|number} v1 First version\n * @param {string|number} v2 Second version\n * @returns {number} Value\n */\nexport function compareVersions(v1, v2) {\n    var s1 = ('' + v1).split('.');\n    var s2 = ('' + v2).split('.');\n    for (var i = 0; i < Math.max(s1.length, s2.length); i++) {\n        var n1 = parseInt(s1[i] || '0
 ', 10);\n        var n2 = parseInt(s2[i] || '0', 10);\n        if (n1 > n2) {\n            return 1;\n        }\n        if (n2 > n1) {\n            return -1;\n        }\n    }\n    return 0;\n}\n//# sourceMappingURL=string.js.map","/**\n * @module ol/coordinate\n */\nimport { getWidth } from './extent.js';\nimport { modulo } from './math.js';\nimport { padNumber } from './string.js';\n/**\n * An array of numbers representing an xy coordinate. Example: `[16, 48]`.\n * @typedef {Array<number>} Coordinate\n * @api\n */\n/**\n * A function that takes a {@link module:ol/coordinate~Coordinate} and\n * transforms it into a `{string}`.\n *\n * @typedef {function((Coordinate|undefined)): string} CoordinateFormat\n * @api\n */\n/**\n * Add `delta` to `coordinate`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {add} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     add(coord, [-2, 4]);\n *     // coord is now [5
 .85, 51.983333]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {Coordinate} delta Delta.\n * @return {Coordinate} The input coordinate adjusted by\n * the given delta.\n * @api\n */\nexport function add(coordinate, delta) {\n    coordinate[0] += +delta[0];\n    coordinate[1] += +delta[1];\n    return coordinate;\n}\n/**\n * Calculates the point closest to the passed coordinate on the passed circle.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {import(\"./geom/Circle.js\").default} circle The circle.\n * @return {Coordinate} Closest point on the circumference.\n */\nexport function closestOnCircle(coordinate, circle) {\n    var r = circle.getRadius();\n    var center = circle.getCenter();\n    var x0 = center[0];\n    var y0 = center[1];\n    var x1 = coordinate[0];\n    var y1 = coordinate[1];\n    var dx = x1 - x0;\n    var dy = y1 - y0;\n    if (dx === 0 && dy === 0) {\n        dx = 1;\n    }\n    var d = Math.sqrt(dx * dx + dy * dy);\n    var x
  = x0 + (r * dx) / d;\n    var y = y0 + (r * dy) / d;\n    return [x, y];\n}\n/**\n * Calculates the point closest to the passed coordinate on the passed segment.\n * This is the foot of the perpendicular of the coordinate to the segment when\n * the foot is on the segment, or the closest segment coordinate when the foot\n * is outside the segment.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {Array<Coordinate>} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nexport function closestOnSegment(coordinate, segment) {\n    var x0 = coordinate[0];\n    var y0 = coordinate[1];\n    var start = segment[0];\n    var end = segment[1];\n    var x1 = start[0];\n    var y1 = start[1];\n    var x2 = end[0];\n    var y2 = end[1];\n    var dx = x2 - x1;\n    var dy = y2 - y1;\n    var along = dx === 0 && dy === 0\n        ? 0\n        : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * d
 x + dy * dy || 0);\n    var x, y;\n    if (along <= 0) {\n        x = x1;\n        y = y1;\n    }\n    else if (along >= 1) {\n        x = x2;\n        y = y2;\n    }\n    else {\n        x = x1 + along * dx;\n        y = y1 + along * dy;\n    }\n    return [x, y];\n}\n/**\n * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be\n * used to format\n * a {Coordinate} to a string.\n *\n * Example without specifying the fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var stringifyFunc = createStringXY();\n *     var out = stringifyFunc(coord);\n *     // out is now '8, 48'\n *\n * Example with explicitly specifying 2 fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var stringifyFunc = createStringXY(2);\n *     var out = stringifyFunc(coord);\n *     // out is now '7.85, 47.98'\n *\n * @param {number=} opt
 _fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {CoordinateFormat} Coordinate format.\n * @api\n */\nexport function createStringXY(opt_fractionDigits) {\n    return (\n    /**\n     * @param {Coordinate} coordinate Coordinate.\n     * @return {string} String XY.\n     */\n    function (coordinate) {\n        return toStringXY(coordinate, opt_fractionDigits);\n    });\n}\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} String.\n */\nexport function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {\n    var normalizedDegrees = modulo(degrees + 180, 360) - 180;\n    var x = Math.abs(3600 * normalizedDegrees);\n    var dflPrecision = opt_fractionDigits || 0;\n    var precision = Math.pow(10, dflPrecision);\n    var deg = Math.floor(x / 3
 600);\n    var min = Math.floor((x - deg * 3600) / 60);\n    var sec = x - deg * 3600 - min * 60;\n    sec = Math.ceil(sec * precision) / precision;\n    if (sec >= 60) {\n        sec = 0;\n        min += 1;\n    }\n    if (min >= 60) {\n        min = 0;\n        deg += 1;\n    }\n    return (deg +\n        '\\u00b0 ' +\n        padNumber(min, 2) +\n        '\\u2032 ' +\n        padNumber(sec, 2, dflPrecision) +\n        '\\u2033' +\n        (normalizedDegrees == 0\n            ? ''\n            : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0)));\n}\n/**\n * Transforms the given {@link module:ol/coordinate~Coordinate} to a string\n * using the given string template. The strings `{x}` and `{y}` in the template\n * will be replaced with the first and second coordinate values respectively.\n *\n * Example without specifying the fractional digits:\n *\n *     import {format} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var template = 'Coordinate is (
 {x}|{y}).';\n *     var out = format(coord, template);\n *     // out is now 'Coordinate is (8|48).'\n *\n * Example explicitly specifying the fractional digits:\n *\n *     import {format} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var template = 'Coordinate is ({x}|{y}).';\n *     var out = format(coord, template, 2);\n *     // out is now 'Coordinate is (7.85|47.98).'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {string} template A template string with `{x}` and `{y}` placeholders\n *     that will be replaced by first and second coordinate values.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Formatted coordinate.\n * @api\n */\nexport function format(coordinate, template, opt_fractionDigits) {\n    if (coordinate) {\n        return template\n            .replace('{x}', coordinate[0].toFixed(opt_fractionDigits))\n            .replace('{y}'
 , coordinate[1].toFixed(opt_fractionDigits));\n    }\n    else {\n        return '';\n    }\n}\n/**\n * @param {Coordinate} coordinate1 First coordinate.\n * @param {Coordinate} coordinate2 Second coordinate.\n * @return {boolean} The two coordinates are equal.\n */\nexport function equals(coordinate1, coordinate2) {\n    var equals = true;\n    for (var i = coordinate1.length - 1; i >= 0; --i) {\n        if (coordinate1[i] != coordinate2[i]) {\n            equals = false;\n            break;\n        }\n    }\n    return equals;\n}\n/**\n * Rotate `coordinate` by `angle`. `coordinate` is modified in place and\n * returned by the function.\n *\n * Example:\n *\n *     import {rotate} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var rotateRadians = Math.PI / 2; // 90 degrees\n *     rotate(coord, rotateRadians);\n *     // coord is now [-47.983333, 7.85]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} angle Angle in radian.\n * @retu
 rn {Coordinate} Coordinate.\n * @api\n */\nexport function rotate(coordinate, angle) {\n    var cosAngle = Math.cos(angle);\n    var sinAngle = Math.sin(angle);\n    var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n    var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n    coordinate[0] = x;\n    coordinate[1] = y;\n    return coordinate;\n}\n/**\n * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {scale as scaleCoordinate} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var scale = 1.2;\n *     scaleCoordinate(coord, scale);\n *     // coord is now [9.42, 57.5799996]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} scale Scale factor.\n * @return {Coordinate} Coordinate.\n */\nexport function scale(coordinate, scale) {\n    coordinate[0] *= scale;\n    coordinate[1] *= scale;\n    return coordinate;\n}\n/**\n * @param {Coordin
 ate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nexport function squaredDistance(coord1, coord2) {\n    var dx = coord1[0] - coord2[0];\n    var dy = coord1[1] - coord2[1];\n    return dx * dx + dy * dy;\n}\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Distance between coord1 and coord2.\n */\nexport function distance(coord1, coord2) {\n    return Math.sqrt(squaredDistance(coord1, coord2));\n}\n/**\n * Calculate the squared distance from a coordinate to a line segment.\n *\n * @param {Coordinate} coordinate Coordinate of the point.\n * @param {Array<Coordinate>} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nexport function squaredDistanceToSegment(coordinate, segment) {\n    return squaredDistance(coordinate, closestOnSegment(coor
 dinate, segment));\n}\n/**\n * Format a geographic coordinate with the hemisphere, degrees, minutes, and\n * seconds.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringHDMS} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringHDMS(coord);\n *     // out is now '47° 58′ 60″ N 7° 50′ 60″ E'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n *     import {toStringHDMS} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringHDMS(coord, 1);\n *     // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Hemisphere, degrees, minutes and seconds.\n * @api\n */\nexport function toStringHDMS(coordinate, opt_fractionDigits) {\n    if (coordinate) {\n        return (degreesToS
 tringHDMS('NS', coordinate[1], opt_fractionDigits) +\n            ' ' +\n            degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits));\n    }\n    else {\n        return '';\n    }\n}\n/**\n * Format a coordinate as a comma delimited string.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringXY(coord);\n *     // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n *     import {toStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringXY(coord, 1);\n *     // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} XY.\n * @api\n */\nexport function toStringXY(coordinate, opt_fractionDigits) {\n    return format(coor
 dinate, '{x}, {y}', opt_fractionDigits);\n}\n/**\n * Modifies the provided coordinate in-place to be within the real world\n * extent. The lower projection extent boundary is inclusive, the upper one\n * exclusive.\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {Coordinate} The coordinate within the real world extent.\n */\nexport function wrapX(coordinate, projection) {\n    if (projection.canWrapX()) {\n        var worldWidth = getWidth(projection.getExtent());\n        var worldsAway = getWorldsAway(coordinate, projection, worldWidth);\n        if (worldsAway) {\n            coordinate[0] -= worldsAway * worldWidth;\n        }\n    }\n    return coordinate;\n}\n/**\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {number=} opt_sourceExtentWidth Width of the source extent.\n * @return {number} Offset in w
 orld widths.\n */\nexport function getWorldsAway(coordinate, projection, opt_sourceExtentWidth) {\n    var projectionExtent = projection.getExtent();\n    var worldsAway = 0;\n    if (projection.canWrapX() &&\n        (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])) {\n        var sourceExtentWidth = opt_sourceExtentWidth || getWidth(projectionExtent);\n        worldsAway = Math.floor((coordinate[0] - projectionExtent[0]) / sourceExtentWidth);\n    }\n    return worldsAway;\n}\n//# sourceMappingURL=coordinate.js.map","/**\n * @module ol/proj\n */\n/**\n * The ol/proj module stores:\n * * a list of {@link module:ol/proj/Projection}\n * objects, one for each projection supported by the application\n * * a list of transform functions needed to convert coordinates in one projection\n * into another.\n *\n * The static functions are the methods used to maintain these.\n * Each transform function can handle not only simple coordinate pairs, but also\n * large 
 arrays of coordinates such as vector geometries.\n *\n * When loaded, the library adds projection objects for EPSG:4326 (WGS84\n * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used\n * for example by Bing Maps or OpenStreetMap), together with the relevant\n * transform functions.\n *\n * Additional transforms may be added by using the http://proj4js.org/\n * library (version 2.2 or later). You can use the full build supplied by\n * Proj4js, or create a custom build to support those projections you need; see\n * the Proj4js website for how to do this. You also need the Proj4js definitions\n * for the required projections. These definitions can be obtained from\n * https://epsg.io/, and are a JS function, so can be loaded in a script\n * tag (as in the examples) or pasted into your application.\n *\n * After all required projection definitions are added to proj4's registry (by\n * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`\n *
  package. Existing transforms are not changed by this function. See\n * examples/wms-image-custom-proj for an example of this.\n *\n * Additional projection definitions can be registered with `proj4.defs()` any\n * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't\n * know in advance what projections are needed, you can initially load minimal\n * support and then load whichever are requested.\n *\n * Note that Proj4js does not support projection extents. If you want to add\n * one for creating default tile grids, you can add it after the Projection\n * object has been created with `setExtent`, for example,\n * `get('EPSG:1234').setExtent(extent)`.\n *\n * In addition to Proj4js support, any transform functions can be added with\n * {@link module:ol/proj~addCoordinateTransforms}. To use this, you must first create\n * a {@link module:ol/proj/Projection} object for the new projection and add it with\n * {@link module:ol/proj~add
 Projection}. You can then add the forward and inverse\n * functions with {@link module:ol/proj~addCoordinateTransforms}. See\n * examples/wms-custom-proj for an example of this.\n *\n * Note that if no transforms are needed and you only need to define the\n * projection, just add a {@link module:ol/proj/Projection} with\n * {@link module:ol/proj~addProjection}. See examples/wms-no-proj for an example of\n * this.\n */\nimport Projection from './proj/Projection.js';\nimport Units, { METERS_PER_UNIT } from './proj/Units.js';\nimport { PROJECTIONS as EPSG3857_PROJECTIONS, fromEPSG4326, toEPSG4326, } from './proj/epsg3857.js';\nimport { PROJECTIONS as EPSG4326_PROJECTIONS } from './proj/epsg4326.js';\nimport { add as addProj, clear as clearProj, get as getProj, } from './proj/projections.js';\nimport { add as addTransformFunc, clear as clearTransformFuncs, get as getTransformFunc, } from './proj/transforms.js';\nimport { applyTransform, getWidth } from './extent.js';\nimport { clamp, mo
 dulo } from './math.js';\nimport { getDistance } from './sphere.js';\nimport { getWorldsAway } from './coordinate.js';\n/**\n * A projection as {@link module:ol/proj/Projection}, SRS identifier\n * string or undefined.\n * @typedef {Projection|string|undefined} ProjectionLike\n * @api\n */\n/**\n * A transform function accepts an array of input coordinate values, an optional\n * output array, and an optional dimension (default should be 2).  The function\n * transforms the input coordinate values, populates the output array, and\n * returns the output array.\n *\n * @typedef {function(Array<number>, Array<number>=, number=): Array<number>} TransformFunction\n * @api\n */\nexport { METERS_PER_UNIT };\nexport { Projection };\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension.\n * @return {Array<number>} Output coordinate array (new array, same coordinate\n 
 *     values).\n */\nexport function cloneTransform(input, opt_output, opt_dimension) {\n    var output;\n    if (opt_output !== undefined) {\n        for (var i = 0, ii = input.length; i < ii; ++i) {\n            opt_output[i] = input[i];\n        }\n        output = opt_output;\n    }\n    else {\n        output = input.slice();\n    }\n    return output;\n}\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension.\n * @return {Array<number>} Input coordinate array (same array as input).\n */\nexport function identityTransform(input, opt_output, opt_dimension) {\n    if (opt_output !== undefined && input !== opt_output) {\n        for (var i = 0, ii = input.length; i < ii; ++i) {\n            opt_output[i] = input[i];\n        }\n        input = opt_output;\n    }\n    return input;\n}\n/**\n * Add a Projection object to the list of supported projections that
  can be\n * looked up by their code.\n *\n * @param {Projection} projection Projection instance.\n * @api\n */\nexport function addProjection(projection) {\n    addProj(projection.getCode(), projection);\n    addTransformFunc(projection, projection, cloneTransform);\n}\n/**\n * @param {Array<Projection>} projections Projections.\n */\nexport function addProjections(projections) {\n    projections.forEach(addProjection);\n}\n/**\n * Fetches a Projection object for the code specified.\n *\n * @param {ProjectionLike} projectionLike Either a code string which is\n *     a combination of authority and identifier such as \"EPSG:4326\", or an\n *     existing projection object, or undefined.\n * @return {Projection} Projection object, or null if not in list.\n * @api\n */\nexport function get(projectionLike) {\n    return typeof projectionLike === 'string'\n        ? getProj(/** @type {string} */ (projectionLike))\n        : /** @type {Projection} */ (projectionLike) || null;\n}\n/**\n * G
 et the resolution of the point in degrees or distance units.\n * For projections with degrees as the unit this will simply return the\n * provided resolution. For other projections the point resolution is\n * by default estimated by transforming the 'point' pixel to EPSG:4326,\n * measuring its width and height on the normal sphere,\n * and taking the average of the width and height.\n * A custom function can be provided for a specific projection, either\n * by setting the `getPointResolution` option in the\n * {@link module:ol/proj/Projection~Projection} constructor or by using\n * {@link module:ol/proj/Projection~Projection#setGetPointResolution} to change an existing\n * projection object.\n * @param {ProjectionLike} projection The projection.\n * @param {number} resolution Nominal resolution in projection units.\n * @param {import(\"./coordinate.js\").Coordinate} point Point to find adjusted resolution at.\n * @param {import(\"./proj/Units.js\").default=} opt_units Units to get 
 the point resolution in.\n * Default is the projection's units.\n * @return {number} Point resolution.\n * @api\n */\nexport function getPointResolution(projection, resolution, point, opt_units) {\n    projection = get(projection);\n    var pointResolution;\n    var getter = projection.getPointResolutionFunc();\n    if (getter) {\n        pointResolution = getter(resolution, point);\n        if (opt_units && opt_units !== projection.getUnits()) {\n            var metersPerUnit = projection.getMetersPerUnit();\n            if (metersPerUnit) {\n                pointResolution =\n                    (pointResolution * metersPerUnit) / METERS_PER_UNIT[opt_units];\n            }\n        }\n    }\n    else {\n        var units = projection.getUnits();\n        if ((units == Units.DEGREES && !opt_units) || opt_units == Units.DEGREES) {\n            pointResolution = resolution;\n        }\n        else {\n            // Estimate point resolution by transforming the center pixel to EPSG:4
 326,\n            // measuring its width and height on the normal sphere, and taking the\n            // average of the width and height.\n            var toEPSG4326_1 = getTransformFromProjections(projection, get('EPSG:4326'));\n            var vertices = [\n                point[0] - resolution / 2,\n                point[1],\n                point[0] + resolution / 2,\n                point[1],\n                point[0],\n                point[1] - resolution / 2,\n                point[0],\n                point[1] + resolution / 2,\n            ];\n            vertices = toEPSG4326_1(vertices, vertices, 2);\n            var width = getDistance(vertices.slice(0, 2), vertices.slice(2, 4));\n            var height = getDistance(vertices.slice(4, 6), vertices.slice(6, 8));\n            pointResolution = (width + height) / 2;\n            var metersPerUnit = opt_units\n                ? METERS_PER_UNIT[opt_units]\n                : projection.getMetersPerUnit();\n            if (met
 ersPerUnit !== undefined) {\n                pointResolution /= metersPerUnit;\n            }\n        }\n    }\n    return pointResolution;\n}\n/**\n * Registers transformation functions that don't alter coordinates. Those allow\n * to transform between projections with equal meaning.\n *\n * @param {Array<Projection>} projections Projections.\n * @api\n */\nexport function addEquivalentProjections(projections) {\n    addProjections(projections);\n    projections.forEach(function (source) {\n        projections.forEach(function (destination) {\n            if (source !== destination) {\n                addTransformFunc(source, destination, cloneTransform);\n            }\n        });\n    });\n}\n/**\n * Registers transformation functions to convert coordinates in any projection\n * in projection1 to any projection in projection2.\n *\n * @param {Array<Projection>} projections1 Projections with equal\n *     meaning.\n * @param {Array<Projection>} projections2 Projections with equa
 l\n *     meaning.\n * @param {TransformFunction} forwardTransform Transformation from any\n *   projection in projection1 to any projection in projection2.\n * @param {TransformFunction} inverseTransform Transform from any projection\n *   in projection2 to any projection in projection1..\n */\nexport function addEquivalentTransforms(projections1, projections2, forwardTransform, inverseTransform) {\n    projections1.forEach(function (projection1) {\n        projections2.forEach(function (projection2) {\n            addTransformFunc(projection1, projection2, forwardTransform);\n            addTransformFunc(projection2, projection1, inverseTransform);\n        });\n    });\n}\n/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n    clearProj();\n    clearTransformFuncs();\n}\n/**\n * @param {Projection|string|undefined} projection Projection.\n * @param {string} defaultCode Default code.\n * @return {Projection} Projection.\n */\nexport
  function createProjection(projection, defaultCode) {\n    if (!projection) {\n        return get(defaultCode);\n    }\n    else if (typeof projection === 'string') {\n        return get(projection);\n    }\n    else {\n        return /** @type {Projection} */ (projection);\n    }\n}\n/**\n * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform\n * function.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} coordTransform Coordinate\n *     transform.\n * @return {TransformFunction} Transform function.\n */\nexport function createTransformFromCoordinateTransform(coordTransform) {\n    return (\n    /**\n     * @param {Array<number>} input Input.\n     * @param {Array<number>=} opt_output Output.\n     * @param {number=} opt_dimension Dimension.\n     * @return {Array<number>} Output.\n     */\n    function (input, opt_output, opt_dimension) {\n        var length = input.length;\n        var dimen
 sion = opt_dimension !== undefined ? opt_dimension : 2;\n        var output = opt_output !== undefined ? opt_output : new Array(length);\n        for (var i = 0; i < length; i += dimension) {\n            var point = coordTransform([input[i], input[i + 1]]);\n            output[i] = point[0];\n            output[i + 1] = point[1];\n            for (var j = dimension - 1; j >= 2; --j) {\n                output[i + j] = input[i + j];\n            }\n        }\n        return output;\n    });\n}\n/**\n * Registers coordinate transform functions to convert coordinates between the\n * source projection and the destination projection.\n * The forward and inverse functions convert coordinate pairs; this function\n * converts these into the functions used internally which also handle\n * extents and coordinate arrays.\n *\n * @param {ProjectionLike} source Source projection.\n * @param {ProjectionLike} destination Destination projection.\n * @param {function(import(\"./coordinate.js\").Coor
 dinate): import(\"./coordinate.js\").Coordinate} forward The forward transform\n *     function (that is, from the source projection to the destination\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} inverse The inverse transform\n *     function (that is, from the destination projection to the source\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @api\n */\nexport function addCoordinateTransforms(source, destination, forward, inverse) {\n    var sourceProj = get(source);\n    var destProj = get(destination);\n    addTransformFunc(sourceProj, destProj, createTransformFromCoordinateTransform(forward));\n    addTransformFunc(destProj, sourceProj, createTra
 nsformFromCoordinateTransform(inverse));\n}\n/**\n * Transforms a coordinate from longitude/latitude to a different projection.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate as longitude and latitude, i.e.\n *     an array with longitude as 1st and latitude as 2nd element.\n * @param {ProjectionLike=} opt_projection Target projection. The\n *     default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate projected to the target projection.\n * @api\n */\nexport function fromLonLat(coordinate, opt_projection) {\n    return transform(coordinate, 'EPSG:4326', opt_projection !== undefined ? opt_projection : 'EPSG:3857');\n}\n/**\n * Transforms a coordinate to longitude/latitude.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Projected coordinate.\n * @param {ProjectionLike=} opt_projection Projection of the coordinate.\n *     The default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\".
 /coordinate.js\").Coordinate} Coordinate as longitude and latitude, i.e. an array\n *     with longitude as 1st and latitude as 2nd element.\n * @api\n */\nexport function toLonLat(coordinate, opt_projection) {\n    var lonLat = transform(coordinate, opt_projection !== undefined ? opt_projection : 'EPSG:3857', 'EPSG:4326');\n    var lon = lonLat[0];\n    if (lon < -180 || lon > 180) {\n        lonLat[0] = modulo(lon + 180, 360) - 180;\n    }\n    return lonLat;\n}\n/**\n * Checks if two projections are the same, that is every coordinate in one\n * projection does represent the same geographic point as the same coordinate in\n * the other projection.\n *\n * @param {Projection} projection1 Projection 1.\n * @param {Projection} projection2 Projection 2.\n * @return {boolean} Equivalent.\n * @api\n */\nexport function equivalent(projection1, projection2) {\n    if (projection1 === projection2) {\n        return true;\n    }\n    var equalUnits = projection1.getUnits() === projection2.g
 etUnits();\n    if (projection1.getCode() === projection2.getCode()) {\n        return equalUnits;\n    }\n    else {\n        var transformFunc = getTransformFromProjections(projection1, projection2);\n        return transformFunc === cloneTransform && equalUnits;\n    }\n}\n/**\n * Searches in the list of transform functions for the function for converting\n * coordinates from the source projection to the destination projection.\n *\n * @param {Projection} sourceProjection Source Projection object.\n * @param {Projection} destinationProjection Destination Projection\n *     object.\n * @return {TransformFunction} Transform function.\n */\nexport function getTransformFromProjections(sourceProjection, destinationProjection) {\n    var sourceCode = sourceProjection.getCode();\n    var destinationCode = destinationProjection.getCode();\n    var transformFunc = getTransformFunc(sourceCode, destinationCode);\n    if (!transformFunc) {\n        transformFunc = identityTransform;\n    }\n
     return transformFunc;\n}\n/**\n * Given the projection-like objects, searches for a transformation\n * function to convert a coordinates array from the source projection to the\n * destination projection.\n *\n * @param {ProjectionLike} source Source.\n * @param {ProjectionLike} destination Destination.\n * @return {TransformFunction} Transform function.\n * @api\n */\nexport function getTransform(source, destination) {\n    var sourceProjection = get(source);\n    var destinationProjection = get(destination);\n    return getTransformFromProjections(sourceProjection, destinationProjection);\n}\n/**\n * Transforms a coordinate from source projection to destination projection.\n * This returns a new coordinate (and does not modify the original).\n *\n * See {@link module:ol/proj~transformExtent} for extent transformation.\n * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its\n * subclasses for geometry transforms.\n *\n * @param {import(\"./coordinate.js
 \").Coordinate} coordinate Coordinate.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\nexport function transform(coordinate, source, destination) {\n    var transformFunc = getTransform(source, destination);\n    return transformFunc(coordinate, undefined, coordinate.length);\n}\n/**\n * Transforms an extent from source projection to destination projection.  This\n * returns a new extent (and does not modify the original).\n *\n * @param {import(\"./extent.js\").Extent} extent The extent to transform.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @param {number=} opt_stops Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {import(\"./extent.js\").Extent} The transformed extent.\n * @api\n 
 */\nexport function transformExtent(extent, source, destination, opt_stops) {\n    var transformFunc = getTransform(source, destination);\n    return applyTransform(extent, transformFunc, undefined, opt_stops);\n}\n/**\n * Transforms the given point to the destination projection.\n *\n * @param {import(\"./coordinate.js\").Coordinate} point Point.\n * @param {Projection} sourceProjection Source projection.\n * @param {Projection} destinationProjection Destination projection.\n * @return {import(\"./coordinate.js\").Coordinate} Point.\n */\nexport function transformWithProjections(point, sourceProjection, destinationProjection) {\n    var transformFunc = getTransformFromProjections(sourceProjection, destinationProjection);\n    return transformFunc(point);\n}\n/**\n * @type {?Projection}\n */\nvar userProjection = null;\n/**\n * Set the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API.  Support for use
 r\n * projections is not yet complete and should be considered experimental.\n * @param {ProjectionLike} projection The user projection.\n */\nexport function setUserProjection(projection) {\n    userProjection = get(projection);\n}\n/**\n * Clear the user projection if set.  Note that this method is not yet a part of\n * the stable API.  Support for user projections is not yet complete and should\n * be considered experimental.\n */\nexport function clearUserProjection() {\n    userProjection = null;\n}\n/**\n * Get the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API.  Support for user\n * projections is not yet complete and should be considered experimental.\n * @returns {?Projection} The user projection (or null if not set).\n */\nexport function getUserProjection() {\n    return userProjection;\n}\n/**\n * Use geographic coordinates (WGS-84 datum) in API methods.  Note that this\n * method is not
  yet a part of the stable API.  Support for user projections is\n * not yet complete and should be considered experimental.\n */\nexport function useGeographic() {\n    setUserProjection('EPSG:4326');\n}\n/**\n * Return a coordinate transformed into the user projection.  If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} sourceProjection The input coordinate projection.\n * @returns {Array<number>} The input coordinate in the user projection.\n */\nexport function toUserCoordinate(coordinate, sourceProjection) {\n    if (!userProjection) {\n        return coordinate;\n    }\n    return transform(coordinate, sourceProjection, userProjection);\n}\n/**\n * Return a coordinate transformed from the user projection.  If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} destProjection Th
 e destination projection.\n * @returns {Array<number>} The input coordinate transformed.\n */\nexport function fromUserCoordinate(coordinate, destProjection) {\n    if (!userProjection) {\n        return coordinate;\n    }\n    return transform(coordinate, userProjection, destProjection);\n}\n/**\n * Return an extent transformed into the user projection.  If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} sourceProjection The input extent projection.\n * @returns {import(\"./extent.js\").Extent} The input extent in the user projection.\n */\nexport function toUserExtent(extent, sourceProjection) {\n    if (!userProjection) {\n        return extent;\n    }\n    return transformExtent(extent, sourceProjection, userProjection);\n}\n/**\n * Return an extent transformed from the user projection.  If no user projection\n * is set, the original extent is returned.\n * @param {import
 (\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} destProjection The destination projection.\n * @returns {import(\"./extent.js\").Extent} The input extent transformed.\n */\nexport function fromUserExtent(extent, destProjection) {\n    if (!userProjection) {\n        return extent;\n    }\n    return transformExtent(extent, userProjection, destProjection);\n}\n/**\n * Creates a safe coordinate transform function from a coordinate transform function.\n * \"Safe\" means that it can handle wrapping of x-coordinates for global projections,\n * and that coordinates exceeding the source projection validity extent's range will be\n * clamped to the validity range.\n * @param {Projection} sourceProj Source projection.\n * @param {Projection} destProj Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} transform Transform function (source to destiation).\n * @return {function(import(\"./coordi
 nate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} Safe transform function (source to destiation).\n */\nexport function createSafeCoordinateTransform(sourceProj, destProj, transform) {\n    return function (coord) {\n        var sourceX = coord[0];\n        var sourceY = coord[1];\n        var transformed, worldsAway;\n        if (sourceProj.canWrapX()) {\n            var sourceExtent = sourceProj.getExtent();\n            var sourceExtentWidth = getWidth(sourceExtent);\n            worldsAway = getWorldsAway(coord, sourceProj, sourceExtentWidth);\n            if (worldsAway) {\n                // Move x to the real world\n                sourceX = sourceX - worldsAway * sourceExtentWidth;\n            }\n            sourceX = clamp(sourceX, sourceExtent[0], sourceExtent[2]);\n            sourceY = clamp(sourceY, sourceExtent[1], sourceExtent[3]);\n            transformed = transform([sourceX, sourceY]);\n        }\n        else {\n            transformed = transform(c
 oord);\n        }\n        if (worldsAway && destProj.canWrapX()) {\n            // Move transformed coordinate back to the offset world\n            transformed[0] += worldsAway * getWidth(destProj.getExtent());\n        }\n        return transformed;\n    };\n}\n/**\n * Add transforms to and from EPSG:4326 and EPSG:3857.  This function is called\n * by when this module is executed and should only need to be called again after\n * `clearAllProjections()` is called (e.g. in tests).\n */\nexport function addCommon() {\n    // Add transformations that don't alter coordinates to convert within set of\n    // projections with equal meaning.\n    addEquivalentProjections(EPSG3857_PROJECTIONS);\n    addEquivalentProjections(EPSG4326_PROJECTIONS);\n    // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like\n    // coordinates and back.\n    addEquivalentTransforms(EPSG4326_PROJECTIONS, EPSG3857_PROJECTIONS, fromEPSG4326, toEPSG4326);\n}\naddCommon();\n//# sourceMapp
 ingURL=proj.js.map","/**\n * @module ol/geom/flat/transform\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function transform2D(flatCoordinates, offset, end, stride, transform, opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        var x = flatCoordinates[j];\n        var y = flatCoordinates[j + 1];\n        dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n        dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n    }\n    if (opt_dest && dest.length != i) {\n        dest.length = i;\n    }\n    return dest;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordin
 ates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array<number>} anchor Rotation anchor point.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function rotate(flatCoordinates, offset, end, stride, angle, anchor, opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var cos = Math.cos(angle);\n    var sin = Math.sin(angle);\n    var anchorX = anchor[0];\n    var anchorY = anchor[1];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        var deltaX = flatCoordinates[j] - anchorX;\n        var deltaY = flatCoordinates[j + 1] - anchorY;\n        dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n        dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n        for (var k = j + 2; k < j + stride; ++k) {\n            dest[i++] = flatCoordinates[k];\n        }\n    }\n    if (opt_dest && dest.leng
 th != i) {\n        dest.length = i;\n    }\n    return dest;\n}\n/**\n * Scale the coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array<number>} anchor Scale anchor point.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function scale(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var anchorX = anchor[0];\n    var anchorY = anchor[1];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        var deltaX = flatCoordinates[j] - anchorX;\n        var deltaY = flatCoordinates[j + 1] - anchorY;\n        dest[i++] = anchorX + sx * deltaX;\n        dest[i++] = anchorY + sy * deltaY;\n        for 
 (var k = j + 2; k < j + stride; ++k) {\n            dest[i++] = flatCoordinates[k];\n        }\n    }\n    if (opt_dest && dest.length != i) {\n        dest.length = i;\n    }\n    return dest;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function translate(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        dest[i++] = flatCoordinates[j] + deltaX;\n        dest[i++] = flatCoordinates[j + 1] + deltaY;\n        for (var k = j + 2; k < j + stride; ++k) {\n            dest[i++] = flatCoordinates[k];\n        }\n    }\n    if (opt_dest && dest.length !=
  i) {\n        dest.length = i;\n    }\n    return dest;\n}\n//# sourceMappingURL=transform.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/Geometry\n */\nimport BaseObject from '../Object.js';\nimport Units from '../proj/Units.js';\nimport { abstract } from '../util.js';\nimport { compose as composeTransform, create as createTransform, } from '../transform.js';\nimport { createEmpty, createOrUpdateEmpty, getH
 eight, returnOrUpdate, } from '../extent.js';\nimport { get as getProjection, getTransform } from '../proj.js';\nimport { memoizeOne } from '../functions.js';\nimport { transform2D } from './flat/transform.js';\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for vector geometries.\n *\n * To get notified of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nvar Geometry = /** @class */ (function (_super) {\n    __extends(Geometry, _super);\n    function Geometry() {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.extent_ = createEmpty();\n        /**\n         * @private\n         * @type {number}\n
          */\n        _this.extentRevision_ = -1;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.simplifiedGeometryRevision = 0;\n        /**\n         * Get a transformed and simplified version of the geometry.\n         * @abstract\n         * @param {number} revision The geometry revision.\n         * @param {number} squaredTolerance Squared tolerance.\n         * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n         * @return {Geometry} Simplified geometry.\n         */\n        _this.simplifyTransformedInternal = memoizeOne(function (revision, squaredTolerance, opt_transform) {\n            if (!opt_transform) {\n                return this.getSimplifiedGeometry(squaredTolerance);\n            }\n            var clone = this.clone();\n            clon
 e.applyTransform(opt_transform);\n            return clone.getSimplifiedGeometry(squaredTolerance);\n        });\n        return _this;\n    }\n    /**\n     * Get a transformed and simplified version of the geometry.\n     * @abstract\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n     * @return {Geometry} Simplified geometry.\n     */\n    Geometry.prototype.simplifyTransformed = function (squaredTolerance, opt_transform) {\n        return this.simplifyTransformedInternal(this.getRevision(), squaredTolerance, opt_transform);\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @abstract\n     * @return {!Geometry} Clone.\n     */\n    Geometry.prototype.clone = function () {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate
 } closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Geometry.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        return abstract();\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    Geometry.prototype.containsXY = function (x, y) {\n        var coord = this.getClosestPoint([x, y]);\n        return coord[0] === x && coord[1] === y;\n    };\n    /**\n     * Return the closest point of the geometry to the passed point as\n     * {@link module:ol/coordinate~Coordinate coordinate}.\n     * @param {import(\"../coordinate.js\").Coordinate} point Point.\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_closestPoint Closest point.\n     * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n     * @api\n     */\n    Geometry.prototype.getClo
 sestPoint = function (point, opt_closestPoint) {\n        var closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN];\n        this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n        return closestPoint;\n    };\n    /**\n     * Returns true if this geometry includes the specified coordinate. If the\n     * coordinate is on the boundary of the geometry, returns false.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {boolean} Contains coordinate.\n     * @api\n     */\n    Geometry.prototype.intersectsCoordinate = function (coordinate) {\n        return this.containsXY(coordinate[0], coordinate[1]);\n    };\n    /**\n     * @abstract\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    Geometry.prototype.computeExtent = function (extent) {\n        return abstract();\n    };\n    /**\n     * Get the ext
 ent of the geometry.\n     * @param {import(\"../extent.js\").Extent=} opt_extent Extent.\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     * @api\n     */\n    Geometry.prototype.getExtent = function (opt_extent) {\n        if (this.extentRevision_ != this.getRevision()) {\n            var extent = this.computeExtent(this.extent_);\n            if (isNaN(extent[0]) || isNaN(extent[1])) {\n                createOrUpdateEmpty(extent);\n            }\n            this.extentRevision_ = this.getRevision();\n        }\n        return returnOrUpdate(this.extent_, opt_extent);\n    };\n    /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n     * coordinates in place.\n     * @abstract\n     * @param {number} angle Rotation angle in radians.\n     * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    Geometry.prototype.rotate = function (angle, anchor) {\n        abstract();\n    }
 ;\n    /**\n     * Scale the geometry (with an optional origin).  This modifies the geometry\n     * coordinates in place.\n     * @abstract\n     * @param {number} sx The scaling factor in the x-direction.\n     * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor The scale origin (defaults to the center\n     *     of the geometry extent).\n     * @api\n     */\n    Geometry.prototype.scale = function (sx, opt_sy, opt_anchor) {\n        abstract();\n    };\n    /**\n     * Create a simplified version of this geometry.  For linestrings, this uses\n     * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)\n     * algorithm.  For polygons, a quantization-based\n     * simplification is used to preserve topology.\n     * @param {number} tolerance The tolerance distance for simplification.\n     * @return {Geometry} A new, simplified version of the origina
 l geometry.\n     * @api\n     */\n    Geometry.prototype.simplify = function (tolerance) {\n        return this.getSimplifiedGeometry(tolerance * tolerance);\n    };\n    /**\n     * Create a simplified version of this geometry using the Douglas Peucker\n     * algorithm.\n     * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n     * @abstract\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {Geometry} Simplified geometry.\n     */\n    Geometry.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        return abstract();\n    };\n    /**\n     * Get the type of this geometry.\n     * @abstract\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     */\n    Geometry.prototype.getType = function () {\n        return abstract();\n    };\n    /**\n     * Apply a transform function to the coordinates of the geometry.\n     * The geometry is modified in place.\n     * If you do not want the geometry modifi
 ed in place, first `clone()` it and\n     * then use this function on the clone.\n     * @abstract\n     * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n     * Called with a flat array of geometry coordinates.\n     */\n    Geometry.prototype.applyTransform = function (transformFn) {\n        abstract();\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @abstract\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     */\n    Geometry.prototype.intersectsExtent = function (extent) {\n        return abstract();\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @abstract\n     * @param {number} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api\n     */\n    Geometry.prototype
 .translate = function (deltaX, deltaY) {\n        abstract();\n    };\n    /**\n     * Transform each coordinate of the geometry from one coordinate reference\n     * system to another. The geometry is modified in place.\n     * For example, a line will be transformed to a line and a circle to a circle.\n     * If you do not want the geometry modified in place, first `clone()` it and\n     * then use this function on the clone.\n     *\n     * @param {import(\"../proj.js\").ProjectionLike} source The current projection.  Can be a\n     *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n     * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.  Can be a\n     *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n     * @return {Geometry} This geometry.  Note that original geometry is\n     *     modified in place.\n     * @api\n     */\n    Geometry.prototype.transform = function (source, des
 tination) {\n        /** @type {import(\"../proj/Projection.js\").default} */\n        var sourceProj = getProjection(source);\n        var transformFn = sourceProj.getUnits() == Units.TILE_PIXELS\n            ? function (inCoordinates, outCoordinates, stride) {\n                var pixelExtent = sourceProj.getExtent();\n                var projectedExtent = sourceProj.getWorldExtent();\n                var scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n                composeTransform(tmpTransform, projectedExtent[0], projectedExtent[3], scale, -scale, 0, 0, 0);\n                transform2D(inCoordinates, 0, inCoordinates.length, stride, tmpTransform, outCoordinates);\n                return getTransform(sourceProj, destination)(inCoordinates, outCoordinates, stride);\n            }\n            : getTransform(sourceProj, destination);\n        this.applyTransform(transformFn);\n        return this;\n    };\n    return Geometry;\n}(BaseObject));\nexport default Geome
 try;\n//# sourceMappingURL=Geometry.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/SimpleGeometry\n */\nimport Geometry from './Geometry.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport { abstract } from '../util.js';\nimport { createOrUpdateFromFlatCoordinates, getCenter } from '../extent.js';\nimport { rotate, scale, transform2D, translate } from './flat/transform.js';\n/**\n * @classdesc\n *
  Abstract base class; only used for creating subclasses; do not instantiate\n * in apps, as cannot be rendered.\n *\n * @abstract\n * @api\n */\nvar SimpleGeometry = /** @class */ (function (_super) {\n    __extends(SimpleGeometry, _super);\n    function SimpleGeometry() {\n        var _this = _super.call(this) || this;\n        /**\n         * @protected\n         * @type {import(\"./GeometryLayout.js\").default}\n         */\n        _this.layout = GeometryLayout.XY;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.stride = 2;\n        /**\n         * @protected\n         * @type {Array<number>}\n         */\n        _this.flatCoordinates = null;\n        return _this;\n    }\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    SimpleGeometry.prototype.computeExtent = function (extent) {\n        return createOrUpdateFromFl
 atCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);\n    };\n    /**\n     * @abstract\n     * @return {Array<*>} Coordinates.\n     */\n    SimpleGeometry.prototype.getCoordinates = function () {\n        return abstract();\n    };\n    /**\n     * Return the first coordinate of the geometry.\n     * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n     * @api\n     */\n    SimpleGeometry.prototype.getFirstCoordinate = function () {\n        return this.flatCoordinates.slice(0, this.stride);\n    };\n    /**\n     * @return {Array<number>} Flat coordinates.\n     */\n    SimpleGeometry.prototype.getFlatCoordinates = function () {\n        return this.flatCoordinates;\n    };\n    /**\n     * Return the last coordinate of the geometry.\n     * @return {import(\"../coordinate.js\").Coordinate} Last point.\n     * @api\n     */\n    SimpleGeometry.prototype.getLastCoordinate = function () {\n        return this.flatCoordinates.
 slice(this.flatCoordinates.length - this.stride);\n    };\n    /**\n     * Return the {@link module:ol/geom/GeometryLayout layout} of the geometry.\n     * @return {import(\"./GeometryLayout.js\").default} Layout.\n     * @api\n     */\n    SimpleGeometry.prototype.getLayout = function () {\n        return this.layout;\n    };\n    /**\n     * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {SimpleGeometry} Simplified geometry.\n     */\n    SimpleGeometry.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        if (this.simplifiedGeometryRevision !== this.getRevision()) {\n            this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n            this.simplifiedGeometryRevision = this.getRevision();\n        }\n        // If squaredTolerance is negative or if we know that simplification will not\n        // have any effect then just return this.\n        if
  (squaredTolerance < 0 ||\n            (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n                squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)) {\n            return this;\n        }\n        var simplifiedGeometry = this.getSimplifiedGeometryInternal(squaredTolerance);\n        var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n        if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n            return simplifiedGeometry;\n        }\n        else {\n            // Simplification did not actually remove any coordinates.  We now know\n            // that any calls to getSimplifiedGeometry with a squaredTolerance less\n            // than or equal to the current squaredTolerance will also not have any\n            // effect.  This allows us to short circuit simplification (saving CPU\n            // cycles) and prevents the cache of simplified geometries from filling\n            // up with useless identi
 cal copies of this geometry (saving memory).\n            this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n            return this;\n        }\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {SimpleGeometry} Simplified geometry.\n     * @protected\n     */\n    SimpleGeometry.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        return this;\n    };\n    /**\n     * @return {number} Stride.\n     */\n    SimpleGeometry.prototype.getStride = function () {\n        return this.stride;\n    };\n    /**\n     * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     */\n    SimpleGeometry.prototype.setFlatCoordinates = function (layout, flatCoordinates) {\n        this.stride = getStrideForLayout(layout);\n        this.layout = layout;\n        this.flatCoordinates = flatCoordinates;\n    };\n    /**\n     * @abstract\n 
     * @param {!Array<*>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    SimpleGeometry.prototype.setCoordinates = function (coordinates, opt_layout) {\n        abstract();\n    };\n    /**\n     * @param {import(\"./GeometryLayout.js\").default|undefined} layout Layout.\n     * @param {Array<*>} coordinates Coordinates.\n     * @param {number} nesting Nesting.\n     * @protected\n     */\n    SimpleGeometry.prototype.setLayout = function (layout, coordinates, nesting) {\n        /** @type {number} */\n        var stride;\n        if (layout) {\n            stride = getStrideForLayout(layout);\n        }\n        else {\n            for (var i = 0; i < nesting; ++i) {\n                if (coordinates.length === 0) {\n                    this.layout = GeometryLayout.XY;\n                    this.stride = 2;\n                    return;\n                }\n                else {\n                    coordinates = /** 
 @type {Array} */ (coordinates[0]);\n                }\n            }\n            stride = coordinates.length;\n            layout = getLayoutForStride(stride);\n        }\n        this.layout = layout;\n        this.stride = stride;\n    };\n    /**\n     * Apply a transform function to the coordinates of the geometry.\n     * The geometry is modified in place.\n     * If you do not want the geometry modified in place, first `clone()` it and\n     * then use this function on the clone.\n     * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n     * Called with a flat array of geometry coordinates.\n     * @api\n     */\n    SimpleGeometry.prototype.applyTransform = function (transformFn) {\n        if (this.flatCoordinates) {\n            transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n            this.changed();\n        }\n    };\n    /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n   
   * coordinates in place.\n     * @param {number} angle Rotation angle in radians.\n     * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    SimpleGeometry.prototype.rotate = function (angle, anchor) {\n        var flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n            var stride = this.getStride();\n            rotate(flatCoordinates, 0, flatCoordinates.length, stride, angle, anchor, flatCoordinates);\n            this.changed();\n        }\n    };\n    /**\n     * Scale the geometry (with an optional origin).  This modifies the geometry\n     * coordinates in place.\n     * @param {number} sx The scaling factor in the x-direction.\n     * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor The scale origin (defaults to the center\n     *     of the geometry extent).\n     * @api\n     */\n    Simpl
 eGeometry.prototype.scale = function (sx, opt_sy, opt_anchor) {\n        var sy = opt_sy;\n        if (sy === undefined) {\n            sy = sx;\n        }\n        var anchor = opt_anchor;\n        if (!anchor) {\n            anchor = getCenter(this.getExtent());\n        }\n        var flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n            var stride = this.getStride();\n            scale(flatCoordinates, 0, flatCoordinates.length, stride, sx, sy, anchor, flatCoordinates);\n            this.changed();\n        }\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @param {number} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api\n     */\n    SimpleGeometry.prototype.translate = function (deltaX, deltaY) {\n        var flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n    
         var stride = this.getStride();\n            translate(flatCoordinates, 0, flatCoordinates.length, stride, deltaX, deltaY, flatCoordinates);\n            this.changed();\n        }\n    };\n    return SimpleGeometry;\n}(Geometry));\n/**\n * @param {number} stride Stride.\n * @return {import(\"./GeometryLayout.js\").default} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n    var layout;\n    if (stride == 2) {\n        layout = GeometryLayout.XY;\n    }\n    else if (stride == 3) {\n        layout = GeometryLayout.XYZ;\n    }\n    else if (stride == 4) {\n        layout = GeometryLayout.XYZM;\n    }\n    return /** @type {import(\"./GeometryLayout.js\").default} */ (layout);\n}\n/**\n * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n    var stride;\n    if (layout == GeometryLayout.XY) {\n        stride = 2;\n    }\n    else if (layout == GeometryLayout.XYZ || layout 
 == GeometryLayout.XYM) {\n        stride = 3;\n    }\n    else if (layout == GeometryLayout.XYZM) {\n        stride = 4;\n    }\n    return /** @type {number} */ (stride);\n}\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, opt_dest) {\n    var flatCoordinates = simpleGeometry.getFlatCoordinates();\n    if (!flatCoordinates) {\n        return null;\n    }\n    else {\n        var stride = simpleGeometry.getStride();\n        return transform2D(flatCoordinates, 0, flatCoordinates.length, stride, transform, opt_dest);\n    }\n}\nexport default SimpleGeometry;\n//# sourceMappingURL=SimpleGeometry.js.map","/**\n * @module ol/geom/flat/closest\n */\nimport { lerp, squaredDistance as squaredDx } from '../../math.js';\n/**\n * Return
 s the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y).  Extra\n * dimensions are linearly interpolated.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n */\nfunction assignClosest(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {\n    var x1 = flatCoordinates[offset1];\n    var y1 = flatCoordinates[offset1 + 1];\n    var dx = flatCoordinates[offset2] - x1;\n    var dy = flatCoordinates[offset2 + 1] - y1;\n    var offset;\n    if (dx === 0 && dy === 0) {\n        offset = offset1;\n    }\n    else {\n        var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n        if (t > 1) {\n            offset = offset2;\n        }\n        else if (t > 0) {\n          
   for (var i = 0; i < stride; ++i) {\n                closestPoint[i] = lerp(flatCoordinates[offset1 + i], flatCoordinates[offset2 + i], t);\n            }\n            closestPoint.length = stride;\n            return;\n        }\n        else {\n            offset = offset1;\n        }\n    }\n    for (var i = 0; i < stride; ++i) {\n        closestPoint[i] = flatCoordinates[offset + i];\n    }\n    closestPoint.length = stride;\n}\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    for (offset += stride; offset < end; offset +=
  stride) {\n        var x2 = flatCoordinates[offset];\n        var y2 = flatCoordinates[offset + 1];\n        var squaredDelta = squaredDx(x1, y1, x2, y2);\n        if (squaredDelta > max) {\n            max = squaredDelta;\n        }\n        x1 = x2;\n        y1 = y2;\n    }\n    return max;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n        offset = end;\n    }\n    return max;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss
 .\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(flatCoordinates, offset, endss, stride, max) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n        offset = ends[ends.length - 1];\n    }\n    return max;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function as
 signClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n    if (offset == end) {\n        return minSquaredDistance;\n    }\n    var i, squaredDistance;\n    if (maxDelta === 0) {\n        // All points are identical, so just test the first point.\n        squaredDistance = squaredDx(x, y, flatCoordinates[offset], flatCoordinates[offset + 1]);\n        if (squaredDistance < minSquaredDistance) {\n            for (i = 0; i < stride; ++i) {\n                closestPoint[i] = flatCoordinates[offset + i];\n            }\n            closestPoint.length = stride;\n            return squaredDistance;\n        }\n        else {\n            return minSquaredDistance;\n        }\n    }\n    var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n    var index = offset + stride;\n    while (index < end) {\n        assignClosest(flatCoordinates, index - stride, index, stride, x, y, tmpPoint);\n        squaredDistance 
 = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n        if (squaredDistance < minSquaredDistance) {\n            minSquaredDistance = squaredDistance;\n            for (i = 0; i < stride; ++i) {\n                closestPoint[i] = tmpPoint[i];\n            }\n            closestPoint.length = stride;\n            index += stride;\n        }\n        else {\n            // Skip ahead multiple points, because we know that all the skipped\n            // points cannot be any closer than the closest point we have found so\n            // far.  We know this because we know how close the current point is, how\n            // close the closest point we have found so far is, and the maximum\n            // distance between consecutive points.  For example, if we're currently\n            // at distance 10, the best we've found so far is 3, and that the maximum\n            // distance between consecutive points is 2, then we'll need to skip at\n            // least (10 - 3) / 2 == 3 (rounded d
 own) points to have any chance of\n            // finding a closer point.  We use Math.max(..., 1) to ensure that we\n            // always advance at least one point, to avoid an infinite loop.\n            index +=\n                stride *\n                    Math.max(((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /\n                        maxDelta) |\n                        0, 1);\n        }\n    }\n    if (isRing) {\n        // Check the closing segment.\n        assignClosest(flatCoordinates, end - stride, offset, stride, x, y, tmpPoint);\n        squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n        if (squaredDistance < minSquaredDistance) {\n            minSquaredDistance = squaredDistance;\n            for (i = 0; i < stride; ++i) {\n                closestPoint[i] = tmpPoint[i];\n            }\n            closestPoint.length = stride;\n        }\n    }\n    return minSquaredDistance;\n}\n/**\n * @param {Array<number>} flatCoordinates Fla
 t coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n    var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        minSquaredDistance = assignClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n        offset = end;\n    }\n    return minSquaredDist
 ance;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(flatCoordinates, offset, endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n    var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        minSquaredDistance = assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, min
 SquaredDistance, tmpPoint);\n        offset = ends[ends.length - 1];\n    }\n    return minSquaredDistance;\n}\n//# sourceMappingURL=closest.js.map","/**\n * @module ol/geom/flat/deflate\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n    for (var i = 0, ii = coordinate.length; i < ii; ++i) {\n        flatCoordinates[offset++] = coordinate[i];\n    }\n    return offset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(flatCoordinates, offset,
  coordinates, stride) {\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        var coordinate = coordinates[i];\n        for (var j = 0; j < stride; ++j) {\n            flatCoordinates[offset++] = coordinate[j];\n        }\n    }\n    return offset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array<number>=} opt_ends Ends.\n * @return {Array<number>} Ends.\n */\nexport function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, stride, opt_ends) {\n    var ends = opt_ends ? opt_ends : [];\n    var i = 0;\n    for (var j = 0, jj = coordinatess.length; j < jj; ++j) {\n        var end = deflateCoordinates(flatCoordinates, offset, coordinatess[j], stride);\n        ends[i++] = end;\n        offset = end;\n    }\n    ends.length = i;\n    return ends;\n}\n/**\n
  * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array<Array<number>>=} opt_endss Endss.\n * @return {Array<Array<number>>} Endss.\n */\nexport function deflateMultiCoordinatesArray(flatCoordinates, offset, coordinatesss, stride, opt_endss) {\n    var endss = opt_endss ? opt_endss : [];\n    var i = 0;\n    for (var j = 0, jj = coordinatesss.length; j < jj; ++j) {\n        var ends = deflateCoordinatesArray(flatCoordinates, offset, coordinatesss[j], stride, endss[i]);\n        endss[i++] = ends;\n        offset = ends[ends.length - 1];\n    }\n    endss.length = i;\n    return endss;\n}\n//# sourceMappingURL=deflate.js.map","/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights 
 reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n//    1. Redistributions of source code must retain the above copyright notice,\n//       this list of conditions and the following disclaimer.\n//\n//    2. Redistributions in binary form must reproduce the above copyright\n//       notice, this list of conditions and the following disclaimer in the\n//       documentation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
  TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\nimport { squaredDistance, squaredSegmentDistance } from '../../math.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array<number>=} opt_simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @return {Array<number>} Simplified line string.\n */\nexport function simplifyLineString(flatCoordinates, offset, end, stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) {\n 
    var simplifiedFlatCoordinates = opt_simplifiedFlatCoordinates !== undefined\n        ? opt_simplifiedFlatCoordinates\n        : [];\n    if (!highQuality) {\n        end = radialDistance(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n        flatCoordinates = simplifiedFlatCoordinates;\n        offset = 0;\n        stride = 2;\n    }\n    simplifiedFlatCoordinates.length = douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n    return simplifiedFlatCoordinates;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function doug
 lasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    var n = (end - offset) / stride;\n    if (n < 3) {\n        for (; offset < end; offset += stride) {\n            simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                flatCoordinates[offset + 1];\n        }\n        return simplifiedOffset;\n    }\n    /** @type {Array<number>} */\n    var markers = new Array(n);\n    markers[0] = 1;\n    markers[n - 1] = 1;\n    /** @type {Array<number>} */\n    var stack = [offset, end - stride];\n    var index = 0;\n    while (stack.length > 0) {\n        var last = stack.pop();\n        var first = stack.pop();\n        var maxSquaredDistance = 0;\n        var x1 = flatCoordinates[first];\n        var y1 = flatCoordinates[first + 1];\n        var x2 = flatCoordinates[last];\n        var y2 = flatCoordinates[last + 1];\n        for (
 var i = first + stride; i < last; i += stride) {\n            var x = flatCoordinates[i];\n            var y = flatCoordinates[i + 1];\n            var squaredDistance_1 = squaredSegmentDistance(x, y, x1, y1, x2, y2);\n            if (squaredDistance_1 > maxSquaredDistance) {\n                index = i;\n                maxSquaredDistance = squaredDistance_1;\n            }\n        }\n        if (maxSquaredDistance > squaredTolerance) {\n            markers[(index - offset) / stride] = 1;\n            if (first + stride < index) {\n                stack.push(first, index);\n            }\n            if (index + stride < last) {\n                stack.push(index, last);\n            }\n        }\n    }\n    for (var i = 0; i < n; ++i) {\n        if (markers[i]) {\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                flatCoordinates[offset + i * stride];\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                flatCoordinates[offset + i *
  stride + 1];\n        }\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        simplifiedOffset = douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset);\n        simplifiedEnds.push(simplifiedOffset);\n        offset = en
 d;\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(flatCoordinates, offset, endss, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        var simplifiedEnds = [];\n        simplifiedOffset = douglasPeuckerArray(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n     
    simplifiedEndss.push(simplifiedEnds);\n        offset = ends[ends.length - 1];\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    if (end <= offset + stride) {\n        // zero or one point, no simplification possible, so copy and return\n        for (; offset < end; offset += stride) {\n            simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                f
 latCoordinates[offset + 1];\n        }\n        return simplifiedOffset;\n    }\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    // copy first point\n    simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n    var x2 = x1;\n    var y2 = y1;\n    for (offset += stride; offset < end; offset += stride) {\n        x2 = flatCoordinates[offset];\n        y2 = flatCoordinates[offset + 1];\n        if (squaredDistance(x1, y1, x2, y2) > squaredTolerance) {\n            // copy point at offset\n            simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n            simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n            x1 = x2;\n            y1 = y2;\n        }\n    }\n    if (x2 != x1 || y2 != y1) {\n        // copy last point\n        simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n        simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n    }\n    return simplifiedOffset;\
 n}\n/**\n * @param {number} value Value.\n * @param {number} tolerance Tolerance.\n * @return {number} Rounded value.\n */\nexport function snap(value, tolerance) {\n    return tolerance * Math.round(value / tolerance);\n}\n/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded.  This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string.  This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons.  This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n
  * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(flatCoordinates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    // do nothing if the line is empty\n    if (offset == end) {\n        return simplifiedOffset;\n    }\n    // snap the first coordinate (P1)\n    var x1 = snap(flatCoordinates[offset], tolerance);\n    var y1 = snap(flatCoordinates[offset + 1], tolerance);\n    offset += stride;\n    // add the first coordinate to the output\n    simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n    // find the next coordinate that does not snap to the same value as the first\n    // coordinate (P2)\n    var x2, y2;\n    do {\n        x2 = snap(flatCoordinates[offset], tolerance);\n       
  y2 = snap(flatCoordinates[offset + 1], tolerance);\n        offset += stride;\n        if (offset == end) {\n            // all coordinates snap to the same value, the line collapses to a point\n            // push the last snapped value anyway to ensure that the output contains\n            // at least two points\n            // FIXME should we really return at least two points anyway?\n            simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n            simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n            return simplifiedOffset;\n        }\n    } while (x2 == x1 && y2 == y1);\n    while (offset < end) {\n        // snap the next coordinate (P3)\n        var x3 = snap(flatCoordinates[offset], tolerance);\n        var y3 = snap(flatCoordinates[offset + 1], tolerance);\n        offset += stride;\n        // skip P3 if it is equal to P2\n        if (x3 == x2 && y3 == y2) {\n            continue;\n        }\n        // calculate the delta between P1 and P2\n      
   var dx1 = x2 - x1;\n        var dy1 = y2 - y1;\n        // calculate the delta between P3 and P1\n        var dx2 = x3 - x1;\n        var dy2 = y3 - y1;\n        // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n        // P1 in the same direction then P2 is on the straight line between P1 and\n        // P3\n        if (dx1 * dy2 == dy1 * dx2 &&\n            ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n            ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))) {\n            // discard P2 and set P2 = P3\n            x2 = x3;\n            y2 = y3;\n            continue;\n        }\n        // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n        // between P3 and P1 or on the opposite half of the line to P2.  add P2,\n        // and continue with P1 = P2 and P2 = P3\n        simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n        simplifiedFlatCoordinates[simplifiedOffset++] = y2;
 \n        x1 = x2;\n        y1 = y2;\n        x2 = x3;\n        y2 = y3;\n    }\n    // add the last point (P2)\n    simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(flatCoordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        simplifiedOffset = quantize(flatCoordi
 nates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset);\n        simplifiedEnds.push(simplifiedOffset);\n        offset = end;\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(flatCoordinates, offset, endss, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        var simplifiedEnds = [];\n        simplifiedOffset = quantizeArray(flatCo
 ordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n        simplifiedEndss.push(simplifiedEnds);\n        offset = ends[ends.length - 1];\n    }\n    return simplifiedOffset;\n}\n//# sourceMappingURL=simplify.js.map","/**\n * @module ol/geom/flat/inflate\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>=} opt_coordinates Coordinates.\n * @return {Array<import(\"../../coordinate.js\").Coordinate>} Coordinates.\n */\nexport function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) {\n    var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        coordinates[i++] = flatCoordinates.slice(j, j + stride);\n    }\n    coordinates.length = i;\n  
   return coordinates;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>=} opt_coordinatess Coordinatess.\n * @return {Array<Array<import(\"../../coordinate.js\").Coordinate>>} Coordinatess.\n */\nexport function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) {\n    var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];\n    var i = 0;\n    for (var j = 0, jj = ends.length; j < jj; ++j) {\n        var end = ends[j];\n        coordinatess[i++] = inflateCoordinates(flatCoordinates, offset, end, stride, coordinatess[i]);\n        offset = end;\n    }\n    coordinatess.length = i;\n    return coordinatess;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} 
 endss Endss.\n * @param {number} stride Stride.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>=} opt_coordinatesss\n *     Coordinatesss.\n * @return {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) {\n    var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];\n    var i = 0;\n    for (var j = 0, jj = endss.length; j < jj; ++j) {\n        var ends = endss[j];\n        coordinatesss[i++] = inflateCoordinatesArray(flatCoordinates, offset, ends, stride, coordinatesss[i]);\n        offset = ends[ends.length - 1];\n    }\n    coordinatesss.length = i;\n    return coordinatesss;\n}\n//# sourceMappingURL=inflate.js.map","/**\n * @module ol/geom/flat/area\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {
 number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n    var twiceArea = 0;\n    var x1 = flatCoordinates[end - stride];\n    var y1 = flatCoordinates[end - stride + 1];\n    for (; offset < end; offset += stride) {\n        var x2 = flatCoordinates[offset];\n        var y2 = flatCoordinates[offset + 1];\n        twiceArea += y1 * x2 - x1 * y2;\n        x1 = x2;\n        y1 = y2;\n    }\n    return twiceArea / 2;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n    var area = 0;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        area += linearRing(flatCoordinates, offset, end, stride);\n        offset = end;\n    }\n    return area;\n}\n/**\n * @p
 aram {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n    var area = 0;\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        area += linearRings(flatCoordinates, offset, ends, stride);\n        offset = ends[ends.length - 1];\n    }\n    return area;\n}\n//# sourceMappingURL=area.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n   
      function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/LinearRing\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestPoint, maxSquaredDelta } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateCoordinates } from './flat/deflate.js';\nimport { douglasPeucker } from './flat/simplify.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { linearRing as linearRingArea } from './flat/area.js';\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nvar LinearRing = /** @class */ (function (_super) {\n    __extends(LinearRing, _super);\n    /**\n     * @param {Array<import(\"../coordinate.js\").Coordinate
 >|Array<number>} coordinates Coordinates.\n     *     For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    function LinearRing(coordinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Make a complete copy of the geometry.\n     *
  @return {!LinearRing} Clone.\n     * @api\n     */\n    LinearRing.prototype.clone = function () {\n        return new LinearRing(this.flatCoordinates.slice(), this.layout);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    LinearRing.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(maxSquaredDelta(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestPoint(this.fla
 tCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * Return the area of the linear ring on projected plane.\n     * @return {number} Area (on projected plane).\n     * @api\n     */\n    LinearRing.prototype.getArea = function () {\n        return linearRingArea(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * Return the coordinates of the linear ring.\n     * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n     * @api\n     */\n    LinearRing.prototype.getCoordinates = function () {\n        return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LinearRing} Simplified LinearRing.\n     * @protected\n     */\n    LinearRing.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {
 \n        var simplifiedFlatCoordinates = [];\n        simplifiedFlatCoordinates.length = douglasPeucker(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n        return new LinearRing(simplifiedFlatCoordinates, GeometryLayout.XY);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    LinearRing.prototype.getType = function () {\n        return GeometryType.LINEAR_RING;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    LinearRing.prototype.intersectsExtent = function (extent) {\n        return false;\n    };\n    /**\n     * Set the coordinates of the linear ring.\n     * @param {!Array<import(\"../coordinate.js\").Coordinate>}
  coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    LinearRing.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 1);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\n    return LinearRing;\n}(SimpleGeometry));\nexport default LinearRing;\n//# sourceMappingURL=LinearRing.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return f
 unction (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/Point\n */\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { containsXY, createOrUpdateFromCoordinate } from '../extent.js';\nimport { deflateCoordinate } from './flat/deflate.js';\nimport { squaredDistance as squaredDx } from '../math.js';\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nvar Point = /** @class */ (function (_super) {\n    __extends(Point, _super);\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    function Point(coordinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        _this.setCoordinates(coordinates, opt_layout);\n 
        return _this;\n    }\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!Point} Clone.\n     * @api\n     */\n    Point.prototype.clone = function () {\n        var point = new Point(this.flatCoordinates.slice(), this.layout);\n        return point;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Point.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        var flatCoordinates = this.flatCoordinates;\n        var squaredDistance = squaredDx(x, y, flatCoordinates[0], flatCoordinates[1]);\n        if (squaredDistance < minSquaredDistance) {\n            var stride = this.stride;\n            for (var i = 0; i < stride; ++i) {\n                closestPoint[i] = flatCoordinates[i];\n   
          }\n            closestPoint.length = stride;\n            return squaredDistance;\n        }\n        else {\n            return minSquaredDistance;\n        }\n    };\n    /**\n     * Return the coordinate of the point.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n     * @api\n     */\n    Point.prototype.getCoordinates = function () {\n        return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    Point.prototype.computeExtent = function (extent) {\n        return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    Point.prototype.getType = function () {\n        return GeometryType.POINT;\n    };\n 
    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    Point.prototype.intersectsExtent = function (extent) {\n        return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n    };\n    /**\n     * @param {!Array<*>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    Point.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 0);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinate(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\n    return Point;\n}(SimpleGeometry));\nexport default Point;\n//# sourceMappingURL=Point.js.
 map","/**\n * @module ol/geom/flat/contains\n */\nimport { forEachCorner } from '../../extent.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function linearRingContainsExtent(flatCoordinates, offset, end, stride, extent) {\n    var outside = forEachCorner(extent, \n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {boolean} Contains (x, y).\n     */\n    function (coordinate) {\n        return !linearRingContainsXY(flatCoordinates, offset, end, stride, coordinate[0], coordinate[1]);\n    });\n    return !outside;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {num
 ber} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(flatCoordinates, offset, end, stride, x, y) {\n    // http://geomalgorithms.com/a03-_inclusion.html\n    // Copyright 2000 softSurfer, 2012 Dan Sunday\n    // This code may be freely used and modified for any purpose\n    // providing that this copyright notice is included with it.\n    // SoftSurfer makes no warranty for this code, and cannot be held\n    // liable for any real or imagined damage resulting from its use.\n    // Users of this code must verify correctness for their application.\n    var wn = 0;\n    var x1 = flatCoordinates[end - stride];\n    var y1 = flatCoordinates[end - stride + 1];\n    for (; offset < end; offset += stride) {\n        var x2 = flatCoordinates[offset];\n        var y2 = flatCoordinates[offset + 1];\n        if (y1 <= y) {\n            if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {\n                wn++;\n        
     }\n        }\n        else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {\n            wn--;\n        }\n        x1 = x2;\n        y1 = y2;\n    }\n    return wn !== 0;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y) {\n    if (ends.length === 0) {\n        return false;\n    }\n    if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n        return false;\n    }\n    for (var i = 1, ii = ends.length; i < ii; ++i) {\n        if (linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\
 n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(flatCoordinates, offset, endss, stride, x, y) {\n    if (endss.length === 0) {\n        return false;\n    }\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n            return true;\n        }\n        offset = ends[ends.length - 1];\n    }\n    return false;\n}\n//# sourceMappingURL=contains.js.map","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport { linearRingsContainsXY } from './contains.js';\nimport { numberSafeCompareFunction } from '../../array.js';\n/**\n * Calculates a point that is likely to lie in the interior of the linear rings.\n * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInterior
 Point.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, flatCentersOffset, opt_dest) {\n    var i, ii, x, x1, x2, y1, y2;\n    var y = flatCenters[flatCentersOffset + 1];\n    /** @type {Array<number>} */\n    var intersections = [];\n    // Calculate intersections with the horizontal line\n    for (var r = 0, rr = ends.length; r < rr; ++r) {\n        var end = ends[r];\n        x1 = flatCoordinates[end - stride];\n        y1 = flatCoordinates[end - stride + 1];\n 
        for (i = offset; i < end; i += stride) {\n            x2 = flatCoordinates[i];\n            y2 = flatCoordinates[i + 1];\n            if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n                x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;\n                intersections.push(x);\n            }\n            x1 = x2;\n            y1 = y2;\n        }\n    }\n    // Find the longest segment of the horizontal line that has its center point\n    // inside the linear ring.\n    var pointX = NaN;\n    var maxSegmentLength = -Infinity;\n    intersections.sort(numberSafeCompareFunction);\n    x1 = intersections[0];\n    for (i = 1, ii = intersections.length; i < ii; ++i) {\n        x2 = intersections[i];\n        var segmentLength = Math.abs(x2 - x1);\n        if (segmentLength > maxSegmentLength) {\n            x = (x1 + x2) / 2;\n            if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n                pointX = x;\n                maxSegmentLength
  = segmentLength;\n            }\n        }\n        x1 = x2;\n    }\n    if (isNaN(pointX)) {\n        // There is no horizontal line that has its center point inside the linear\n        // ring.  Use the center of the the linear ring's extent.\n        pointX = flatCenters[flatCentersOffset];\n    }\n    if (opt_dest) {\n        opt_dest.push(pointX, y, maxSegmentLength);\n        return opt_dest;\n    }\n    else {\n        return [pointX, y, maxSegmentLength];\n    }\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @return {Array<number>} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(flatCoordinates, offset, endss, stride, flatCenters) {\n    var interiorPoints = [
 ];\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        interiorPoints = getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, 2 * i, interiorPoints);\n        offset = ends[ends.length - 1];\n    }\n    return interiorPoints;\n}\n//# sourceMappingURL=interiorpoint.js.map","/**\n * @module ol/geom/flat/segments\n */\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n *     called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nexport function for
 Each(flatCoordinates, offset, end, stride, callback) {\n    var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n    var point2 = [];\n    var ret;\n    for (; offset + stride < end; offset += stride) {\n        point2[0] = flatCoordinates[offset + stride];\n        point2[1] = flatCoordinates[offset + stride + 1];\n        ret = callback(point1, point2);\n        if (ret) {\n            return ret;\n        }\n        point1[0] = point2[0];\n        point1[1] = point2[1];\n    }\n    return false;\n}\n//# sourceMappingURL=segments.js.map","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport { containsExtent, createEmpty, extendFlatCoordinates, intersects, intersectsSegment, } from '../../extent.js';\nimport { forEach as forEachSegment } from './segments.js';\nimport { linearRingContainsExtent, linearRingContainsXY } from './contains.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} e
 nd End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineString(flatCoordinates, offset, end, stride, extent) {\n    var coordinatesExtent = extendFlatCoordinates(createEmpty(), flatCoordinates, offset, end, stride);\n    if (!intersects(extent, coordinatesExtent)) {\n        return false;\n    }\n    if (containsExtent(extent, coordinatesExtent)) {\n        return true;\n    }\n    if (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) {\n        return true;\n    }\n    if (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3]) {\n        return true;\n    }\n    return forEachSegment(flatCoordinates, offset, end, stride, \n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n     * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n    
  * @return {boolean} `true` if the segment and the extent intersect,\n     *     `false` otherwise.\n     */\n    function (point1, point2) {\n        return intersectsSegment(extent, point1, point2);\n    });\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineStringArray(flatCoordinates, offset, ends, stride, extent) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        if (intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)) {\n            return true;\n        }\n        offset = ends[i];\n    }\n    return false;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {numbe
 r} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(flatCoordinates, offset, end, stride, extent) {\n    if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {\n        return true;\n    }\n    if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[1])) {\n        return true;\n    }\n    if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[3])) {\n        return true;\n    }\n    if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[1])) {\n        return true;\n    }\n    if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[3])) {\n        return true;\n    }\n    return false;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.
 \n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent) {\n    if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {\n        return false;\n    }\n    if (ends.length === 1) {\n        return true;\n    }\n    for (var i = 1, ii = ends.length; i < ii; ++i) {\n        if (linearRingContainsExtent(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n            if (!intersectsLineString(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n                return false;\n            }\n        }\n    }\n    return true;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Exte
 nt} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingMultiArray(flatCoordinates, offset, endss, stride, extent) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        if (intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)) {\n            return true;\n        }\n        offset = ends[ends.length - 1];\n    }\n    return false;\n}\n//# sourceMappingURL=intersectsextent.js.map","/**\n * @module ol/geom/flat/reverse\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n    while (offset < end - stride) {\n        for (var i = 0; i < stride; ++i) {\n            var tmp = flatCoordinates[offset + i];\n            flatCoordinates[offset + i] = flatCoordinates[end 
 - stride + i];\n            flatCoordinates[end - stride + i] = tmp;\n        }\n        offset += stride;\n        end -= stride;\n    }\n}\n//# sourceMappingURL=reverse.js.map","/**\n * @module ol/geom/flat/orient\n */\nimport { coordinates as reverseCoordinates } from './reverse.js';\n/**\n * Is the linear ring oriented clockwise in a coordinate system with a bottom-left\n * coordinate origin? For a coordinate system with a top-left coordinate origin,\n * the ring's orientation is clockwise when this function returns false.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean} Is clockwise.\n */\nexport function linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n    // https://stackoverflow.com/a/1180256/2389327\n    // https://en.wikipedia.org/wiki/Curve_orientation#Orientation_of_a_simple_polygon\n    var firstVertexRepeated = true;\n    fo
 r (var i = 0; i < stride; ++i) {\n        if (flatCoordinates[offset + i] !== flatCoordinates[end - stride + i]) {\n            firstVertexRepeated = false;\n            break;\n        }\n    }\n    if (firstVertexRepeated) {\n        end -= stride;\n    }\n    var iMinVertex = findCornerVertex(flatCoordinates, offset, end, stride);\n    // Orientation matrix:\n    //     [ 1  xa  ya ]\n    // O = | 1  xb  yb |\n    //     [ 1  xc  yc ]\n    var iPreviousVertex = iMinVertex - stride;\n    if (iPreviousVertex < offset) {\n        iPreviousVertex = end - stride;\n    }\n    var iNextVertex = iMinVertex + stride;\n    if (iNextVertex >= end) {\n        iNextVertex = offset;\n    }\n    var aX = flatCoordinates[iPreviousVertex];\n    var aY = flatCoordinates[iPreviousVertex + 1];\n    var bX = flatCoordinates[iMinVertex];\n    var bY = flatCoordinates[iMinVertex + 1];\n    var cX = flatCoordinates[iNextVertex];\n    var cY = flatCoordinates[iNextVertex + 1];\n    var determinant = bX *
  cY + aX * bY + aY * cX - (aY * bX + bY * cX + aX * cY);\n    return determinant < 0;\n}\n// Find vertex along one edge of bounding box.\n// In this case, we find smallest y; in case of tie also smallest x.\nfunction findCornerVertex(flatCoordinates, offset, end, stride) {\n    var iMinVertex = -1;\n    var minY = Infinity;\n    var minXAtMinY = Infinity;\n    for (var i = offset; i < end; i += stride) {\n        var x = flatCoordinates[i];\n        var y = flatCoordinates[i + 1];\n        if (y > minY) {\n            continue;\n        }\n        if (y == minY) {\n            if (x >= minXAtMinY) {\n                continue;\n            }\n        }\n        // Minimum so far.\n        iMinVertex = i;\n        minY = y;\n        minXAtMinY = x;\n    }\n    return iMinVertex;\n}\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, 
 use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Test for right-hand orientation\n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right) {\n    var right = opt_right !== undefined ? opt_right : false;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        var isClockwise = linearRingIsClockwise(flatCoordinates, offset, end, stride);\n        if (i === 0) {\n            if ((right && isClockwise) || (!right && !isClockwise)) {\n                return false;\n            }\n        }\n        else {\n            if ((right && !isClockwise) || (!right && isClockwise)) {\n                retur
 n false;\n            }\n        }\n        offset = end;\n    }\n    return true;\n}\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Test for right-hand orientation\n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingssAreOriented(flatCoordinates, offset, endss, stride, opt_right) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        if (!linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right)) {\n      
       return false;\n        }\n        if (ends.length) {\n            offset = ends[ends.length - 1];\n        }\n    }\n    return true;\n}\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRings(flatCoordinates, offset, ends, stride, opt_right) {\n    var right = opt_right !== undefined ? opt_right : false;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        var isClockwise = linearRingIsClockwise(flatCoordinates, o
 ffset, end, stride);\n        var reverse = i === 0\n            ? (right && isClockwise) || (!right && !isClockwise)\n            : (right && !isClockwise) || (!right && isClockwise);\n        if (reverse) {\n            reverseCoordinates(flatCoordinates, offset, end, stride);\n        }\n        offset = end;\n    }\n    return offset;\n}\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRingsArray(flatCoordinates, offset,
  endss, stride, opt_right) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        offset = orientLinearRings(flatCoordinates, offset, endss[i], stride, opt_right);\n    }\n    return offset;\n}\n//# sourceMappingURL=orient.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/Polygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LinearRing f
 rom './LinearRing.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { arrayMaxSquaredDelta, assignClosestArrayPoint } from './flat/closest.js';\nimport { closestSquaredDistanceXY, getCenter } from '../extent.js';\nimport { deflateCoordinatesArray } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { getInteriorPointOfArray } from './flat/interiorpoint.js';\nimport { inflateCoordinatesArray } from './flat/inflate.js';\nimport { intersectsLinearRingArray } from './flat/intersectsextent.js';\nimport { linearRingsAreOriented, orientLinearRings } from './flat/orient.js';\nimport { linearRings as linearRingsArea } from './flat/area.js';\nimport { linearRingsContainsXY } from './flat/contains.js';\nimport { modulo } from '../math.js';\nimport { quantizeArray } from './flat/simplify.js';\nimport { offset as sphereOffset } from '../sphere.js';\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nvar Polygon = /** @
 class */ (function (_super) {\n    __extends(Polygon, _super);\n    /**\n     * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>|!Array<number>} coordinates\n     *     Array of linear rings that define the polygon. The first linear ring of the\n     *     array defines the outer-boundary or surface of the polygon. Each subsequent\n     *     linear ring defines a hole in the surface of the polygon. A linear ring is\n     *     an array of vertices' coordinates where the first coordinate and the last are\n     *     equivalent. (For internal use, flat coordinates in combination with\n     *     `opt_layout` and `opt_ends` are also accepted.)\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @param {Array<number>=} opt_ends Ends (for internal use with flat coordinates).\n     */\n    function Polygon(coordinates, opt_layout, opt_ends) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {Array<number>}\n    
      * @private\n         */\n        _this.ends_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.flatInteriorPointRevision_ = -1;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        _this.flatInteriorPoint_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.orientedRevision_ = -1;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.orientedFlatCoordinates_ = null;\n        if (opt_layout !== undefined && opt_ends) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n            _this.ends_ = opt_ends;\n        }\
 n        else {\n            _this.setCoordinates(\n            /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed linear ring to this polygon.\n     * @param {LinearRing} linearRing Linear ring.\n     * @api\n     */\n    Polygon.prototype.appendLinearRing = function (linearRing) {\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n        }\n        else {\n            extend(this.flatCoordinates, linearRing.getFlatCoordinates());\n        }\n        this.ends_.push(this.flatCoordinates.length);\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!Polygon} Clone.\n     * @api\n     */\n    Polygon.prototype.clone = function () {\n        return new Polygon(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n    };\n    /**\n     * @
 param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Polygon.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates, 0, this.ends_, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestArrayPoint(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Conta
 ins (x, y).\n     */\n    Polygon.prototype.containsXY = function (x, y) {\n        return linearRingsContainsXY(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);\n    };\n    /**\n     * Return the area of the polygon on projected plane.\n     * @return {number} Area (on projected plane).\n     * @api\n     */\n    Polygon.prototype.getArea = function () {\n        return linearRingsArea(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);\n    };\n    /**\n     * Get the coordinate array for this geometry.  This array has the structure\n     * of a GeoJSON coordinate array for polygons.\n     *\n     * @param {boolean=} opt_right Orient coordinates according to the right-hand\n     *     rule (counter-clockwise for exterior and clockwise for interior rings).\n     *     If `false`, coordinates will be oriented according to the left-hand rule\n     *     (clockwise for exterior and counter-clockwise for interior rings).\n     *     By default, coordin
 ate orientation will depend on how the geometry was\n     *     constructed.\n     * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n     * @api\n     */\n    Polygon.prototype.getCoordinates = function (opt_right) {\n        var flatCoordinates;\n        if (opt_right !== undefined) {\n            flatCoordinates = this.getOrientedFlatCoordinates().slice();\n            orientLinearRings(flatCoordinates, 0, this.ends_, this.stride, opt_right);\n        }\n        else {\n            flatCoordinates = this.flatCoordinates;\n        }\n        return inflateCoordinatesArray(flatCoordinates, 0, this.ends_, this.stride);\n    };\n    /**\n     * @return {Array<number>} Ends.\n     */\n    Polygon.prototype.getEnds = function () {\n        return this.ends_;\n    };\n    /**\n     * @return {Array<number>} Interior point.\n     */\n    Polygon.prototype.getFlatInteriorPoint = function () {\n        if (this.flatInteriorPointRevision_ != this.getRevision()) 
 {\n            var flatCenter = getCenter(this.getExtent());\n            this.flatInteriorPoint_ = getInteriorPointOfArray(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, flatCenter, 0);\n            this.flatInteriorPointRevision_ = this.getRevision();\n        }\n        return this.flatInteriorPoint_;\n    };\n    /**\n     * Return an interior point of the polygon.\n     * @return {Point} Interior point as XYM coordinate, where M is the\n     * length of the horizontal intersection that the point belongs to.\n     * @api\n     */\n    Polygon.prototype.getInteriorPoint = function () {\n        return new Point(this.getFlatInteriorPoint(), GeometryLayout.XYM);\n    };\n    /**\n     * Return the number of rings of the polygon,  this includes the exterior\n     * ring and any interior rings.\n     *\n     * @return {number} Number of rings.\n     * @api\n     */\n    Polygon.prototype.getLinearRingCount = function () {\n        return this.ends_.length;\n    };\n  
   /**\n     * Return the Nth linear ring of the polygon geometry. Return `null` if the\n     * given index is out of range.\n     * The exterior linear ring is available at index `0` and the interior rings\n     * at index `1` and beyond.\n     *\n     * @param {number} index Index.\n     * @return {LinearRing} Linear ring.\n     * @api\n     */\n    Polygon.prototype.getLinearRing = function (index) {\n        if (index < 0 || this.ends_.length <= index) {\n            return null;\n        }\n        return new LinearRing(this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n    };\n    /**\n     * Return the linear rings of the polygon.\n     * @return {Array<LinearRing>} Linear rings.\n     * @api\n     */\n    Polygon.prototype.getLinearRings = function () {\n        var layout = this.layout;\n        var flatCoordinates = this.flatCoordinates;\n        var ends = this.ends_;\n        var linearRings = [];\n        var offset = 0
 ;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var linearRing = new LinearRing(flatCoordinates.slice(offset, end), layout);\n            linearRings.push(linearRing);\n            offset = end;\n        }\n        return linearRings;\n    };\n    /**\n     * @return {Array<number>} Oriented flat coordinates.\n     */\n    Polygon.prototype.getOrientedFlatCoordinates = function () {\n        if (this.orientedRevision_ != this.getRevision()) {\n            var flatCoordinates = this.flatCoordinates;\n            if (linearRingsAreOriented(flatCoordinates, 0, this.ends_, this.stride)) {\n                this.orientedFlatCoordinates_ = flatCoordinates;\n            }\n            else {\n                this.orientedFlatCoordinates_ = flatCoordinates.slice();\n                this.orientedFlatCoordinates_.length = orientLinearRings(this.orientedFlatCoordinates_, 0, this.ends_, this.stride);\n            }\n            this.orient
 edRevision_ = this.getRevision();\n        }\n        return this.orientedFlatCoordinates_;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {Polygon} Simplified Polygon.\n     * @protected\n     */\n    Polygon.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        var simplifiedEnds = [];\n        simplifiedFlatCoordinates.length = quantizeArray(this.flatCoordinates, 0, this.ends_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEnds);\n        return new Polygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    Polygon.prototype.getType = function () {\n        return GeometryType.POLYGON;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n 
     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    Polygon.prototype.intersectsExtent = function (extent) {\n        return intersectsLinearRingArray(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of the polygon.\n     * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    Polygon.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 2);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        var ends = deflateCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n        this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.lengt
 h - 1];\n        this.changed();\n    };\n    return Polygon;\n}(SimpleGeometry));\nexport default Polygon;\n/**\n * Create an approximation of a circle on the surface of a sphere.\n * @param {import(\"../coordinate.js\").Coordinate} center Center (`[lon, lat]` in degrees).\n * @param {number} radius The great-circle distance from the center to\n *     the polygon vertices.\n * @param {number=} opt_n Optional number of vertices for the resulting\n *     polygon. Default is `32`.\n * @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to\n *     the Earth's mean radius using the WGS84 ellipsoid).\n * @return {Polygon} The \"circular\" polygon.\n * @api\n */\nexport function circular(center, radius, opt_n, opt_sphereRadius) {\n    var n = opt_n ? opt_n : 32;\n    /** @type {Array<number>} */\n    var flatCoordinates = [];\n    for (var i = 0; i < n; ++i) {\n        extend(flatCoordinates, sphereOffset(center, radius, (2 * Math.PI * i) / n, opt_sphereRadius));\n 
    }\n    flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n    return new Polygon(flatCoordinates, GeometryLayout.XY, [\n        flatCoordinates.length,\n    ]);\n}\n/**\n * Create a polygon from an extent. The layout used is `XY`.\n * @param {import(\"../extent.js\").Extent} extent The extent.\n * @return {Polygon} The polygon.\n * @api\n */\nexport function fromExtent(extent) {\n    var minX = extent[0];\n    var minY = extent[1];\n    var maxX = extent[2];\n    var maxY = extent[3];\n    var flatCoordinates = [\n        minX,\n        minY,\n        minX,\n        maxY,\n        maxX,\n        maxY,\n        maxX,\n        minY,\n        minX,\n        minY,\n    ];\n    return new Polygon(flatCoordinates, GeometryLayout.XY, [\n        flatCoordinates.length,\n    ]);\n}\n/**\n * Create a regular polygon from a circle.\n * @param {import(\"./Circle.js\").default} circle Circle geometry.\n * @param {number=} opt_sides Number of sides of the polygon. Default is 32.\n 
 * @param {number=} opt_angle Start angle for the first vertex of the polygon in\n *     radians. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nexport function fromCircle(circle, opt_sides, opt_angle) {\n    var sides = opt_sides ? opt_sides : 32;\n    var stride = circle.getStride();\n    var layout = circle.getLayout();\n    var center = circle.getCenter();\n    var arrayLength = stride * (sides + 1);\n    var flatCoordinates = new Array(arrayLength);\n    for (var i = 0; i < arrayLength; i += stride) {\n        flatCoordinates[i] = 0;\n        flatCoordinates[i + 1] = 0;\n        for (var j = 2; j < stride; j++) {\n            flatCoordinates[i + j] = center[j];\n        }\n    }\n    var ends = [flatCoordinates.length];\n    var polygon = new Polygon(flatCoordinates, layout, ends);\n    makeRegular(polygon, center, circle.getRadius(), opt_angle);\n    return polygon;\n}\n/**\n * Modify the coordinates of a polygon to make it a regular polygon.\n * @param {P
 olygon} polygon Polygon geometry.\n * @param {import(\"../coordinate.js\").Coordinate} center Center of the regular polygon.\n * @param {number} radius Radius of the regular polygon.\n * @param {number=} opt_angle Start angle for the first vertex of the polygon in\n *     radians. Default is 0.\n */\nexport function makeRegular(polygon, center, radius, opt_angle) {\n    var flatCoordinates = polygon.getFlatCoordinates();\n    var stride = polygon.getStride();\n    var sides = flatCoordinates.length / stride - 1;\n    var startAngle = opt_angle ? opt_angle : 0;\n    for (var i = 0; i <= sides; ++i) {\n        var offset = i * stride;\n        var angle = startAngle + (modulo(i, sides) * 2 * Math.PI) / sides;\n        flatCoordinates[offset] = center[0] + radius * Math.cos(angle);\n        flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle);\n    }\n    polygon.changed();\n}\n//# sourceMappingURL=Polygon.js.map","var __extends = (this && this.__extends) || (function () 
 {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Geolocation\n */\nimport BaseEvent from './events/Event.js';\nimport BaseObject, { getChangeEventType } from './Object.js';\nimport EventType from './events/EventType.js';\nimport { circular as circularPolygon } from './geom/Polygon.js';\nimport { get as getProjection, getTransformFromProjections, identityTransform, } from './proj.js';\nimport { toRadians } from './math.js';\n/**\n * @enum {string}\n */\nvar Property = {\n    ACCURA
 CY: 'accuracy',\n    ACCURACY_GEOMETRY: 'accuracyGeometry',\n    ALTITUDE: 'altitude',\n    ALTITUDE_ACCURACY: 'altitudeAccuracy',\n    HEADING: 'heading',\n    POSITION: 'position',\n    PROJECTION: 'projection',\n    SPEED: 'speed',\n    TRACKING: 'tracking',\n    TRACKING_OPTIONS: 'trackingOptions',\n};\n/**\n * @classdesc\n * Events emitted on Geolocation error.\n */\nvar GeolocationError = /** @class */ (function (_super) {\n    __extends(GeolocationError, _super);\n    /**\n     * @param {PositionError} error error object.\n     */\n    function GeolocationError(error) {\n        var _this = _super.call(this, EventType.ERROR) || this;\n        /**\n         * @type {number}\n         */\n        _this.code = error.code;\n        /**\n         * @type {string}\n         */\n        _this.message = error.message;\n        return _this;\n    }\n    return GeolocationError;\n}(BaseEvent));\n/**\n * @typedef {Object} Options\n * @property {boolean} [tracking=false] Start Tracking r
 ight after\n * instantiation.\n * @property {PositionOptions} [trackingOptions] Tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position_options_interface.\n * @property {import(\"./proj.js\").ProjectionLike} [projection] The projection the position\n * is reported in.\n */\n/**\n * @classdesc\n * Helper class for providing HTML5 Geolocation capabilities.\n * The [Geolocation API](http://www.w3.org/TR/geolocation-API/)\n * is used to locate a user's position.\n *\n * To get notified of position changes, register a listener for the generic\n * `change` event on your instance of {@link module:ol/Geolocation~Geolocation}.\n *\n * Example:\n *\n *     var geolocation = new Geolocation({\n *       // take the projection to use from the map's view\n *       projection: view.getProjection()\n *     });\n *     // listen to changes in position\n *     geolocation.on('change', function(evt) {\n *       window.console.log(geolocation.getPosition());\n *     });\n *\n * @fires 
 module:ol/events/Event~BaseEvent#event:error\n * @api\n */\nvar Geolocation = /** @class */ (function (_super) {\n    __extends(Geolocation, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Geolocation(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options || {};\n        /**\n         * The unprojected (EPSG:4326) device position.\n         * @private\n         * @type {?import(\"./coordinate.js\").Coordinate}\n         */\n        _this.position_ = null;\n        /**\n         * @private\n         * @type {import(\"./proj.js\").TransformFunction}\n         */\n        _this.transform_ = identityTransform;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.watchId_ = undefined;\n        _this.addEventListener(getChangeEventType(Property.PROJECTION), _this.handleProjectionChanged_);\n        _this.addEventListener(getChangeEventType(Property.TRACKING), _t
 his.handleTrackingChanged_);\n        if (options.projection !== undefined) {\n            _this.setProjection(options.projection);\n        }\n        if (options.trackingOptions !== undefined) {\n            _this.setTrackingOptions(options.trackingOptions);\n        }\n        _this.setTracking(options.tracking !== undefined ? options.tracking : false);\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    Geolocation.prototype.disposeInternal = function () {\n        this.setTracking(false);\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * @private\n     */\n    Geolocation.prototype.handleProjectionChanged_ = function () {\n        var projection = this.getProjection();\n        if (projection) {\n            this.transform_ = getTransformFromProjections(getProjection('EPSG:4326'), projection);\n            if (this.position_) {\n                this.set(Property.POSITION, this.transform_(this.position_));\n            }\n        }
 \n    };\n    /**\n     * @private\n     */\n    Geolocation.prototype.handleTrackingChanged_ = function () {\n        if ('geolocation' in navigator) {\n            var tracking = this.getTracking();\n            if (tracking && this.watchId_ === undefined) {\n                this.watchId_ = navigator.geolocation.watchPosition(this.positionChange_.bind(this), this.positionError_.bind(this), this.getTrackingOptions());\n            }\n            else if (!tracking && this.watchId_ !== undefined) {\n                navigator.geolocation.clearWatch(this.watchId_);\n                this.watchId_ = undefined;\n            }\n        }\n    };\n    /**\n     * @private\n     * @param {Position} position position event.\n     */\n    Geolocation.prototype.positionChange_ = function (position) {\n        var coords = position.coords;\n        this.set(Property.ACCURACY, coords.accuracy);\n        this.set(Property.ALTITUDE, coords.altitude === null ? undefined : coords.altitude);\n       
  this.set(Property.ALTITUDE_ACCURACY, coords.altitudeAccuracy === null ? undefined : coords.altitudeAccuracy);\n        this.set(Property.HEADING, coords.heading === null ? undefined : toRadians(coords.heading));\n        if (!this.position_) {\n            this.position_ = [coords.longitude, coords.latitude];\n        }\n        else {\n            this.position_[0] = coords.longitude;\n            this.position_[1] = coords.latitude;\n        }\n        var projectedPosition = this.transform_(this.position_);\n        this.set(Property.POSITION, projectedPosition);\n        this.set(Property.SPEED, coords.speed === null ? undefined : coords.speed);\n        var geometry = circularPolygon(this.position_, coords.accuracy);\n        geometry.applyTransform(this.transform_);\n        this.set(Property.ACCURACY_GEOMETRY, geometry);\n        this.changed();\n    };\n    /**\n     * @private\n     * @param {PositionError} error error object.\n     */\n    Geolocation.prototype.positionEr
 ror_ = function (error) {\n        this.dispatchEvent(new GeolocationError(error));\n    };\n    /**\n     * Get the accuracy of the position in meters.\n     * @return {number|undefined} The accuracy of the position measurement in\n     *     meters.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getAccuracy = function () {\n        return /** @type {number|undefined} */ (this.get(Property.ACCURACY));\n    };\n    /**\n     * Get a geometry of the position accuracy.\n     * @return {?import(\"./geom/Polygon.js\").default} A geometry of the position accuracy.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getAccuracyGeometry = function () {\n        return /** @type {?import(\"./geom/Polygon.js\").default} */ (this.get(Property.ACCURACY_GEOMETRY) || null);\n    };\n    /**\n     * Get the altitude associated with the position.\n     * @return {number|undefined} The altitude of the position in meters above mean\n     *     sea level.\n     
 * @observable\n     * @api\n     */\n    Geolocation.prototype.getAltitude = function () {\n        return /** @type {number|undefined} */ (this.get(Property.ALTITUDE));\n    };\n    /**\n     * Get the altitude accuracy of the position.\n     * @return {number|undefined} The accuracy of the altitude measurement in\n     *     meters.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getAltitudeAccuracy = function () {\n        return /** @type {number|undefined} */ (this.get(Property.ALTITUDE_ACCURACY));\n    };\n    /**\n     * Get the heading as radians clockwise from North.\n     * Note: depending on the browser, the heading is only defined if the `enableHighAccuracy`\n     * is set to `true` in the tracking options.\n     * @return {number|undefined} The heading of the device in radians from north.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getHeading = function () {\n        return /** @type {number|undefined} */ (this.get(Property.
 HEADING));\n    };\n    /**\n     * Get the position of the device.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} The current position of the device reported\n     *     in the current projection.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getPosition = function () {\n        return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(Property.POSITION));\n    };\n    /**\n     * Get the projection associated with the position.\n     * @return {import(\"./proj/Projection.js\").default|undefined} The projection the position is\n     *     reported in.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getProjection = function () {\n        return /** @type {import(\"./proj/Projection.js\").default|undefined} */ (this.get(Property.PROJECTION));\n    };\n    /**\n     * Get the speed in meters per second.\n     * @return {number|undefined} The instantaneous speed of the device in meters\n     *     pe
 r second.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getSpeed = function () {\n        return /** @type {number|undefined} */ (this.get(Property.SPEED));\n    };\n    /**\n     * Determine if the device location is being tracked.\n     * @return {boolean} The device location is being tracked.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getTracking = function () {\n        return /** @type {boolean} */ (this.get(Property.TRACKING));\n    };\n    /**\n     * Get the tracking options.\n     * See http://www.w3.org/TR/geolocation-API/#position-options.\n     * @return {PositionOptions|undefined} PositionOptions as defined by\n     *     the [HTML5 Geolocation spec\n     *     ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getTrackingOptions = function () {\n        return /** @type {PositionOptions|undefined} */ (this.get(Property.TRACKING_OPTIONS
 ));\n    };\n    /**\n     * Set the projection to use for transforming the coordinates.\n     * @param {import(\"./proj.js\").ProjectionLike} projection The projection the position is\n     *     reported in.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.setProjection = function (projection) {\n        this.set(Property.PROJECTION, getProjection(projection));\n    };\n    /**\n     * Enable or disable tracking.\n     * @param {boolean} tracking Enable tracking.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.setTracking = function (tracking) {\n        this.set(Property.TRACKING, tracking);\n    };\n    /**\n     * Set the tracking options.\n     * See http://www.w3.org/TR/geolocation-API/#position-options.\n     * @param {PositionOptions} options PositionOptions as defined by the\n     *     [HTML5 Geolocation spec\n     *     ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n     * @observable\n     * @api\n     */\n
     Geolocation.prototype.setTrackingOptions = function (options) {\n        this.set(Property.TRACKING_OPTIONS, options);\n    };\n    return Geolocation;\n}(BaseObject));\nexport default Geolocation;\n//# sourceMappingURL=Geolocation.js.map","/**\n * @module ol/Kinetic\n */\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nvar Kinetic = /** @class */ (function () {\n    /**\n     * @param {number} decay Rate of decay (must be negative).\n     * @param {number} minVelocity Minimum velocity (pixels/millisecond).\n     * @param {number} delay Delay to consider to calculate the kinetic\n     *     initial values (milliseconds).\n     */\n    function Kinetic(decay, minVelocity, delay) {\n        /**\n         * @private\n         * @type {number}\n         */\n        this.decay_ = decay;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.minVelocity_ = minVelocity;\n        /**\n         * @privat
 e\n         * @type {number}\n         */\n        this.delay_ = delay;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.points_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        this.angle_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.initialVelocity_ = 0;\n    }\n    /**\n     * FIXME empty description for jsdoc\n     */\n    Kinetic.prototype.begin = function () {\n        this.points_.length = 0;\n        this.angle_ = 0;\n        this.initialVelocity_ = 0;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     */\n    Kinetic.prototype.update = function (x, y) {\n        this.points_.push(x, y, Date.now());\n    };\n    /**\n     * @return {boolean} Whether we should do kinetic animation.\n     */\n    Kinetic.prototype.end = function () {\n        if (this.points_.length < 6) {\n            // at least 2 points are requi
 red (i.e. there must be at least 6 elements\n            // in the array)\n            return false;\n        }\n        var delay = Date.now() - this.delay_;\n        var lastIndex = this.points_.length - 3;\n        if (this.points_[lastIndex + 2] < delay) {\n            // the last tracked point is too old, which means that the user stopped\n            // panning before releasing the map\n            return false;\n        }\n        // get the first point which still falls into the delay time\n        var firstIndex = lastIndex - 3;\n        while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n            firstIndex -= 3;\n        }\n        var duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];\n        // we don't want a duration of 0 (divide by zero)\n        // we also make sure the user panned for a duration of at least one frame\n        // (1/60s) to compute sane displacement values\n        if (duration < 1000 / 60) {\n            return
  false;\n        }\n        var dx = this.points_[lastIndex] - this.points_[firstIndex];\n        var dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];\n        this.angle_ = Math.atan2(dy, dx);\n        this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;\n        return this.initialVelocity_ > this.minVelocity_;\n    };\n    /**\n     * @return {number} Total distance travelled (pixels).\n     */\n    Kinetic.prototype.getDistance = function () {\n        return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n    };\n    /**\n     * @return {number} Angle of the kinetic panning animation (radians).\n     */\n    Kinetic.prototype.getAngle = function () {\n        return this.angle_;\n    };\n    return Kinetic;\n}());\nexport default Kinetic;\n//# sourceMappingURL=Kinetic.js.map","/**\n * @module ol/color\n */\nimport { assert } from './asserts.js';\nimport { clamp } from './math.js';\n/**\n * A color represented as a short array [red, green,
  blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array<number>} Color\n * @api\n */\n/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\nvar HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;\n/**\n * Regular expression for matching potential named color style strings.\n * @const\n * @type {RegExp}\n * @private\n */\nvar NAMED_COLOR_RE_ = /^([a-z]*)$|^hsla?\\(.*\\)$/i;\n/**\n * Return the color as an rgba string.\n * @param {Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\nexport function asString(color) {\n    if (typeof color === 'string') {\n        return color;\n    }\n    else {\n        return toString(color);\n    }\n}\n/**\n * Return named color as an rgba string.\n * @param {string} color Named color.\
 n * @return {string} Rgb string.\n */\nfunction fromNamed(color) {\n    var el = document.createElement('div');\n    el.style.color = color;\n    if (el.style.color !== '') {\n        document.body.appendChild(el);\n        var rgb = getComputedStyle(el).color;\n        document.body.removeChild(el);\n        return rgb;\n    }\n    else {\n        return '';\n    }\n}\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport var fromString = (function () {\n    // We maintain a small cache of parsed strings.  To provide cheap LRU-like\n    // semantics, whenever the cache grows too large we simply delete an\n    // arbitrary 25% of the entries.\n    /**\n     * @const\n     * @type {number}\n     */\n    var MAX_CACHE_SIZE = 1024;\n    /**\n     * @type {Object<string, Color>}\n     */\n    var cache = {};\n    /**\n     * @type {number}\n     */\n    var cacheSize = 0;\n    return (\n    /**\n     * @param {string} s String.\n     * @return {Color} Color.\n     */
 \n    function (s) {\n        var color;\n        if (cache.hasOwnProperty(s)) {\n            color = cache[s];\n        }\n        else {\n            if (cacheSize >= MAX_CACHE_SIZE) {\n                var i = 0;\n                for (var key in cache) {\n                    if ((i++ & 3) === 0) {\n                        delete cache[key];\n                        --cacheSize;\n                    }\n                }\n            }\n            color = fromStringInternal_(s);\n            cache[s] = color;\n            ++cacheSize;\n        }\n        return color;\n    });\n})();\n/**\n * Return the color as an array. This function maintains a cache of calculated\n * arrays which means the result should not be modified.\n * @param {Color|string} color Color.\n * @return {Color} Color.\n * @api\n */\nexport function asArray(color) {\n    if (Array.isArray(color)) {\n        return color;\n    }\n    else {\n        return fromString(color);\n    }\n}\n/**\n * @param {string} s S
 tring.\n * @private\n * @return {Color} Color.\n */\nfunction fromStringInternal_(s) {\n    var r, g, b, a, color;\n    if (NAMED_COLOR_RE_.exec(s)) {\n        s = fromNamed(s);\n    }\n    if (HEX_COLOR_RE_.exec(s)) {\n        // hex\n        var n = s.length - 1; // number of hex digits\n        var d = // number of digits per channel\n         void 0; // number of digits per channel\n        if (n <= 4) {\n            d = 1;\n        }\n        else {\n            d = 2;\n        }\n        var hasAlpha = n === 4 || n === 8;\n        r = parseInt(s.substr(1 + 0 * d, d), 16);\n        g = parseInt(s.substr(1 + 1 * d, d), 16);\n        b = parseInt(s.substr(1 + 2 * d, d), 16);\n        if (hasAlpha) {\n            a = parseInt(s.substr(1 + 3 * d, d), 16);\n        }\n        else {\n            a = 255;\n        }\n        if (d == 1) {\n            r = (r << 4) + r;\n            g = (g << 4) + g;\n            b = (b << 4) + b;\n            if (hasAlpha) {\n                a = (a <
 < 4) + a;\n            }\n        }\n        color = [r, g, b, a / 255];\n    }\n    else if (s.indexOf('rgba(') == 0) {\n        // rgba()\n        color = s.slice(5, -1).split(',').map(Number);\n        normalize(color);\n    }\n    else if (s.indexOf('rgb(') == 0) {\n        // rgb()\n        color = s.slice(4, -1).split(',').map(Number);\n        color.push(1);\n        normalize(color);\n    }\n    else {\n        assert(false, 14); // Invalid color\n    }\n    return color;\n}\n/**\n * TODO this function is only used in the test, we probably shouldn't export it\n * @param {Color} color Color.\n * @return {Color} Clamped color.\n */\nexport function normalize(color) {\n    color[0] = clamp((color[0] + 0.5) | 0, 0, 255);\n    color[1] = clamp((color[1] + 0.5) | 0, 0, 255);\n    color[2] = clamp((color[2] + 0.5) | 0, 0, 255);\n    color[3] = clamp(color[3], 0, 1);\n    return color;\n}\n/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nexport function toStrin
 g(color) {\n    var r = color[0];\n    if (r != (r | 0)) {\n        r = (r + 0.5) | 0;\n    }\n    var g = color[1];\n    if (g != (g | 0)) {\n        g = (g + 0.5) | 0;\n    }\n    var b = color[2];\n    if (b != (b | 0)) {\n        b = (b + 0.5) | 0;\n    }\n    var a = color[3] === undefined ? 1 : color[3];\n    return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n/**\n * @param {string} s String.\n * @return {boolean} Whether the string is actually a valid color\n */\nexport function isStringColor(s) {\n    if (NAMED_COLOR_RE_.test(s)) {\n        s = fromNamed(s);\n    }\n    return (HEX_COLOR_RE_.test(s) || s.indexOf('rgba(') === 0 || s.indexOf('rgb(') === 0);\n}\n//# sourceMappingURL=color.js.map","/**\n * @module ol/style/IconImageCache\n */\nimport { asString } from '../color.js';\n/**\n * @classdesc\n * Singleton class. Available through {@link module:ol/style/IconImageCache~shared}.\n */\nvar IconImageCache = /** @class */ (function () {\n    function IconImageCache
 () {\n        /**\n         * @type {!Object<string, import(\"./IconImage.js\").default>}\n         * @private\n         */\n        this.cache_ = {};\n        /**\n         * @type {number}\n         * @private\n         */\n        this.cacheSize_ = 0;\n        /**\n         * @type {number}\n         * @private\n         */\n        this.maxCacheSize_ = 32;\n    }\n    /**\n     * FIXME empty description for jsdoc\n     */\n    IconImageCache.prototype.clear = function () {\n        this.cache_ = {};\n        this.cacheSize_ = 0;\n    };\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    IconImageCache.prototype.canExpireCache = function () {\n        return this.cacheSize_ > this.maxCacheSize_;\n    };\n    /**\n     * FIXME empty description for jsdoc\n     */\n    IconImageCache.prototype.expire = function () {\n        if (this.canExpireCache()) {\n            var i = 0;\n            for (var key in this.cache_) {\n                var iconImage = this.cache_[k
 ey];\n                if ((i++ & 3) === 0 && !iconImage.hasListener()) {\n                    delete this.cache_[key];\n                    --this.cacheSize_;\n                }\n            }\n        }\n    };\n    /**\n     * @param {string} src Src.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../color.js\").Color} color Color.\n     * @return {import(\"./IconImage.js\").default} Icon image.\n     */\n    IconImageCache.prototype.get = function (src, crossOrigin, color) {\n        var key = getKey(src, crossOrigin, color);\n        return key in this.cache_ ? this.cache_[key] : null;\n    };\n    /**\n     * @param {string} src Src.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../color.js\").Color} color Color.\n     * @param {import(\"./IconImage.js\").default} iconImage Icon image.\n     */\n    IconImageCache.prototype.set = function (src, crossOrigin, color, iconImage) {\n        var key = getKey(src, crossOrigin,
  color);\n        this.cache_[key] = iconImage;\n        ++this.cacheSize_;\n    };\n    /**\n     * Set the cache size of the icon cache. Default is `32`. Change this value when\n     * your map uses more than 32 different icon images and you are not caching icon\n     * styles on the application level.\n     * @param {number} maxCacheSize Cache max size.\n     * @api\n     */\n    IconImageCache.prototype.setSize = function (maxCacheSize) {\n        this.maxCacheSize_ = maxCacheSize;\n        this.expire();\n    };\n    return IconImageCache;\n}());\n/**\n * @param {string} src Src.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {string} Cache key.\n */\nfunction getKey(src, crossOrigin, color) {\n    var colorString = color ? asString(color) : 'null';\n    return crossOrigin + ':' + src + ':' + colorString;\n}\nexport default IconImageCache;\n/**\n * The {@link module:ol/style/IconImageCache~IconImageCache} for\n
  * {@link module:ol/style/Icon~Icon} images.\n * @api\n */\nexport var shared = new IconImageCache();\n//# sourceMappingURL=IconImageCache.js.map","/**\n * @module ol/layer/Property\n */\n/**\n * @enum {string}\n */\nexport default {\n    OPACITY: 'opacity',\n    VISIBLE: 'visible',\n    EXTENT: 'extent',\n    Z_INDEX: 'zIndex',\n    MAX_RESOLUTION: 'maxResolution',\n    MIN_RESOLUTION: 'minResolution',\n    MAX_ZOOM: 'maxZoom',\n    MIN_ZOOM: 'minZoom',\n    SOURCE: 'source',\n};\n//# sourceMappingURL=Property.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.co
 nstructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Base\n */\nimport BaseObject from '../Object.js';\nimport LayerProperty from './Property.js';\nimport { abstract } from '../util.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { clamp } from '../math.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for
  layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n */\nvar BaseLayer = /** @class */ (function (_s
 uper) {\n    __extends(BaseLayer, _super);\n    /**\n     * @param {Options} options Layer options.\n     */\n    function BaseLayer(options) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {Object<string, *>}\n         */\n        var properties = assign({}, options);\n        properties[LayerProperty.OPACITY] =\n            options.opacity !== undefined ? options.opacity : 1;\n        assert(typeof properties[LayerProperty.OPACITY] === 'number', 64); // Layer opacity must be a number\n        properties[LayerProperty.VISIBLE] =\n            options.visible !== undefined ? options.visible : true;\n        properties[LayerProperty.Z_INDEX] = options.zIndex;\n        properties[LayerProperty.MAX_RESOLUTION] =\n            options.maxResolution !== undefined ? options.maxResolution : Infinity;\n        properties[LayerProperty.MIN_RESOLUTION] =\n            options.minResolution !== undefined ? options.minResolution : 0;\n        properties[LayerProper
 ty.MIN_ZOOM] =\n            options.minZoom !== undefined ? options.minZoom : -Infinity;\n        properties[LayerProperty.MAX_ZOOM] =\n            options.maxZoom !== undefined ? options.maxZoom : Infinity;\n        /**\n         * @type {string}\n         * @private\n         */\n        _this.className_ =\n            properties.className !== undefined ? options.className : 'ol-layer';\n        delete properties.className;\n        _this.setProperties(properties);\n        /**\n         * @type {import(\"./Layer.js\").State}\n         * @private\n         */\n        _this.state_ = null;\n        return _this;\n    }\n    /**\n     * @return {string} CSS class name.\n     */\n    BaseLayer.prototype.getClassName = function () {\n        return this.className_;\n    };\n    /**\n     * This method is not meant to be called by layers or layer renderers because the state\n     * is incorrect if the layer is included in a layer group.\n     *\n     * @param {boolean=} opt_managed Lay
 er is managed.\n     * @return {import(\"./Layer.js\").State} Layer state.\n     */\n    BaseLayer.prototype.getLayerState = function (opt_managed) {\n        /** @type {import(\"./Layer.js\").State} */\n        var state = this.state_ ||\n            /** @type {?} */ ({\n                layer: this,\n                managed: opt_managed === undefined ? true : opt_managed,\n            });\n        var zIndex = this.getZIndex();\n        state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);\n        state.sourceState = this.getSourceState();\n        state.visible = this.getVisible();\n        state.extent = this.getExtent();\n        state.zIndex =\n            zIndex !== undefined ? zIndex : state.managed === false ? Infinity : 0;\n        state.maxResolution = this.getMaxResolution();\n        state.minResolution = Math.max(this.getMinResolution(), 0);\n        state.minZoom = this.getMinZoom();\n        state.maxZoom = this.getMaxZoom();\n        this.state_ = 
 state;\n        return state;\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be\n     *     modified in place).\n     * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n     */\n    BaseLayer.prototype.getLayersArray = function (opt_array) {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"./Layer.js\").State>=} opt_states Optional list of layer\n     *     states (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n     */\n    BaseLayer.prototype.getLayerStatesArray = function (opt_states) {\n        return abstract();\n    };\n    /**\n     * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it\n     * will be visible regardless of extent.\n     * @return {import(\"../extent.js\").Extent|undefined} The layer extent.\n     * @observable\n     * @api\n     */\n    Bas
 eLayer.prototype.getExtent = function () {\n        return /** @type {import(\"../extent.js\").Extent|undefined} */ (this.get(LayerProperty.EXTENT));\n    };\n    /**\n     * Return the maximum resolution of the layer.\n     * @return {number} The maximum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMaxResolution = function () {\n        return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n    };\n    /**\n     * Return the minimum resolution of the layer.\n     * @return {number} The minimum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMinResolution = function () {\n        return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\n    };\n    /**\n     * Return the minimum zoom level of the layer.\n     * @return {number} The minimum zoom level of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMinZoom = function () {\
 n        return /** @type {number} */ (this.get(LayerProperty.MIN_ZOOM));\n    };\n    /**\n     * Return the maximum zoom level of the layer.\n     * @return {number} The maximum zoom level of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMaxZoom = function () {\n        return /** @type {number} */ (this.get(LayerProperty.MAX_ZOOM));\n    };\n    /**\n     * Return the opacity of the layer (between 0 and 1).\n     * @return {number} The opacity of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getOpacity = function () {\n        return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n    };\n    /**\n     * @abstract\n     * @return {import(\"../source/State.js\").default} Source state.\n     */\n    BaseLayer.prototype.getSourceState = function () {\n        return abstract();\n    };\n    /**\n     * Return the visibility of the layer (`true` or `false`).\n     * @return {boolean} The visibility of the la
 yer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getVisible = function () {\n        return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n    };\n    /**\n     * Return the Z-index of the layer, which is used to order layers before\n     * rendering. The default Z-index is 0.\n     * @return {number} The Z-index of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getZIndex = function () {\n        return /** @type {number} */ (this.get(LayerProperty.Z_INDEX));\n    };\n    /**\n     * Set the extent at which the layer is visible.  If `undefined`, the layer\n     * will be visible at all extents.\n     * @param {import(\"../extent.js\").Extent|undefined} extent The extent of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setExtent = function (extent) {\n        this.set(LayerProperty.EXTENT, extent);\n    };\n    /**\n     * Set the maximum resolution at which the layer is visible.\n     *
  @param {number} maxResolution The maximum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMaxResolution = function (maxResolution) {\n        this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n    };\n    /**\n     * Set the minimum resolution at which the layer is visible.\n     * @param {number} minResolution The minimum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMinResolution = function (minResolution) {\n        this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n    };\n    /**\n     * Set the maximum zoom (exclusive) at which the layer is visible.\n     * Note that the zoom levels for layer visibility are based on the\n     * view zoom level, which may be different from a tile source zoom level.\n     * @param {number} maxZoom The maximum zoom of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMaxZoom = function (maxZoom) {\n        this
 .set(LayerProperty.MAX_ZOOM, maxZoom);\n    };\n    /**\n     * Set the minimum zoom (inclusive) at which the layer is visible.\n     * Note that the zoom levels for layer visibility are based on the\n     * view zoom level, which may be different from a tile source zoom level.\n     * @param {number} minZoom The minimum zoom of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMinZoom = function (minZoom) {\n        this.set(LayerProperty.MIN_ZOOM, minZoom);\n    };\n    /**\n     * Set the opacity of the layer, allowed values range from 0 to 1.\n     * @param {number} opacity The opacity of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setOpacity = function (opacity) {\n        assert(typeof opacity === 'number', 64); // Layer opacity must be a number\n        this.set(LayerProperty.OPACITY, opacity);\n    };\n    /**\n     * Set the visibility of the layer (`true` or `false`).\n     * @param {boolean} visible The visi
 bility of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setVisible = function (visible) {\n        this.set(LayerProperty.VISIBLE, visible);\n    };\n    /**\n     * Set Z-index of the layer, which is used to order layers before rendering.\n     * The default Z-index is 0.\n     * @param {number} zindex The z-index of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setZIndex = function (zindex) {\n        this.set(LayerProperty.Z_INDEX, zindex);\n    };\n    /**\n     * Clean up.\n     */\n    BaseLayer.prototype.disposeInternal = function () {\n        if (this.state_) {\n            this.state_.layer = null;\n            this.state_ = null;\n        }\n        _super.prototype.disposeInternal.call(this);\n    };\n    return BaseLayer;\n}(BaseObject));\nexport default BaseLayer;\n//# sourceMappingURL=Base.js.map","/**\n * @module ol/render/EventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Tri
 ggered before a layer is rendered.\n     * @event module:ol/render/Event~RenderEvent#prerender\n     * @api\n     */\n    PRERENDER: 'prerender',\n    /**\n     * Triggered after a layer is rendered.\n     * @event module:ol/render/Event~RenderEvent#postrender\n     * @api\n     */\n    POSTRENDER: 'postrender',\n    /**\n     * Triggered before layers are rendered.\n     * The event object will not have a `context` set.\n     * @event module:ol/render/Event~RenderEvent#precompose\n     * @api\n     */\n    PRECOMPOSE: 'precompose',\n    /**\n     * Triggered after all layers are rendered.\n     * The event object will not have a `context` set.\n     * @event module:ol/render/Event~RenderEvent#postcompose\n     * @api\n     */\n    POSTCOMPOSE: 'postcompose',\n    /**\n     * Triggered when rendering is complete, i.e. all sources and tiles have\n     * finished loading for the current viewport, and all tiles are faded in.\n     * The event object will not have a `context` set.\n    
  * @event module:ol/render/Event~RenderEvent#rendercomplete\n     * @api\n     */\n    RENDERCOMPLETE: 'rendercomplete',\n};\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/source/State\n */\n/**\n * @enum {string}\n * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.\n */\nexport default {\n    UNDEFINED: 'undefined',\n    LOADING: 'loading',\n    READY: 'ready',\n    ERROR: 'error',\n};\n//# sourceMappingURL=State.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.cre
 ate(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Layer\n */\nimport BaseLayer from './Base.js';\nimport EventType from '../events/EventType.js';\nimport LayerProperty from './Property.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { getChangeEventType } from '../Object.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {function(import(\"../PluggableMap.js\").FrameState):HTMLElement} RenderFunction\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of th
 is extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../source/Source.js\").default} [source] Source for this layer.  If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer#set
 Source layer.setSource(source)} after\n * construction.\n * @property {import(\"../PluggableMap.js\").default} [map] Map.\n * @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an\n * HTML element. Will overwrite the default rendering for the layer.\n */\n/**\n * @typedef {Object} State\n * @property {import(\"./Layer.js\").default} layer\n * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.\n * @property {import(\"../source/State.js\").default} sourceState\n * @property {boolean} visible\n * @property {boolean} managed\n * @property {import(\"../extent.js\").Extent} [extent]\n * @property {number} zIndex\n * @property {number} maxResolution\n * @property {number} minResolution\n * @property {number} minZoom\n * @property {number} maxZoom\n */\n/**\n * @classdesc\n * Base class from which all layer types are derived. This should only be instantiated\n * in the case wher
 e a custom layer is be added to the map with a custom `render` function.\n * Such a function can be specified in the `options` object, and is expected to return an HTML element.\n *\n * A visual representation of raster or vector map data.\n * Layers group together those properties that pertain to how the data is to be\n * displayed, irrespective of the source of that data.\n *\n * Layers are usually added to a map with {@link module:ol/Map#addLayer}. Components\n * like {@link module:ol/interaction/Select~Select} use unmanaged layers\n * internally. These unmanaged layers are associated with the map using\n * {@link module:ol/layer/Layer~Layer#setMap} instead.\n *\n * A generic `change` event is fired when the state of the source changes.\n *\n * Please note that for performance reasons several layers might get rendered to\n * the same HTML element, which will cause {@link module:ol/Map~Map#forEachLayerAtPixel} to\n * give false positives. To avoid this, apply different `className`
  properties to the\n * layers at creation time.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n *\n * @template {import(\"../source/Source.js\").default} SourceType\n * @api\n */\nvar Layer = /** @class */ (function (_super) {\n    __extends(Layer, _super);\n    /**\n     * @param {Options} options Layer options.\n     */\n    function Layer(options) {\n        var _this = this;\n        var baseOptions = assign({}, options);\n        delete baseOptions.source;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\n        _this.mapPrecomposeKey_ = null;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\n        _this.mapRenderKey_ = null;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\
 n        _this.sourceChangeKey_ = null;\n        /**\n         * @private\n         * @type {import(\"../renderer/Layer.js\").default}\n         */\n        _this.renderer_ = null;\n        // Overwrite default render method with a custom one\n        if (options.render) {\n            _this.render = options.render;\n        }\n        if (options.map) {\n            _this.setMap(options.map);\n        }\n        _this.addEventListener(getChangeEventType(LayerProperty.SOURCE), _this.handleSourcePropertyChange_);\n        var source = options.source\n            ? /** @type {SourceType} */ (options.source)\n            : null;\n        _this.setSource(source);\n        return _this;\n    }\n    /**\n     * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n     */\n    Layer.prototype.getLayersArray = function (opt_array) {\n        var array = opt_array ? opt_a
 rray : [];\n        array.push(this);\n        return array;\n    };\n    /**\n     * @param {Array<import(\"./Layer.js\").State>=} opt_states Optional list of layer states (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n     */\n    Layer.prototype.getLayerStatesArray = function (opt_states) {\n        var states = opt_states ? opt_states : [];\n        states.push(this.getLayerState());\n        return states;\n    };\n    /**\n     * Get the layer source.\n     * @return {SourceType} The layer source (or `null` if not yet set).\n     * @observable\n     * @api\n     */\n    Layer.prototype.getSource = function () {\n        return /** @type {SourceType} */ (this.get(LayerProperty.SOURCE)) || null;\n    };\n    /**\n     * @return {import(\"../source/State.js\").default} Source state.\n     */\n    Layer.prototype.getSourceState = function () {\n        var source = this.getSource();\n        return !source ? SourceState.UNDE
 FINED : source.getState();\n    };\n    /**\n     * @private\n     */\n    Layer.prototype.handleSourceChange_ = function () {\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    Layer.prototype.handleSourcePropertyChange_ = function () {\n        if (this.sourceChangeKey_) {\n            unlistenByKey(this.sourceChangeKey_);\n            this.sourceChangeKey_ = null;\n        }\n        var source = this.getSource();\n        if (source) {\n            this.sourceChangeKey_ = listen(source, EventType.CHANGE, this.handleSourceChange_, this);\n        }\n        this.changed();\n    };\n    /**\n     * @param {import(\"../pixel\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with\n     * an array of features.\n     */\n    Layer.prototype.getFeatures = function (pixel) {\n        return this.renderer_.getFeatures(pixel);\n    };\n    /**\n     * In charge to manage the rendering of the layer. One layer
  type is\n     * bounded with one layer renderer.\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target which the renderer may (but need not) use\n     * for rendering its content.\n     * @return {HTMLElement} The rendered element.\n     */\n    Layer.prototype.render = function (frameState, target) {\n        var layerRenderer = this.getRenderer();\n        if (layerRenderer.prepareFrame(frameState)) {\n            return layerRenderer.renderFrame(frameState, target);\n        }\n    };\n    /**\n     * Sets the layer to be rendered on top of other layers on a map. The map will\n     * not manage this layer in its layers collection, and the callback in\n     * {@link module:ol/Map#forEachLayerAtPixel} will receive `null` as layer. This\n     * is useful for temporary layers. To remove an unmanaged layer from the map,\n     * use `#setMap(null)`.\n     *\n     * To add the layer to a map and have it managed by
  the map, use\n     * {@link module:ol/Map#addLayer} instead.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    Layer.prototype.setMap = function (map) {\n        if (this.mapPrecomposeKey_) {\n            unlistenByKey(this.mapPrecomposeKey_);\n            this.mapPrecomposeKey_ = null;\n        }\n        if (!map) {\n            this.changed();\n        }\n        if (this.mapRenderKey_) {\n            unlistenByKey(this.mapRenderKey_);\n            this.mapRenderKey_ = null;\n        }\n        if (map) {\n            this.mapPrecomposeKey_ = listen(map, RenderEventType.PRECOMPOSE, function (evt) {\n                var renderEvent = /** @type {import(\"../render/Event.js\").default} */ (evt);\n                var layerStatesArray = renderEvent.frameState.layerStatesArray;\n                var layerState = this.getLayerState(false);\n                // A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer
 ()`, not both.\n                assert(!layerStatesArray.some(function (arrayLayerState) {\n                    return arrayLayerState.layer === layerState.layer;\n                }), 67);\n                layerStatesArray.push(layerState);\n            }, this);\n            this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n            this.changed();\n        }\n    };\n    /**\n     * Set the layer source.\n     * @param {SourceType} source The layer source.\n     * @observable\n     * @api\n     */\n    Layer.prototype.setSource = function (source) {\n        this.set(LayerProperty.SOURCE, source);\n    };\n    /**\n     * Get the renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} The layer renderer.\n     */\n    Layer.prototype.getRenderer = function () {\n        if (!this.renderer_) {\n            this.renderer_ = this.createRenderer();\n        }\n        return this.renderer_;\n    };\n    /**\n     * @return {boolean} 
 The layer has a renderer.\n     */\n    Layer.prototype.hasRenderer = function () {\n        return !!this.renderer_;\n    };\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     * @protected\n     */\n    Layer.prototype.createRenderer = function () {\n        return null;\n    };\n    /**\n     * Clean up.\n     */\n    Layer.prototype.disposeInternal = function () {\n        this.setSource(null);\n        _super.prototype.disposeInternal.call(this);\n    };\n    return Layer;\n}(BaseLayer));\n/**\n * Return `true` if the layer is visible and if the provided view state\n * has resolution and zoom levels that are in range of the layer's min/max.\n * @param {State} layerState Layer state.\n * @param {import(\"../View.js\").State} viewState View state.\n * @return {boolean} The layer is visible at the given view state.\n */\nexport function inView(layerState, viewState) {\n    if (!layerState.visible) {\
 n        return false;\n    }\n    var resolution = viewState.resolution;\n    if (resolution < layerState.minResolution ||\n        resolution >= layerState.maxResolution) {\n        return false;\n    }\n    var zoom = viewState.zoom;\n    return zoom > layerState.minZoom && zoom <= layerState.maxZoom;\n}\nexport default Layer;\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/render/VectorContext\n */\n/**\n * @classdesc\n * Context for drawing geometries.  A vector context is available on render\n * events and does not need to be constructed directly.\n * @api\n */\nvar VectorContext = /** @class */ (function () {\n    function VectorContext() {\n    }\n    /**\n     * Render a geometry with a custom renderer.\n     *\n     * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     * @param {Function} renderer Renderer.\n     */\n    VectorContext.prototype.drawCustom = function 
 (geometry, feature, renderer) { };\n    /**\n     * Render a geometry.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n     */\n    VectorContext.prototype.drawGeometry = function (geometry) { };\n    /**\n     * Set the rendering style.\n     *\n     * @param {import(\"../style/Style.js\").default} style The rendering style.\n     */\n    VectorContext.prototype.setStyle = function (style) { };\n    /**\n     * @param {import(\"../geom/Circle.js\").default} circleGeometry Circle geometry.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     */\n    VectorContext.prototype.drawCircle = function (circleGeometry, feature) { };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"../style/Style.js\").default} style Style.\n     */\n    VectorContext.prototype.drawFeature = function (feature, style) { };\n    /**\n     * @param {import(\"../geom/GeometryCollection.js\
 ").default} geometryCollectionGeometry Geometry collection.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     */\n    VectorContext.prototype.drawGeometryCollection = function (geometryCollectionGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/LineString.js\").default|import(\"./Feature.js\").default} lineStringGeometry Line string geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawLineString = function (lineStringGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawMultiLineString = function (multiLineStringGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} mul
 tiPointGeometry MultiPoint geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawMultiPoint = function (multiPointGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawMultiPolygon = function (multiPolygonGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawPoint = function (pointGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\
 n    VectorContext.prototype.drawPolygon = function (polygonGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/SimpleGeometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawText = function (geometry, feature) { };\n    /**\n     * @param {import(\"../style/Fill.js\").default} fillStyle Fill style.\n     * @param {import(\"../style/Stroke.js\").default} strokeStyle Stroke style.\n     */\n    VectorContext.prototype.setFillStrokeStyle = function (fillStyle, strokeStyle) { };\n    /**\n     * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n     * @param {import(\"./canvas.js\").DeclutterGroup=} opt_declutterGroup Declutter.\n     */\n    VectorContext.prototype.setImageStyle = function (imageStyle, opt_declutterGroup) { };\n    /**\n     * @param {import(\"../style/Text.js\").default} textStyle Text style.\n     * 
 @param {import(\"./canvas.js\").DeclutterGroups=} opt_declutterGroups Declutter.\n     */\n    VectorContext.prototype.setTextStyle = function (textStyle, opt_declutterGroups) { };\n    return VectorContext;\n}());\nexport default VectorContext;\n//# sourceMappingURL=VectorContext.js.map","/**\n * @module ol/colorlike\n */\nimport { toString } from './color.js';\n/**\n * A type accepted by CanvasRenderingContext2D.fillStyle\n * or CanvasRenderingContext2D.strokeStyle.\n * Represents a color, pattern, or gradient. The origin for patterns and\n * gradients as fill style is an increment of 512 css pixels from map coordinate\n * `[0, 0]`. For seamless repeat patterns, width and height of the pattern image\n * must be a factor of two (2, 4, 8, ..., 512).\n *\n * @typedef {string|CanvasPattern|CanvasGradient} ColorLike\n * @api\n */\n/**\n * @param {import(\"./color.js\").Color|ColorLike} color Color.\n * @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\ne
 xport function asColorLike(color) {\n    if (Array.isArray(color)) {\n        return toString(color);\n    }\n    else {\n        return color;\n    }\n}\n//# sourceMappingURL=colorlike.js.map","/**\n * @module ol/has\n */\nvar ua = typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n    ? navigator.userAgent.toLowerCase()\n    : '';\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nexport var FIREFOX = ua.indexOf('firefox') !== -1;\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport var SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport var WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1;\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport var MAC = ua.indexOf('macintosh')
  !== -1;\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport var DEVICE_PIXEL_RATIO = typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nexport var WORKER_OFFSCREEN_CANVAS = typeof WorkerGlobalScope !== 'undefined' &&\n    typeof OffscreenCanvas !== 'undefined' &&\n    self instanceof WorkerGlobalScope; //eslint-disable-line\n/**\n * Image.prototype.decode() is supported.\n * @type {boolean}\n */\nexport var IMAGE_DECODE = typeof Image !== 'undefined' && Image.prototype.decode;\n/**\n * @type {boolean}\n */\nexport var PASSIVE_EVENT_LISTENERS = (function () {\n    var passive = false;\n    try {\n        var options = Object.defineProperty({}, 'passive', {\n            get: function () {\n                passive = true;\n            },
 \n        });\n        window.addEventListener('_', null, options);\n        window.removeEventListener('_', null, options);\n    }\n    catch (error) {\n        // passive not supported\n    }\n    return passive;\n})();\n//# sourceMappingURL=has.js.map","import { WORKER_OFFSCREEN_CANVAS } from './has.js';\n/**\n * @module ol/dom\n */\n//FIXME Move this function to the canvas module\n/**\n * Create an html canvas element and returns its 2d context.\n * @param {number=} opt_width Canvas width.\n * @param {number=} opt_height Canvas height.\n * @param {Array<HTMLCanvasElement>=} opt_canvasPool Canvas pool to take existing canvas from.\n * @return {CanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(opt_width, opt_height, opt_canvasPool) {\n    var canvas = opt_canvasPool && opt_canvasPool.length\n        ? opt_canvasPool.shift()\n        : WORKER_OFFSCREEN_CANVAS\n            ? new OffscreenCanvas(opt_width || 300, opt_height || 300)\n            : docu
 ment.createElement('canvas');\n    if (opt_width) {\n        canvas.width = opt_width;\n    }\n    if (opt_height) {\n        canvas.height = opt_height;\n    }\n    //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n    return /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n}\n/**\n * Get the current computed width for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerWidth(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The width.\n */\nexport function outerWidth(element) {\n    var width = element.offsetWidth;\n    var style = getComputedStyle(element);\n    width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n    return width;\n}\n/**\n * Get the current computed height for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerHeight(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The
  height.\n */\nexport function outerHeight(element) {\n    var height = element.offsetHeight;\n    var style = getComputedStyle(element);\n    height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n    return height;\n}\n/**\n * @param {Node} newNode Node to replace old node\n * @param {Node} oldNode The node to be replaced\n */\nexport function replaceNode(newNode, oldNode) {\n    var parent = oldNode.parentNode;\n    if (parent) {\n        parent.replaceChild(newNode, oldNode);\n    }\n}\n/**\n * @param {Node} node The node to remove.\n * @returns {Node} The node that was removed or null.\n */\nexport function removeNode(node) {\n    return node && node.parentNode ? node.parentNode.removeChild(node) : null;\n}\n/**\n * @param {Node} node The node to remove the children from.\n */\nexport function removeChildren(node) {\n    while (node.lastChild) {\n        node.removeChild(node.lastChild);\n    }\n}\n/**\n * Transform the children of a parent node so they ma
 tch the\n * provided list of children.  This function aims to efficiently\n * remove, add, and reorder child nodes while maintaining a simple\n * implementation (it is not guaranteed to minimize DOM operations).\n * @param {Node} node The parent node whose children need reworking.\n * @param {Array<Node>} children The desired children.\n */\nexport function replaceChildren(node, children) {\n    var oldChildren = node.childNodes;\n    for (var i = 0; true; ++i) {\n        var oldChild = oldChildren[i];\n        var newChild = children[i];\n        // check if our work is done\n        if (!oldChild && !newChild) {\n            break;\n        }\n        // check if children match\n        if (oldChild === newChild) {\n            continue;\n        }\n        // check if a new child needs to be added\n        if (!oldChild) {\n            node.appendChild(newChild);\n            continue;\n        }\n        // check if an old child needs to be removed\n        if (!newChild) {\n   
          node.removeChild(oldChild);\n            --i;\n            continue;\n        }\n        // reorder\n        node.insertBefore(newChild, oldChild);\n    }\n}\n//# sourceMappingURL=dom.js.map","/**\n * @module ol/css\n */\n/**\n * @typedef {Object} FontParameters\n * @property {string} style\n * @property {string} variant\n * @property {string} weight\n * @property {string} size\n * @property {string} lineHeight\n * @property {string} family\n * @property {Array<string>} families\n */\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_HIDDEN = 'ol-hidden';\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_SELECTABLE = 'ol-selectable';\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSELECTABLE = 'ol-unselectable';\n/**\n * The CSS class for unsuppor
 ted feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSUPPORTED = 'ol-unsupported';\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_CONTROL = 'ol-control';\n/**\n * The CSS class that we'll give the DOM elements that are collapsed, i.e.\n * to those elements which usually can be expanded.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_COLLAPSED = 'ol-collapsed';\n/**\n * From http://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nvar fontRegEx = new RegExp([\n    '^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)',\n    '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?',\n    '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))',\n    '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))',
 \n    '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z]+?)\\\\s*$',\n].join(''), 'i');\nvar fontRegExMatchIndex = [\n    'style',\n    'variant',\n    'weight',\n    'size',\n    'lineHeight',\n    'family',\n];\n/**\n * Get the list of font families from a font spec.  Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} fontSpec The CSS font property.\n * @return {FontParameters} The font parameters (or null if the input spec is invalid).\n */\nexport var getFontParameters = function (fontSpec) {\n    var match = fontSpec.match(fontRegEx);\n    if (!match) {\n        return null;\n    }\n    var style = /** @type {FontParameters} */ ({\n        lineHeight: 'normal',\n        size: '1.2em',\n        style: 'normal',\n        weight: 'normal',\n        variant: 'normal',\n    });\n    for (var i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n        var value = match[i + 1];\n        if (value !== undefined) {\n            style[fontRegExMatchIndex[
 i]] = value;\n        }\n    }\n    style.families = style.family.split(/,\\s?/);\n    return style;\n};\n//# sourceMappingURL=css.js.map","/**\n * @module ol/render/canvas\n */\nimport BaseObject from '../Object.js';\nimport EventTarget from '../events/Target.js';\nimport { WORKER_OFFSCREEN_CANVAS } from '../has.js';\nimport { clear } from '../obj.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { getFontParameters } from '../css.js';\nimport { toString } from '../transform.js';\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle\n */\n/**\n * @typedef Label\n * @property {number} width\n * @property {number} height\n * @property {Array<string|number>} contextInstructions\n */\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle]\n * @property {CanvasLineCap} [currentLineCap]\n * @pr
 operty {Array<number>} currentLineDash\n * @property {number} [currentLineDashOffset]\n * @property {CanvasLineJoin} [currentLineJoin]\n * @property {number} [currentLineWidth]\n * @property {number} [currentMiterLimit]\n * @property {number} [lastStroke]\n * @property {import(\"../colorlike.js\").ColorLike} [fillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {CanvasLineCap} [lineCap]\n * @property {Array<number>} lineDash\n * @property {number} [lineDashOffset]\n * @property {CanvasLineJoin} [lineJoin]\n * @property {number} [lineWidth]\n * @property {number} [miterLimit]\n */\n/**\n * @typedef {Object} StrokeState\n * @property {CanvasLineCap} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {CanvasLineJoin} lineJoin\n * @property {number} lineWidth\n * @property {number} miterLimit\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle\n */\n/**\n * @typedef {Object} TextState\n
  * @property {string} font\n * @property {string} [textAlign]\n * @property {string} textBaseline\n * @property {string} [placement]\n * @property {number} [maxAngle]\n * @property {boolean} [overflow]\n * @property {import(\"../style/Fill.js\").default} [backgroundFill]\n * @property {import(\"../style/Stroke.js\").default} [backgroundStroke]\n * @property {import(\"../size.js\").Size} [scale]\n * @property {Array<number>} [padding]\n */\n/**\n * Container for decluttered replay instructions that need to be rendered or\n * omitted together, i.e. when styles render both an image and text, or for the\n * characters that form text along lines. The basic elements of this array are\n * `[minX, minY, maxX, maxY, count]`, where the first four entries are the\n * rendered extent of the group in pixel space. `count` is the number of styles\n * in the group, i.e. 2 when an image and a text are grouped, or 1 otherwise.\n * In addition to these four elements, declutter instruction arrays (i.e.
  the\n * arguments to {@link module:ol/render/canvas~drawImage} are appended to the array.\n * @typedef {Array<*>} DeclutterGroup\n */\n/**\n * Declutter groups for support of multi geometries.\n * @typedef {Array<DeclutterGroup>} DeclutterGroups\n */\n/**\n * @const\n * @type {string}\n */\nexport var defaultFont = '10px sans-serif';\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport var defaultFillStyle = '#000';\n/**\n * @const\n * @type {CanvasLineCap}\n */\nexport var defaultLineCap = 'round';\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultLineDash = [];\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineDashOffset = 0;\n/**\n * @const\n * @type {CanvasLineJoin}\n */\nexport var defaultLineJoin = 'round';\n/**\n * @const\n * @type {number}\n */\nexport var defaultMiterLimit = 10;\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport var defaultStrokeStyle = '#000';\n/**\n * @const\n * @type {str
 ing}\n */\nexport var defaultTextAlign = 'center';\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextBaseline = 'middle';\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultPadding = [0, 0, 0, 0];\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineWidth = 1;\n/**\n * @type {BaseObject}\n */\nexport var checkedFonts = new BaseObject();\n/**\n * The label cache for text rendering. To change the default cache size of 2048\n * entries, use {@link module:ol/structs/LRUCache#setSize}.\n * Deprecated - there is no label cache any more.\n * @type {?}\n * @api\n * @deprecated\n */\nexport var labelCache = new EventTarget();\nlabelCache.setSize = function () {\n    console.warn('labelCache is deprecated.'); //eslint-disable-line\n};\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar measureContext = null;\n/**\n * @type {string}\n */\nvar measureFont;\n/**\n * @type {!Object<string, number>}\n */\nexport var textHeights = {};\n/**\n * Clears the label 
 cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport var registerFont = (function () {\n    var retries = 100;\n    var size = '32px ';\n    var referenceFonts = ['monospace', 'serif'];\n    var len = referenceFonts.length;\n    var text = 'wmytzilWMYTZIL@#/&?$%10\\uF013';\n    var interval, referenceWidth;\n    /**\n     * @param {string} fontStyle Css font-style\n     * @param {string} fontWeight Css font-weight\n     * @param {*} fontFamily Css font-family\n     * @return {boolean} Font with style and weight is available\n     */\n    function isAvailable(fontStyle, fontWeight, fontFamily) {\n        var available = true;\n        for (var i = 0; i < len; ++i) {\n            var referenceFont = referenceFonts[i];\n            referenceWidth = measureTextWidth(fontStyle + ' ' + fontWeight + ' ' + size + referenceFont, text);\n            if (fontFamily != referenceFont) {\n                var width = measureTextWidth(fontStyle +\n          
           ' ' +\n                    fontWeight +\n                    ' ' +\n                    size +\n                    fontFamily +\n                    ',' +\n                    referenceFont, text);\n                // If width and referenceWidth are the same, then the fallback was used\n                // instead of the font we wanted, so the font is not available.\n                available = available && width != referenceWidth;\n            }\n        }\n        if (available) {\n            return true;\n        }\n        return false;\n    }\n    function check() {\n        var done = true;\n        var fonts = checkedFonts.getKeys();\n        for (var i = 0, ii = fonts.length; i < ii; ++i) {\n            var font = fonts[i];\n            if (checkedFonts.get(font) < retries) {\n                if (isAvailable.apply(this, font.split('\\n'))) {\n                    clear(textHeights);\n                    // Make sure that loaded fonts are picked up by Safari\n      
               measureContext = null;\n                    measureFont = undefined;\n                    checkedFonts.set(font, retries);\n                }\n                else {\n                    checkedFonts.set(font, checkedFonts.get(font) + 1, true);\n                    done = false;\n                }\n            }\n        }\n        if (done) {\n            clearInterval(interval);\n            interval = undefined;\n        }\n    }\n    return function (fontSpec) {\n        var font = getFontParameters(fontSpec);\n        if (!font) {\n            return;\n        }\n        var families = font.families;\n        for (var i = 0, ii = families.length; i < ii; ++i) {\n            var family = families[i];\n            var key = font.style + '\\n' + font.weight + '\\n' + family;\n            if (checkedFonts.get(key) === undefined) {\n                checkedFonts.set(key, retries, true);\n                if (!isAvailable(font.style, font.weight, family)) {\n             
        checkedFonts.set(key, 0, true);\n                    if (interval === undefined) {\n                        interval = setInterval(check, 32);\n                    }\n                }\n            }\n        }\n    };\n})();\n/**\n * @param {string} font Font to use for measuring.\n * @return {import(\"../size.js\").Size} Measurement.\n */\nexport var measureTextHeight = (function () {\n    /**\n     * @type {HTMLDivElement}\n     */\n    var div;\n    var heights = textHeights;\n    return function (fontSpec) {\n        var height = heights[fontSpec];\n        if (height == undefined) {\n            if (WORKER_OFFSCREEN_CANVAS) {\n                var font = getFontParameters(fontSpec);\n                var metrics = measureText(fontSpec, 'Žg');\n                var lineHeight = isNaN(Number(font.lineHeight))\n                    ? 1.2\n                    : Number(font.lineHeight);\n                textHeights[fontSpec] =\n                    lineHeight *\n                
         (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n            }\n            else {\n                if (!div) {\n                    div = document.createElement('div');\n                    div.innerHTML = 'M';\n                    div.style.margin = '0 !important';\n                    div.style.padding = '0 !important';\n                    div.style.position = 'absolute !important';\n                    div.style.left = '-99999px !important';\n                }\n                div.style.font = fontSpec;\n                document.body.appendChild(div);\n                height = div.offsetHeight;\n                heights[fontSpec] = height;\n                document.body.removeChild(div);\n            }\n        }\n        return height;\n    };\n})();\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {TextMetrics} Text metrics.\n */\nfunction measureText(font, text) {\n    if (!measureContext) {\n        measureContext =
  createCanvasContext2D(1, 1);\n    }\n    if (font != measureFont) {\n        measureContext.font = font;\n        measureFont = measureContext.font;\n    }\n    return measureContext.measureText(text);\n}\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {number} Width.\n */\nexport function measureTextWidth(font, text) {\n    return measureText(font, text).width;\n}\n/**\n * Measure text width using a cache.\n * @param {string} font The font.\n * @param {string} text The text to measure.\n * @param {Object<string, number>} cache A lookup of cached widths by text.\n * @returns {number} The text width.\n */\nexport function measureAndCacheTextWidth(font, text, cache) {\n    if (text in cache) {\n        return cache[text];\n    }\n    var width = measureTextWidth(font, text);\n    cache[text] = width;\n    return width;\n}\n/**\n * @param {string} font Font to use for measuring.\n * @param {Array<string>} lines Lines to measure.\n * @param {Array<number>
 } widths Array will be populated with the widths of\n * each line.\n * @return {number} Width of the whole text.\n */\nexport function measureTextWidths(font, lines, widths) {\n    var numLines = lines.length;\n    var width = 0;\n    for (var i = 0; i < numLines; ++i) {\n        var currentWidth = measureTextWidth(font, lines[i]);\n        width = Math.max(width, currentWidth);\n        widths.push(currentWidth);\n    }\n    return width;\n}\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {number} offsetX X offset.\n * @param {number} offsetY Y offset.\n */\nexport function rotateAtOffset(context, rotation, offsetX, offsetY) {\n    if (rotation !== 0) {\n        context.translate(offsetX, offsetY);\n        context.rotate(rotation);\n        context.translate(-offsetX, -offsetY);\n    }\n}\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../transform.js\").Transform|null} transform Transfo
 rm.\n * @param {number} opacity Opacity.\n * @param {Label|HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} labelOrImage Label.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} w Width.\n * @param {number} h Height.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../size.js\").Size} scale Scale.\n */\nexport function drawImageOrLabel(context, transform, opacity, labelOrImage, originX, originY, w, h, x, y, scale) {\n    context.save();\n    if (opacity !== 1) {\n        context.globalAlpha *= opacity;\n    }\n    if (transform) {\n        context.setTransform.apply(context, transform);\n    }\n    if ( /** @type {*} */(labelOrImage).contextInstructions) {\n        // label\n        context.translate(x, y);\n        context.scale(scale[0], scale[1]);\n        executeLabelInstructions(/** @type {Label} */ (labelOrImage), context);\n    }\n    else if (scale[0] < 0 || scale[1] < 0) {\n        // flipped image\n   
      context.translate(x, y);\n        context.scale(scale[0], scale[1]);\n        context.drawImage(\n        /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (labelOrImage), originX, originY, w, h, 0, 0, w, h);\n    }\n    else {\n        // if image not flipped translate and scale can be avoided\n        context.drawImage(\n        /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (labelOrImage), originX, originY, w, h, x, y, w * scale[0], h * scale[1]);\n    }\n    context.restore();\n}\n/**\n * @param {Label} label Label.\n * @param {CanvasRenderingContext2D} context Context.\n */\nfunction executeLabelInstructions(label, context) {\n    var contextInstructions = label.contextInstructions;\n    for (var i = 0, ii = contextInstructions.length; i < ii; i += 2) {\n        if (Array.isArray(contextInstructions[i + 1])) {\n            context[contextInstructions[i]].apply(context, contextInstructions[i + 1]);\n        }\n        else {\n           
  context[contextInstructions[i]] = contextInstructions[i + 1];\n        }\n    }\n}\n/**\n * @type {HTMLCanvasElement}\n * @private\n */\nvar createTransformStringCanvas = null;\n/**\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @return {string} CSS transform.\n */\nexport function createTransformString(transform) {\n    if (WORKER_OFFSCREEN_CANVAS) {\n        return toString(transform);\n    }\n    else {\n        if (!createTransformStringCanvas) {\n            createTransformStringCanvas = createCanvasContext2D(1, 1).canvas;\n        }\n        createTransformStringCanvas.style.transform = toString(transform);\n        return createTransformStringCanvas.style.transform;\n    }\n}\n//# sourceMappingURL=canvas.js.map","/**\n * @module ol/render/canvas/Immediate\n */\n// FIXME test, especially polygons with holes and multipolygons\n// FIXME need to handle large thick features (where pixel size matters)\n// FIXME add offset and end to ol/geom/flat/transf
 orm~transform2D?\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport GeometryType from '../../geom/GeometryType.js';\nimport VectorContext from '../VectorContext.js';\nimport { asColorLike } from '../../colorlike.js';\nimport { compose as composeTransform, create as createTransform, } from '../../transform.js';\nimport { defaultFillStyle, defaultFont, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidt
 h, defaultMiterLimit, defaultStrokeStyle, defaultTextAlign, defaultTextBaseline, } from '../canvas.js';\nimport { equals } from '../../array.js';\nimport { intersects } from '../../extent.js';\nimport { transform2D } from '../../geom/flat/transform.js';\nimport { transformGeom2D } from '../../geom/SimpleGeometry.js';\n/**\n * @classdesc\n * A concrete subclass of {@link module:ol/render/VectorContext} that implements\n * direct rendering of features and geometries to an HTML5 Canvas context.\n * Instances of this class are created internally by the library and\n * provided to application code as vectorContext member of the\n * {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and\n * render events emitted by layers and maps.\n */\nvar CanvasImmediateRenderer = /** @class */ (function (_super) {\n    __extends(CanvasImmediateRenderer, _super);\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} pixelRatio
  Pixel ratio.\n     * @param {import(\"../../extent.js\").Extent} extent Extent.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {number} viewRotation View rotation.\n     * @param {number=} opt_squaredTolerance Optional squared tolerance for simplification.\n     * @param {import(\"../../proj.js\").TransformFunction=} opt_userTransform Transform from user to view projection.\n     */\n    function CanvasImmediateRenderer(context, pixelRatio, extent, transform, viewRotation, opt_squaredTolerance, opt_userTransform) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {CanvasRenderingContext2D}\n         */\n        _this.context_ = context;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.extent_ = extent;\n  
       /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.transform_ = transform;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.viewRotation_ = viewRotation;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.squaredTolerance_ = opt_squaredTolerance;\n        /**\n         * @private\n         * @type {import(\"../../proj.js\").TransformFunction}\n         */\n        _this.userTransform_ = opt_userTransform;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.contextFillState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.contextStrokeState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").TextState}\n         */\n        _this.contextTextState_ = null;\n    
     /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.fillState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.strokeState_ = null;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageAnchorX_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageAnchorY_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageHeight_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageOpacity_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageOriginX_ = 0;\n        /**\n         * @private\n 
         * @type {number}\n         */\n        _this.imageOriginY_ = 0;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.imageRotateWithView_ = false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageRotation_ = 0;\n        /**\n         * @private\n         * @type {import(\"../../size.js\").Size}\n         */\n        _this.imageScale_ = [0, 0];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageWidth_ = 0;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.text_ = '';\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetX_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetY_ = 0;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.textRotateWithView_ = false;\n        /**\n       
   * @private\n         * @type {number}\n         */\n        _this.textRotation_ = 0;\n        /**\n         * @private\n         * @type {import(\"../../size.js\").Size}\n         */\n        _this.textScale_ = [0, 0];\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.textFillState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.textStrokeState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").TextState}\n         */\n        _this.textState_ = null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.pixelCoordinates_ = [];\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.tmpLocalTransform_ = createTransform();\n        return _this;\n    }\n    /**\n     * @param {Array<number>} 
 flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.drawImages_ = function (flatCoordinates, offset, end, stride) {\n        if (!this.image_) {\n            return;\n        }\n        var pixelCoordinates = transform2D(flatCoordinates, offset, end, 2, this.transform_, this.pixelCoordinates_);\n        var context = this.context_;\n        var localTransform = this.tmpLocalTransform_;\n        var alpha = context.globalAlpha;\n        if (this.imageOpacity_ != 1) {\n            context.globalAlpha = alpha * this.imageOpacity_;\n        }\n        var rotation = this.imageRotation_;\n        if (this.imageRotateWithView_) {\n            rotation += this.viewRotation_;\n        }\n        for (var i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {\n            var x = pixelCoordinates[i] - this.imageAnchorX_;\n            va
 r y = pixelCoordinates[i + 1] - this.imageAnchorY_;\n            if (rotation !== 0 ||\n                this.imageScale_[0] != 1 ||\n                this.imageScale_[1] != 1) {\n                var centerX = x + this.imageAnchorX_;\n                var centerY = y + this.imageAnchorY_;\n                composeTransform(localTransform, centerX, centerY, 1, 1, rotation, -centerX, -centerY);\n                context.setTransform.apply(context, localTransform);\n                context.translate(centerX, centerY);\n                context.scale(this.imageScale_[0], this.imageScale_[1]);\n                context.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_, this.imageWidth_, this.imageHeight_, -this.imageAnchorX_, -this.imageAnchorY_, this.imageWidth_, this.imageHeight_);\n                context.setTransform(1, 0, 0, 1, 0, 0);\n            }\n            else {\n                context.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_, this.imageWidth_, this
 .imageHeight_, x, y, this.imageWidth_, this.imageHeight_);\n            }\n        }\n        if (this.imageOpacity_ != 1) {\n            context.globalAlpha = alpha;\n        }\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.drawText_ = function (flatCoordinates, offset, end, stride) {\n        if (!this.textState_ || this.text_ === '') {\n            return;\n        }\n        if (this.textFillState_) {\n            this.setContextFillState_(this.textFillState_);\n        }\n        if (this.textStrokeState_) {\n            this.setContextStrokeState_(this.textStrokeState_);\n        }\n        this.setContextTextState_(this.textState_);\n        var pixelCoordinates = transform2D(flatCoordinates, offset, end, stride, this.transform_, this.pixelCoordinates_);\n        var c
 ontext = this.context_;\n        var rotation = this.textRotation_;\n        if (this.textRotateWithView_) {\n            rotation += this.viewRotation_;\n        }\n        for (; offset < end; offset += stride) {\n            var x = pixelCoordinates[offset] + this.textOffsetX_;\n            var y = pixelCoordinates[offset + 1] + this.textOffsetY_;\n            if (rotation !== 0 ||\n                this.textScale_[0] != 1 ||\n                this.textScale_[1] != 1) {\n                var localTransform = composeTransform(this.tmpLocalTransform_, x, y, 1, 1, rotation, -x, -y);\n                context.setTransform.apply(context, localTransform);\n                context.translate(x, y);\n                context.scale(this.textScale_[0], this.textScale_[1]);\n                if (this.textStrokeState_) {\n                    context.strokeText(this.text_, 0, 0);\n                }\n                if (this.textFillState_) {\n                    context.fillText(this.text_, 0, 0);\n
                 }\n                context.setTransform(1, 0, 0, 1, 0, 0);\n            }\n            else {\n                if (this.textStrokeState_) {\n                    context.strokeText(this.text_, x, y);\n                }\n                if (this.textFillState_) {\n                    context.fillText(this.text_, x, y);\n                }\n            }\n        }\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @param {boolean} close Close.\n     * @private\n     * @return {number} end End.\n     */\n    CanvasImmediateRenderer.prototype.moveToLineTo_ = function (flatCoordinates, offset, end, stride, close) {\n        var context = this.context_;\n        var pixelCoordinates = transform2D(flatCoordinates, offset, end, stride, this.transform_, this.pixelCoordinates_);\n        context.moveTo(pixelCoordinates[0], pixelCo
 ordinates[1]);\n        var length = pixelCoordinates.length;\n        if (close) {\n            length -= 2;\n        }\n        for (var i = 2; i < length; i += 2) {\n            context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);\n        }\n        if (close) {\n            context.closePath();\n        }\n        return end;\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {Array<number>} ends Ends.\n     * @param {number} stride Stride.\n     * @private\n     * @return {number} End.\n     */\n    CanvasImmediateRenderer.prototype.drawRings_ = function (flatCoordinates, offset, ends, stride) {\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, true);\n        }\n        return offset;\n    };\n    /**\n     * Render a circle geometry into the canvas.  Rendering is immediate and uses\n     * the
  current fill and stroke styles.\n     *\n     * @param {import(\"../../geom/Circle.js\").default} geometry Circle geometry.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.drawCircle = function (geometry) {\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        if (this.fillState_ || this.strokeState_) {\n            if (this.fillState_) {\n                this.setContextFillState_(this.fillState_);\n            }\n            if (this.strokeState_) {\n                this.setContextStrokeState_(this.strokeState_);\n            }\n            var pixelCoordinates = transformGeom2D(geometry, this.transform_, this.pixelCoordinates_);\n            var dx = pixelCoordinates[2] - pixelCoordinates[0];\n            var dy = pixelCoordinates[3] - pixelCoordinates[1];\n            var radius = Math.sqrt(dx * dx + dy * dy);\n            var context = this.context_;\n            context.beginPath();\n            context.arc(pixelC
 oordinates[0], pixelCoordinates[1], radius, 0, 2 * Math.PI);\n            if (this.fillState_) {\n                context.fill();\n            }\n            if (this.strokeState_) {\n                context.stroke();\n            }\n        }\n        if (this.text_ !== '') {\n            this.drawText_(geometry.getCenter(), 0, 2, 2);\n        }\n    };\n    /**\n     * Set the rendering style.  Note that since this is an immediate rendering API,\n     * any `zIndex` on the provided style will be ignored.\n     *\n     * @param {import(\"../../style/Style.js\").default} style The rendering style.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.setStyle = function (style) {\n        this.setFillStrokeStyle(style.getFill(), style.getStroke());\n        this.setImageStyle(style.getImage());\n        this.setTextStyle(style.getText());\n    };\n    /**\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     */\n    CanvasImmediateRenderer.proto
 type.setTransform = function (transform) {\n        this.transform_ = transform;\n    };\n    /**\n     * Render a geometry into the canvas.  Call\n     * {@link module:ol/render/canvas/Immediate#setStyle} first to set the rendering style.\n     *\n     * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry to render.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.drawGeometry = function (geometry) {\n        var type = geometry.getType();\n        switch (type) {\n            case GeometryType.POINT:\n                this.drawPoint(\n                /** @type {import(\"../../geom/Point.js\").default} */ (geometry));\n                break;\n            case GeometryType.LINE_STRING:\n                this.drawLineString(\n                /** @type {import(\"../../geom/LineString.js\").default} */ (geometry));\n                break;\n            case GeometryType.POLYGON:\n                this.drawPolygon(\n       
          /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry));\n                break;\n            case GeometryType.MULTI_POINT:\n                this.drawMultiPoint(\n                /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry));\n                break;\n            case GeometryType.MULTI_LINE_STRING:\n                this.drawMultiLineString(\n                /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry));\n                break;\n            case GeometryType.MULTI_POLYGON:\n                this.drawMultiPolygon(\n                /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry));\n                break;\n            case GeometryType.GEOMETRY_COLLECTION:\n                this.drawGeometryCollection(\n                /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (geometry));\n                break;\n            case GeometryType.CIRCLE:\n                this.dra
 wCircle(\n                /** @type {import(\"../../geom/Circle.js\").default} */ (geometry));\n                break;\n            default:\n        }\n    };\n    /**\n     * Render a feature into the canvas.  Note that any `zIndex` on the provided\n     * style will be ignored - features are rendered immediately in the order that\n     * this method is called.  If you need `zIndex` support, you should be using an\n     * {@link module:ol/layer/Vector~VectorLayer} instead.\n     *\n     * @param {import(\"../../Feature.js\").default} feature Feature.\n     * @param {import(\"../../style/Style.js\").default} style Style.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.drawFeature = function (feature, style) {\n        var geometry = style.getGeometryFunction()(feature);\n        if (!geometry || !intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        this.setStyle(style);\n        this.drawGeometry(geometry);\n    };\n    /**\n     *
  Render a GeometryCollection to the canvas.  Rendering is immediate and\n     * uses the current styles appropriate for each geometry in the collection.\n     *\n     * @param {import(\"../../geom/GeometryCollection.js\").default} geometry Geometry collection.\n     */\n    CanvasImmediateRenderer.prototype.drawGeometryCollection = function (geometry) {\n        var geometries = geometry.getGeometriesArray();\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            this.drawGeometry(geometries[i]);\n        }\n    };\n    /**\n     * Render a Point geometry into the canvas.  Rendering is immediate and uses\n     * the current style.\n     *\n     * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} geometry Point geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawPoint = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/Point.js\").default} */ (geometry.si
 mplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        var flatCoordinates = geometry.getFlatCoordinates();\n        var stride = geometry.getStride();\n        if (this.image_) {\n            this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n        if (this.text_ !== '') {\n            this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n    };\n    /**\n     * Render a MultiPoint geometry  into the canvas.  Rendering is immediate and\n     * uses the current style.\n     *\n     * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} geometry MultiPoint geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawMultiPoint = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n  
       var flatCoordinates = geometry.getFlatCoordinates();\n        var stride = geometry.getStride();\n        if (this.image_) {\n            this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n        if (this.text_ !== '') {\n            this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n    };\n    /**\n     * Render a LineString into the canvas.  Rendering is immediate and uses\n     * the current style.\n     *\n     * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} geometry LineString geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawLineString = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n      
   }\n        if (this.strokeState_) {\n            this.setContextStrokeState_(this.strokeState_);\n            var context = this.context_;\n            var flatCoordinates = geometry.getFlatCoordinates();\n            context.beginPath();\n            this.moveToLineTo_(flatCoordinates, 0, flatCoordinates.length, geometry.getStride(), false);\n            context.stroke();\n        }\n        if (this.text_ !== '') {\n            var flatMidpoint = geometry.getFlatMidpoint();\n            this.drawText_(flatMidpoint, 0, 2, 2);\n        }\n    };\n    /**\n     * Render a MultiLineString geometry into the canvas.  Rendering is immediate\n     * and uses the current style.\n     *\n     * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} geometry MultiLineString geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawMultiLineString = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {impor
 t(\"../../geom/MultiLineString.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        var geometryExtent = geometry.getExtent();\n        if (!intersects(this.extent_, geometryExtent)) {\n            return;\n        }\n        if (this.strokeState_) {\n            this.setContextStrokeState_(this.strokeState_);\n            var context = this.context_;\n            var flatCoordinates = geometry.getFlatCoordinates();\n            var offset = 0;\n            var ends = /** @type {Array<number>} */ (geometry.getEnds());\n            var stride = geometry.getStride();\n            context.beginPath();\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, false);\n            }\n            context.stroke();\n        }\n        if (this.text_ !== '') {\n            var flatMidpoints = geometry.getFlatMidpoints();\n            this.d
 rawText_(flatMidpoints, 0, flatMidpoints.length, 2);\n        }\n    };\n    /**\n     * Render a Polygon geometry into the canvas.  Rendering is immediate and uses\n     * the current style.\n     *\n     * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} geometry Polygon geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawPolygon = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        if (this.strokeState_ || this.fillState_) {\n            if (this.fillState_) {\n                this.setContextFillState_(this.fillState_);\n            }\n            if (this.strokeState_) {\n                this.setContextStrokeState_(this.strokeState_);\n            }\n     
        var context = this.context_;\n            context.beginPath();\n            this.drawRings_(geometry.getOrientedFlatCoordinates(), 0, \n            /** @type {Array<number>} */ (geometry.getEnds()), geometry.getStride());\n            if (this.fillState_) {\n                context.fill();\n            }\n            if (this.strokeState_) {\n                context.stroke();\n            }\n        }\n        if (this.text_ !== '') {\n            var flatInteriorPoint = geometry.getFlatInteriorPoint();\n            this.drawText_(flatInteriorPoint, 0, 2, 2);\n        }\n    };\n    /**\n     * Render MultiPolygon geometry into the canvas.  Rendering is immediate and\n     * uses the current style.\n     * @param {import(\"../../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawMultiPolygon = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/Mul
 tiPolygon.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        if (this.strokeState_ || this.fillState_) {\n            if (this.fillState_) {\n                this.setContextFillState_(this.fillState_);\n            }\n            if (this.strokeState_) {\n                this.setContextStrokeState_(this.strokeState_);\n            }\n            var context = this.context_;\n            var flatCoordinates = geometry.getOrientedFlatCoordinates();\n            var offset = 0;\n            var endss = geometry.getEndss();\n            var stride = geometry.getStride();\n            context.beginPath();\n            for (var i = 0, ii = endss.length; i < ii; ++i) {\n                var ends = endss[i];\n                offset = this.drawRings_(flatCoordinates, offset, ends, stride);\n            }\n            if (this.fillState
 _) {\n                context.fill();\n            }\n            if (this.strokeState_) {\n                context.stroke();\n            }\n        }\n        if (this.text_ !== '') {\n            var flatInteriorPoints = geometry.getFlatInteriorPoints();\n            this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.setContextFillState_ = function (fillState) {\n        var context = this.context_;\n        var contextFillState = this.contextFillState_;\n        if (!contextFillState) {\n            context.fillStyle = fillState.fillStyle;\n            this.contextFillState_ = {\n                fillStyle: fillState.fillStyle,\n            };\n        }\n        else {\n            if (contextFillState.fillStyle != fillState.fillStyle) {\n                contextFillState.fillStyle = fillState.fill
 Style;\n                context.fillStyle = fillState.fillStyle;\n            }\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.setContextStrokeState_ = function (strokeState) {\n        var context = this.context_;\n        var contextStrokeState = this.contextStrokeState_;\n        if (!contextStrokeState) {\n            context.lineCap = strokeState.lineCap;\n            if (context.setLineDash) {\n                context.setLineDash(strokeState.lineDash);\n                context.lineDashOffset = strokeState.lineDashOffset;\n            }\n            context.lineJoin = strokeState.lineJoin;\n            context.lineWidth = strokeState.lineWidth;\n            context.miterLimit = strokeState.miterLimit;\n            context.strokeStyle = strokeState.strokeStyle;\n            this.contextStrokeState_ = {\n                lineCap: strokeState.lineCap,\n     
            lineDash: strokeState.lineDash,\n                lineDashOffset: strokeState.lineDashOffset,\n                lineJoin: strokeState.lineJoin,\n                lineWidth: strokeState.lineWidth,\n                miterLimit: strokeState.miterLimit,\n                strokeStyle: strokeState.strokeStyle,\n            };\n        }\n        else {\n            if (contextStrokeState.lineCap != strokeState.lineCap) {\n                contextStrokeState.lineCap = strokeState.lineCap;\n                context.lineCap = strokeState.lineCap;\n            }\n            if (context.setLineDash) {\n                if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n                    context.setLineDash((contextStrokeState.lineDash = strokeState.lineDash));\n                }\n                if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n                    contextStrokeState.lineDashOffset = strokeState.lineDashOffset;\n                    co
 ntext.lineDashOffset = strokeState.lineDashOffset;\n                }\n            }\n            if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n                contextStrokeState.lineJoin = strokeState.lineJoin;\n                context.lineJoin = strokeState.lineJoin;\n            }\n            if (contextStrokeState.lineWidth != strokeState.lineWidth) {\n                contextStrokeState.lineWidth = strokeState.lineWidth;\n                context.lineWidth = strokeState.lineWidth;\n            }\n            if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n                contextStrokeState.miterLimit = strokeState.miterLimit;\n                context.miterLimit = strokeState.miterLimit;\n            }\n            if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n                contextStrokeState.strokeStyle = strokeState.strokeStyle;\n                context.strokeStyle = strokeState.strokeStyle;\n            }\n        }\n    };\n
     /**\n     * @param {import(\"../canvas.js\").TextState} textState Text state.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.setContextTextState_ = function (textState) {\n        var context = this.context_;\n        var contextTextState = this.contextTextState_;\n        var textAlign = textState.textAlign\n            ? textState.textAlign\n            : defaultTextAlign;\n        if (!contextTextState) {\n            context.font = textState.font;\n            context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n            context.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n            this.contextTextState_ = {\n                font: textState.font,\n                textAlign: textAlign,\n                textBaseline: textState.textBaseline,\n            };\n        }\n        else {\n            if (contextTextState.font != textState.font) {\n                contextTextState.font = textState.font;\n            
     context.font = textState.font;\n            }\n            if (contextTextState.textAlign != textAlign) {\n                contextTextState.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n                context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n            }\n            if (contextTextState.textBaseline != textState.textBaseline) {\n                contextTextState.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n                context.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n            }\n        }\n    };\n    /**\n     * Set the fill and stroke style for subsequent draw operations.  To clear\n     * either fill or stroke styles, pass null for the appropriate parameter.\n     *\n     * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n     * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n     */\n    CanvasImmediateRenderer.prot
 otype.setFillStrokeStyle = function (fillStyle, strokeStyle) {\n        if (!fillStyle) {\n            this.fillState_ = null;\n        }\n        else {\n            var fillStyleColor = fillStyle.getColor();\n            this.fillState_ = {\n                fillStyle: asColorLike(fillStyleColor ? fillStyleColor : defaultFillStyle),\n            };\n        }\n        if (!strokeStyle) {\n            this.strokeState_ = null;\n        }\n        else {\n            var strokeStyleColor = strokeStyle.getColor();\n            var strokeStyleLineCap = strokeStyle.getLineCap();\n            var strokeStyleLineDash = strokeStyle.getLineDash();\n            var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n            var strokeStyleLineJoin = strokeStyle.getLineJoin();\n            var strokeStyleWidth = strokeStyle.getWidth();\n            var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n            this.strokeState_ = {\n                lineCap: strokeStyleLin
 eCap !== undefined\n                    ? strokeStyleLineCap\n                    : defaultLineCap,\n                lineDash: strokeStyleLineDash ? strokeStyleLineDash : defaultLineDash,\n                lineDashOffset: strokeStyleLineDashOffset\n                    ? strokeStyleLineDashOffset\n                    : defaultLineDashOffset,\n                lineJoin: strokeStyleLineJoin !== undefined\n                    ? strokeStyleLineJoin\n                    : defaultLineJoin,\n                lineWidth: this.pixelRatio_ *\n                    (strokeStyleWidth !== undefined\n                        ? strokeStyleWidth\n                        : defaultLineWidth),\n                miterLimit: strokeStyleMiterLimit !== undefined\n                    ? strokeStyleMiterLimit\n                    : defaultMiterLimit,\n                strokeStyle: asColorLike(strokeStyleColor ? strokeStyleColor : defaultStrokeStyle),\n            };\n        }\n    };\n    /**\n     * Set the image st
 yle for subsequent draw operations.  Pass null to remove\n     * the image style.\n     *\n     * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n     */\n    CanvasImmediateRenderer.prototype.setImageStyle = function (imageStyle) {\n        if (!imageStyle) {\n            this.image_ = null;\n        }\n        else {\n            var imageSize = imageStyle.getSize();\n            if (!imageSize) {\n                this.image_ = null;\n            }\n            else {\n                var imageAnchor = imageStyle.getAnchor();\n                // FIXME pixel ratio\n                var imageImage = imageStyle.getImage(1);\n                var imageOrigin = imageStyle.getOrigin();\n                var imageScale = imageStyle.getScaleArray();\n                this.imageAnchorX_ = imageAnchor[0];\n                this.imageAnchorY_ = imageAnchor[1];\n                this.imageHeight_ = imageSize[1];\n                this.image_ = imageImage;\n                
 this.imageOpacity_ = imageStyle.getOpacity();\n                this.imageOriginX_ = imageOrigin[0];\n                this.imageOriginY_ = imageOrigin[1];\n                this.imageRotateWithView_ = imageStyle.getRotateWithView();\n                this.imageRotation_ = imageStyle.getRotation();\n                this.imageScale_ = [\n                    this.pixelRatio_ * imageScale[0],\n                    this.pixelRatio_ * imageScale[1],\n                ];\n                this.imageWidth_ = imageSize[0];\n            }\n        }\n    };\n    /**\n     * Set the text style for subsequent draw operations.  Pass null to\n     * remove the text style.\n     *\n     * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n     */\n    CanvasImmediateRenderer.prototype.setTextStyle = function (textStyle) {\n        if (!textStyle) {\n            this.text_ = '';\n        }\n        else {\n            var textFillStyle = textStyle.getFill();\n            if (!textFil
 lStyle) {\n                this.textFillState_ = null;\n            }\n            else {\n                var textFillStyleColor = textFillStyle.getColor();\n                this.textFillState_ = {\n                    fillStyle: asColorLike(textFillStyleColor ? textFillStyleColor : defaultFillStyle),\n                };\n            }\n            var textStrokeStyle = textStyle.getStroke();\n            if (!textStrokeStyle) {\n                this.textStrokeState_ = null;\n            }\n            else {\n                var textStrokeStyleColor = textStrokeStyle.getColor();\n                var textStrokeStyleLineCap = textStrokeStyle.getLineCap();\n                var textStrokeStyleLineDash = textStrokeStyle.getLineDash();\n                var textStrokeStyleLineDashOffset = textStrokeStyle.getLineDashOffset();\n                var textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();\n                var textStrokeStyleWidth = textStrokeStyle.getWidth();\n              
   var textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();\n                this.textStrokeState_ = {\n                    lineCap: textStrokeStyleLineCap !== undefined\n                        ? textStrokeStyleLineCap\n                        : defaultLineCap,\n                    lineDash: textStrokeStyleLineDash\n                        ? textStrokeStyleLineDash\n                        : defaultLineDash,\n                    lineDashOffset: textStrokeStyleLineDashOffset\n                        ? textStrokeStyleLineDashOffset\n                        : defaultLineDashOffset,\n                    lineJoin: textStrokeStyleLineJoin !== undefined\n                        ? textStrokeStyleLineJoin\n                        : defaultLineJoin,\n                    lineWidth: textStrokeStyleWidth !== undefined\n                        ? textStrokeStyleWidth\n                        : defaultLineWidth,\n                    miterLimit: textStrokeStyleMiterLimit !== undefined\n     
                    ? textStrokeStyleMiterLimit\n                        : defaultMiterLimit,\n                    strokeStyle: asColorLike(textStrokeStyleColor ? textStrokeStyleColor : defaultStrokeStyle),\n                };\n            }\n            var textFont = textStyle.getFont();\n            var textOffsetX = textStyle.getOffsetX();\n            var textOffsetY = textStyle.getOffsetY();\n            var textRotateWithView = textStyle.getRotateWithView();\n            var textRotation = textStyle.getRotation();\n            var textScale = textStyle.getScaleArray();\n            var textText = textStyle.getText();\n            var textTextAlign = textStyle.getTextAlign();\n            var textTextBaseline = textStyle.getTextBaseline();\n            this.textState_ = {\n                font: textFont !== undefined ? textFont : defaultFont,\n                textAlign: textTextAlign !== undefined ? textTextAlign : defaultTextAlign,\n                textBaseline: textTextBaseli
 ne !== undefined\n                    ? textTextBaseline\n                    : defaultTextBaseline,\n            };\n            this.text_ = textText !== undefined ? textText : '';\n            this.textOffsetX_ =\n                textOffsetX !== undefined ? this.pixelRatio_ * textOffsetX : 0;\n            this.textOffsetY_ =\n                textOffsetY !== undefined ? this.pixelRatio_ * textOffsetY : 0;\n            this.textRotateWithView_ =\n                textRotateWithView !== undefined ? textRotateWithView : false;\n            this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n            this.textScale_ = [\n                this.pixelRatio_ * textScale[0],\n                this.pixelRatio_ * textScale[1],\n            ];\n        }\n    };\n    return CanvasImmediateRenderer;\n}(VectorContext));\nexport default CanvasImmediateRenderer;\n//# sourceMappingURL=Immediate.js.map","/**\n * @module ol/render/canvas/BuilderType\n */\n/**\n * @enum {string}\n */
 \nexport default {\n    CIRCLE: 'Circle',\n    DEFAULT: 'Default',\n    IMAGE: 'Image',\n    LINE_STRING: 'LineString',\n    POLYGON: 'Polygon',\n    TEXT: 'Text',\n};\n//# sourceMappingURL=BuilderType.js.map","/**\n * @module ol/ImageState\n */\n/**\n * @enum {number}\n */\nexport default {\n    IDLE: 0,\n    LOADING: 1,\n    LOADED: 2,\n    ERROR: 3,\n    EMPTY: 4,\n};\n//# sourceMappingURL=ImageState.js.map","/**\n * @module ol/renderer/vector\n */\nimport BuilderType from '../render/canvas/BuilderType.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport ImageState from '../ImageState.js';\nimport { getUid } from '../util.js';\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nvar SIMPLIFY_TOLERANCE = 0.5;\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default,\n *                function(import(\"../render/canvas/BuilderGroup.js\").default, import(\"../geom/Geometry.js\").default,\n *                     
     import(\"../style/Style.js\").default, Object): void>}\n */\nvar GEOMETRY_RENDERERS = {\n    'Point': renderPointGeometry,\n    'LineString': renderLineStringGeometry,\n    'Polygon': renderPolygonGeometry,\n    'MultiPoint': renderMultiPointGeometry,\n    'MultiLineString': renderMultiLineStringGeometry,\n    'MultiPolygon': renderMultiPolygonGeometry,\n    'GeometryCollection': renderGeometryCollectionGeometry,\n    'Circle': renderCircleGeometry,\n};\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature1 Feature 1.\n * @param {import(\"../Feature.js\").FeatureLike} feature2 Feature 2.\n * @return {number} Order.\n */\nexport function defaultOrder(feature1, feature2) {\n    return parseInt(getUid(feature1), 10) - parseInt(getUid(feature2), 10);\n}\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n    var toleranc
 e = getTolerance(resolution, pixelRatio);\n    return tolerance * tolerance;\n}\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel tolerance.\n */\nexport function getTolerance(resolution, pixelRatio) {\n    return (SIMPLIFY_TOLERANCE * resolution) / pixelRatio;\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderCircleGeometry(builderGroup, geometry, style, feature) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (fillStyle || strokeStyle) {\n        var circleReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.CIRCLE);\n        circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        circ
 leReplay.drawCircle(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Transform from user to view projection.\n * @return {boolean} `true` if style is loading.\n * @template T\n */\nexport function renderFeature(replayGroup, feature, style, squaredTolerance, listener, opt_transform)
  {\n    var loading = false;\n    var imageStyle = style.getImage();\n    if (imageStyle) {\n        var imageState = imageStyle.getImageState();\n        if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n            imageStyle.unlistenImageChange(listener);\n        }\n        else {\n            if (imageState == ImageState.IDLE) {\n                imageStyle.load();\n            }\n            imageState = imageStyle.getImageState();\n            imageStyle.listenImageChange(listener);\n            loading = true;\n        }\n    }\n    renderFeatureInternal(replayGroup, feature, style, squaredTolerance, opt_transform);\n    return loading;\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\"
 ).TransformFunction} [opt_transform] Optional transform function.\n */\nfunction renderFeatureInternal(replayGroup, feature, style, squaredTolerance, opt_transform) {\n    var geometry = style.getGeometryFunction()(feature);\n    if (!geometry) {\n        return;\n    }\n    var simplifiedGeometry = geometry.simplifyTransformed(squaredTolerance, opt_transform);\n    var renderer = style.getRenderer();\n    if (renderer) {\n        renderGeometry(replayGroup, simplifiedGeometry, style, feature);\n    }\n    else {\n        var geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n        geometryRenderer(replayGroup, simplifiedGeometry, style, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\"
 ).FeatureLike} feature Feature.\n */\nfunction renderGeometry(replayGroup, geometry, style, feature) {\n    if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {\n        var geometries = /** @type {import(\"../geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            renderGeometry(replayGroup, geometries[i], style, feature);\n        }\n        return;\n    }\n    var replay = replayGroup.getBuilder(style.getZIndex(), BuilderType.DEFAULT);\n    replay.drawCustom(\n    /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry), feature, style.getRenderer());\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunct
 ion renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) {\n    var geometries = geometry.getGeometriesArray();\n    var i, ii;\n    for (i = 0, ii = geometries.length; i < ii; ++i) {\n        var geometryRenderer = GEOMETRY_RENDERERS[geometries[i].getType()];\n        geometryRenderer(replayGroup, geometries[i], style, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/LineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderLineStringGeometry(builderGroup, geometry, style, feature) {\n    var strokeStyle = style.getStroke();\n    if (strokeStyle) {\n        var lineStringReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.LINE_STRING);\n        lineStringReplay.setFillStrokeSty
 le(null, strokeStyle);\n        lineStringReplay.drawLineString(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderMultiLineStringGeometry(builderGroup, geometry, style, feature) {\n    var strokeStyle = style.getStroke();\n    if (strokeStyle) {\n        var lineStringReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.LINE_STRING);\n        lineStr
 ingReplay.setFillStrokeStyle(null, strokeStyle);\n        lineStringReplay.drawMultiLineString(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderMultiPolygonGeometry(builderGroup, geometry, style, feature) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (strokeStyle || fillStyle) {\n        var polygonReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.PO
 LYGON);\n        polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        polygonReplay.drawMultiPolygon(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderPointGeometry(builderGroup, geometry, style, feature) {\n    var imageStyle = style.getImage();\n    if (imageStyle) {\n        if (imageStyle.getImageState() != ImageState.LOADED) {\n            return;\n   
      }\n        var imageReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.IMAGE);\n        imageReplay.setImageStyle(imageStyle, builderGroup.addDeclutter(false));\n        imageReplay.drawPoint(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(!!imageStyle));\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderMultiPointGeometry(builderGroup, geometry, style, feature) {\n    var imageStyle = style.getImage();\
 n    if (imageStyle) {\n        if (imageStyle.getImageState() != ImageState.LOADED) {\n            return;\n        }\n        var imageReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.IMAGE);\n        imageReplay.setImageStyle(imageStyle, builderGroup.addDeclutter(false));\n        imageReplay.drawMultiPoint(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(!!imageStyle));\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Polygon.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfu
 nction renderPolygonGeometry(builderGroup, geometry, style, feature) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (fillStyle || strokeStyle) {\n        var polygonReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.POLYGON);\n        polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        polygonReplay.drawPolygon(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n        textReplay.drawText(geometry, feature);\n    }\n}\n//# sourceMappingURL=vector.js.map","/**\n * @module ol/render\n */\nimport CanvasImmediateRenderer from './render/canvas/Immediate.js';\nimport { DEVICE_PIXEL_RATIO } from './has.js';\nimport { apply as applyTransform, create as createTransform, multiply as multiplyTransform, scale as scaleTransfo
 rm, } from './transform.js';\nimport { getSquaredTolerance } from './renderer/vector.js';\nimport { getTransformFromProjections, getUserProjection } from './proj.js';\n/**\n * @typedef {Object} State\n * @property {CanvasRenderingContext2D} context Canvas context that the layer is being rendered to.\n * @property {import(\"./Feature.js\").FeatureLike} feature\n * @property {import(\"./geom/SimpleGeometry.js\").default} geometry\n * @property {number} pixelRatio Pixel ratio used by the layer renderer.\n * @property {number} resolution Resolution that the render batch was created and optimized for.\n * This is not the view's resolution that is being rendered.\n * @property {number} rotation Rotation of the rendered layer in radians.\n */\n/**\n * A function to be used when sorting features before rendering.\n * It takes two instances of {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and returns a `{number}`.\n *\n * @typedef {function(import(\"./Feature.js\").Featur
 eLike, import(\"./Feature.js\").FeatureLike):number} OrderFunction\n */\n/**\n * @typedef {Object} ToContextOptions\n * @property {import(\"./size.js\").Size} [size] Desired size of the canvas in css\n * pixels. When provided, both canvas and css size will be set according to the\n * `pixelRatio`. If not provided, the current canvas and css sizes will not be\n * altered.\n * @property {number} [pixelRatio=window.devicePixelRatio] Pixel ratio (canvas\n * pixel to css pixel ratio) for the canvas.\n */\n/**\n * Binds a Canvas Immediate API to a canvas context, to allow drawing geometries\n * to the context's canvas.\n *\n * The units for geometry coordinates are css pixels relative to the top left\n * corner of the canvas element.\n * ```js\n * import {toContext} from 'ol/render';\n * import Fill from 'ol/style/Fill';\n * import Polygon from 'ol/geom/Polygon';\n *\n * var canvas = document.createElement('canvas');\n * var render = toContext(canvas.getContext('2d'),\n *     { size: [100
 , 100] });\n * render.setFillStrokeStyle(new Fill({ color: blue }));\n * render.drawPolygon(\n *     new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]]));\n * ```\n *\n * @param {CanvasRenderingContext2D} context Canvas context.\n * @param {ToContextOptions=} opt_options Options.\n * @return {CanvasImmediateRenderer} Canvas Immediate.\n * @api\n */\nexport function toContext(context, opt_options) {\n    var canvas = context.canvas;\n    var options = opt_options ? opt_options : {};\n    var pixelRatio = options.pixelRatio || DEVICE_PIXEL_RATIO;\n    var size = options.size;\n    if (size) {\n        canvas.width = size[0] * pixelRatio;\n        canvas.height = size[1] * pixelRatio;\n        canvas.style.width = size[0] + 'px';\n        canvas.style.height = size[1] + 'px';\n    }\n    var extent = [0, 0, canvas.width, canvas.height];\n    var transform = scaleTransform(createTransform(), pixelRatio, pixelRatio);\n    return new CanvasImmediateRenderer(context, pixelRatio, extent, 
 transform, 0);\n}\n/**\n * Gets a vector context for drawing to the event's canvas.\n * @param {import(\"./render/Event.js\").default} event Render event.\n * @returns {CanvasImmediateRenderer} Vector context.\n * @api\n */\nexport function getVectorContext(event) {\n    var frameState = event.frameState;\n    var transform = multiplyTransform(event.inversePixelTransform.slice(), frameState.coordinateToPixelTransform);\n    var squaredTolerance = getSquaredTolerance(frameState.viewState.resolution, frameState.pixelRatio);\n    var userTransform;\n    var userProjection = getUserProjection();\n    if (userProjection) {\n        userTransform = getTransformFromProjections(userProjection, frameState.viewState.projection);\n    }\n    return new CanvasImmediateRenderer(event.context, frameState.pixelRatio, frameState.extent, transform, frameState.viewState.rotation, squaredTolerance, userTransform);\n}\n/**\n * Gets the pixel of the event's canvas context from the map viewport's CSS pix
 el.\n * @param {import(\"./render/Event.js\").default} event Render event.\n * @param {import(\"./pixel.js\").Pixel} pixel CSS pixel relative to the top-left\n * corner of the map viewport.\n * @returns {import(\"./pixel.js\").Pixel} Pixel on the event's canvas context.\n * @api\n */\nexport function getRenderPixel(event, pixel) {\n    var result = pixel.slice(0);\n    applyTransform(event.inversePixelTransform.slice(), result);\n    return result;\n}\n/**\n * @param {import(\"./PluggableMap.js\").FrameState} frameState Frame state.\n * @param {?} declutterTree Declutter tree.\n * @returns {?} Declutter tree.\n */\nexport function renderDeclutterItems(frameState, declutterTree) {\n    if (declutterTree) {\n        declutterTree.clear();\n    }\n    var items = frameState.declutterItems;\n    for (var z = items.length - 1; z >= 0; --z) {\n        var item = items[z];\n        var zIndexItems = item.items;\n        for (var i = 0, ii = zIndexItems.length; i < ii; i += 3) {\n          
   declutterTree = zIndexItems[i].renderDeclutter(zIndexItems[i + 1], zIndexItems[i + 2], item.opacity, declutterTree);\n        }\n    }\n    items.length = 0;\n    return declutterTree;\n}\n//# sourceMappingURL=render.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Map\n */\nimport Disposable from '../Disposable.js';\nimport { TRUE } from '../functions.js';\nimport { abstract } from '../util.js';\nimport 
 { compose as composeTransform, makeInverse } from '../transform.js';\nimport { getWidth } from '../extent.js';\nimport { shared as iconImageCache } from '../style/IconImageCache.js';\nimport { inView } from '../layer/Layer.js';\nimport { renderDeclutterItems } from '../render.js';\nimport { wrapX } from '../coordinate.js';\n/**\n * @abstract\n */\nvar MapRenderer = /** @class */ (function (_super) {\n    __extends(MapRenderer, _super);\n    /**\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    function MapRenderer(map) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = map;\n        /**\n         * @private\n         */\n        _this.declutterTree_ = null;\n        return _this;\n    }\n    /**\n     * @abstract\n     * @param {import(\"../render/EventType.js\").default} type Event type.\n     * @param {import(\"../PluggableMap.
 js\").FrameState} frameState Frame state.\n     */\n    MapRenderer.prototype.dispatchRenderEvent = function (type, frameState) {\n        abstract();\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @protected\n     */\n    MapRenderer.prototype.calculateMatrices2D = function (frameState) {\n        var viewState = frameState.viewState;\n        var coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n        var pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n        composeTransform(coordinateToPixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / viewState.resolution, -1 / viewState.resolution, -viewState.rotation, -viewState.center[0], -viewState.center[1]);\n        makeInverse(pixelToCoordinateTransform, coordinateToPixelTransform);\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.
 js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {boolean} checkWrapped Check for wrapped geometries.\n     * @param {function(this: S, import(\"../Feature.js\").FeatureLike,\n     *     import(\"../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {S} thisArg Value to use as `this` when executing `callback`.\n     * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n     * @return {T|undefined} Callback result.\n     * @template S,T,U\n     */\n    MapRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, checkWrapped, callback, t
 hisArg, layerFilter, thisArg2) {\n        var result;\n        var viewState = frameState.viewState;\n        /**\n         * @param {boolean} managed Managed layer.\n         * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n         * @param {import(\"../layer/Layer.js\").default} layer Layer.\n         * @return {?} Callback result.\n         */\n        function forEachFeatureAtCoordinate(managed, feature, layer) {\n            return callback.call(thisArg, feature, managed ? layer : null);\n        }\n        var projection = viewState.projection;\n        var translatedCoordinate = wrapX(coordinate.slice(), projection);\n        var offsets = [[0, 0]];\n        if (projection.canWrapX() && checkWrapped) {\n            var projectionExtent = projection.getExtent();\n            var worldWidth = getWidth(projectionExtent);\n            offsets.push([-worldWidth, 0], [worldWidth, 0]);\n        }\n        var layerStates = frameState.layerStatesArray;\n        var
  numLayers = layerStates.length;\n        var declutteredFeatures;\n        if (this.declutterTree_) {\n            declutteredFeatures = this.declutterTree_.all().map(function (entry) {\n                return entry.value;\n            });\n        }\n        var tmpCoord = [];\n        for (var i = 0; i < offsets.length; i++) {\n            for (var j = numLayers - 1; j >= 0; --j) {\n                var layerState = layerStates[j];\n                var layer = /** @type {import(\"../layer/Layer.js\").default} */ (layerState.layer);\n                if (layer.hasRenderer() &&\n                    inView(layerState, viewState) &&\n                    layerFilter.call(thisArg2, layer)) {\n                    var layerRenderer = layer.getRenderer();\n                    var source = layer.getSource();\n                    if (layerRenderer && source) {\n                        var coordinates = source.getWrapX()\n                            ? translatedCoordinate\n                    
         : coordinate;\n                        var callback_1 = forEachFeatureAtCoordinate.bind(null, layerState.managed);\n                        tmpCoord[0] = coordinates[0] + offsets[i][0];\n                        tmpCoord[1] = coordinates[1] + offsets[i][1];\n                        result = layerRenderer.forEachFeatureAtCoordinate(tmpCoord, frameState, hitTolerance, callback_1, declutteredFeatures);\n                    }\n                    if (result) {\n                        return result;\n                    }\n                }\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @abstract\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n     *     callback.\n     * @param {fu
 nction(import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    MapRenderer.prototype.forEachLayerAtPixel = function (pixel, frameState, hitTolerance, callback, layerFilter) {\n        return abstract();\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {boolean} checkWrapped Check for wrapped geometries.\n     * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n 
     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @param {U} thisArg Value to use as `this` when executing `layerFilter`.\n     * @return {boolean} Is there a feature at the given coordinate?\n     * @template U\n     */\n    MapRenderer.prototype.hasFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, checkWrapped, layerFilter, thisArg) {\n        var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, checkWrapped, TRUE, this, layerFilter, thisArg);\n        return hasFeature !== undefined;\n    };\n    /**\n     * @return {import(\"../PluggableMap.js\").default} Map.\n     */\n    MapRenderer.prototype.getMap = function () {\n        return this.map_;\n    };\n    /**\n     * Render.\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    MapRenderer.prototype.renderFrame = function (frameState) {\n        this.declutter
 Tree_ = renderDeclutterItems(frameState, this.declutterTree_);\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    MapRenderer.prototype.scheduleExpireIconCache = function (frameState) {\n        if (iconImageCache.canExpireCache()) {\n            frameState.postRenderFunctions.push(expireIconCache);\n        }\n    };\n    return MapRenderer;\n}(Disposable));\n/**\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\nfunction expireIconCache(map, frameState) {\n    iconImageCache.expire();\n}\nexport default MapRenderer;\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/render/Event\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d
 .__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Event from '../events/Event.js';\nvar RenderEvent = /** @class */ (function (_super) {\n    __extends(RenderEvent, _super);\n    /**\n     * @param {import(\"./EventType.js\").default} type Type.\n     * @param {import(\"../transform.js\").Transform=} opt_inversePixelTransform Transform for\n     *     CSS pixels to rendered pixels.\n     * @param {import(\"../PluggableMap.js\").FrameState=} opt_frameState Frame state.\n     * @param {?CanvasRenderingContext2D=} opt_context Context.\n     */\n    function RenderEvent(type, opt_inversePixelTransform, opt_frameState, opt_context) {\n        var _this = _super
 .call(this, type) || this;\n        /**\n         * Transform from CSS pixels (relative to the top-left corner of the map viewport)\n         * to rendered pixels on this event's `context`.\n         * @type {import(\"../transform.js\").Transform|undefined}\n         * @api\n         */\n        _this.inversePixelTransform = opt_inversePixelTransform;\n        /**\n         * An object representing the current render frame state.\n         * @type {import(\"../PluggableMap.js\").FrameState|undefined}\n         * @api\n         */\n        _this.frameState = opt_frameState;\n        /**\n         * Canvas context. Not available when the event is dispatched by the map. Only available\n         * when a Canvas renderer is used, null otherwise.\n         * @type {CanvasRenderingContext2D|null|undefined}\n         * @api\n         */\n        _this.context = opt_context;\n        return _this;\n    }\n    return RenderEvent;\n}(Event));\nexport default RenderEvent;\n//# sourceMappingURL=
 Event.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Composite\n */\nimport MapRenderer from './Map.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RenderEvent from '../render/Event.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\nimport { CLASS_UNSELECTABLE } from '../css.js';\nimport { checkedFonts } from '../render/canvas.js'
 ;\nimport { inView } from '../layer/Layer.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { replaceChildren } from '../dom.js';\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nvar CompositeMapRenderer = /** @class */ (function (_super) {\n    __extends(CompositeMapRenderer, _super);\n    /**\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    function CompositeMapRenderer(map) {\n        var _this = _super.call(this, map) || this;\n        /**\n         * @type {import(\"../events.js\").EventsKey}\n         */\n        _this.fontChangeListenerKey_ = listen(checkedFonts, ObjectEventType.PROPERTYCHANGE, map.redrawText.bind(map));\n        /**\n         * @private\n         * @type {HTMLDivElement}\n         */\n        _this.element_ = document.createElement('div');\n        var style = _this.element_.style;\n        style.position = 'absolute';\n        style.width = '100%';\n        style.height = '100%';\n        style.zInd
 ex = '0';\n        _this.element_.className = CLASS_UNSELECTABLE + ' ol-layers';\n        var container = map.getViewport();\n        container.insertBefore(_this.element_, container.firstChild || null);\n        /**\n         * @private\n         * @type {Array<HTMLElement>}\n         */\n        _this.children_ = [];\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderedVisible_ = true;\n        return _this;\n    }\n    /**\n     * @param {import(\"../render/EventType.js\").default} type Event type.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    CompositeMapRenderer.prototype.dispatchRenderEvent = function (type, frameState) {\n        var map = this.getMap();\n        if (map.hasListener(type)) {\n            var event_1 = new RenderEvent(type, undefined, frameState);\n            map.dispatchEvent(event_1);\n        }\n    };\n    CompositeMapRenderer.prototype.disposeInternal = functi
 on () {\n        unlistenByKey(this.fontChangeListenerKey_);\n        this.element_.parentNode.removeChild(this.element_);\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Render.\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    CompositeMapRenderer.prototype.renderFrame = function (frameState) {\n        if (!frameState) {\n            if (this.renderedVisible_) {\n                this.element_.style.display = 'none';\n                this.renderedVisible_ = false;\n            }\n            return;\n        }\n        this.calculateMatrices2D(frameState);\n        this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n        var layerStatesArray = frameState.layerStatesArray.sort(function (a, b) {\n            return a.zIndex - b.zIndex;\n        });\n        var viewState = frameState.viewState;\n        this.children_.length = 0;\n        var previousElement = null;\n        for (var i =
  0, ii = layerStatesArray.length; i < ii; ++i) {\n            var layerState = layerStatesArray[i];\n            frameState.layerIndex = i;\n            if (!inView(layerState, viewState) ||\n                (layerState.sourceState != SourceState.READY &&\n                    layerState.sourceState != SourceState.UNDEFINED)) {\n                continue;\n            }\n            var layer = layerState.layer;\n            var element = layer.render(frameState, previousElement);\n            if (!element) {\n                continue;\n            }\n            if (element !== previousElement) {\n                this.children_.push(element);\n                previousElement = element;\n            }\n        }\n        _super.prototype.renderFrame.call(this, frameState);\n        replaceChildren(this.element_, this.children_);\n        this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n        if (!this.renderedVisible_) {\n            this.element_.style.display = 
 '';\n            this.renderedVisible_ = true;\n        }\n        this.scheduleExpireIconCache(frameState);\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n     *     callback.\n     * @param {function(import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    CompositeMapRenderer.prototype.forEachLayerAtPixel = function (pixel, frameState, hitTolerance, callback, layerFilter) {\n        var viewState = frameSta
 te.viewState;\n        var layerStates = frameState.layerStatesArray;\n        var numLayers = layerStates.length;\n        for (var i = numLayers - 1; i >= 0; --i) {\n            var layerState = layerStates[i];\n            var layer = layerState.layer;\n            if (layer.hasRenderer() &&\n                inView(layerState, viewState) &&\n                layerFilter(layer)) {\n                var layerRenderer = layer.getRenderer();\n                var data = layerRenderer.getDataAtPixel(pixel, frameState, hitTolerance);\n                if (data) {\n                    var result = callback(layer, data);\n                    if (result) {\n                        return result;\n                    }\n                }\n            }\n        }\n        return undefined;\n    };\n    return CompositeMapRenderer;\n}(MapRenderer));\nexport default CompositeMapRenderer;\n//# sourceMappingURL=Composite.js.map","var __extends = (this && this.__extends) || (function () {\n    var 
 extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Group\n */\nimport BaseLayer from './Base.js';\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport EventType from '../events/EventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport SourceState from '../source/State.js';\nimport { assert } from '../asserts.js';\nimport { assign, clear } from '../obj.js';\nimport { getChangeEventType } from '../Object.js';\n
 import { getIntersection } from '../extent.js';\nimport { getUid } from '../util.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\
 n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<import(\"./Base.js\").default>|import(\"../Collection.js\").default<import(\"./Base.js\").default>} [layers] Child layers.\n */\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    LAYERS: 'layers',\n};\n/**\n * @classdesc\n * A {@link module:ol/Collection~Collection} of layers that are handled together.\n *\n * A generic `change` event is triggered when the group/Collection changes.\n *\n * @api\n */\nvar LayerGroup = /** @class */ (function (_super) {\n    __extends(LayerGroup, _super);\n    /**
 \n     * @param {Options=} opt_options Layer options.\n     */\n    function LayerGroup(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        var baseOptions = /** @type {Options} */ (assign({}, options));\n        delete baseOptions.layers;\n        var layers = options.layers;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @type {Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.layersListenerKeys_ = [];\n        /**\n         * @private\n         * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n         */\n        _this.listenerKeys_ = {};\n        _this.addEventListener(getChangeEventType(Property.LAYERS), _this.handleLayersChanged_);\n        if (layers) {\n            if (Array.isArray(layers)) {\n                layers = new Collection(layers.slice(), { unique: true });\n            }\n            else {\n                assert(typeof ( /** 
 @type {?} */(layers).getArray) === 'function', 43); // Expected `layers` to be an array or a `Collection`\n            }\n        }\n        else {\n            layers = new Collection(undefined, { unique: true });\n        }\n        _this.setLayers(layers);\n        return _this;\n    }\n    /**\n     * @private\n     */\n    LayerGroup.prototype.handleLayerChange_ = function () {\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    LayerGroup.prototype.handleLayersChanged_ = function () {\n        this.layersListenerKeys_.forEach(unlistenByKey);\n        this.layersListenerKeys_.length = 0;\n        var layers = this.getLayers();\n        this.layersListenerKeys_.push(listen(layers, CollectionEventType.ADD, this.handleLayersAdd_, this), listen(layers, CollectionEventType.REMOVE, this.handleLayersRemove_, this));\n        for (var id in this.listenerKeys_) {\n            this.listenerKeys_[id].forEach(unlistenByKey);\n        }\n        clear(this.listenerKeys_
 );\n        var layersArray = layers.getArray();\n        for (var i = 0, ii = layersArray.length; i < ii; i++) {\n            var layer = layersArray[i];\n            this.listenerKeys_[getUid(layer)] = [\n                listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),\n                listen(layer, EventType.CHANGE, this.handleLayerChange_, this),\n            ];\n        }\n        this.changed();\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n     * @private\n     */\n    LayerGroup.prototype.handleLayersAdd_ = function (collectionEvent) {\n        var layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n        this.listenerKeys_[getUid(layer)] = [\n            listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),\n            listen(layer, EventType.CHANGE, this.handleLayerChange_, this),\n        ];\n        this.changed();\n    }
 ;\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n     * @private\n     */\n    LayerGroup.prototype.handleLayersRemove_ = function (collectionEvent) {\n        var layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n        var key = getUid(layer);\n        this.listenerKeys_[key].forEach(unlistenByKey);\n        delete this.listenerKeys_[key];\n        this.changed();\n    };\n    /**\n     * Returns the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n     * in this group.\n     * @return {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} Collection of\n     *   {@link module:ol/layer/Base layers} that are part of this group.\n     * @observable\n     * @api\n     */\n    LayerGroup.prototype.getLayers = function () {\n        return /** @type {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} */ (this.get(Property.LAY
 ERS));\n    };\n    /**\n     * Set the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n     * in this group.\n     * @param {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} layers Collection of\n     *   {@link module:ol/layer/Base layers} that are part of this group.\n     * @observable\n     * @api\n     */\n    LayerGroup.prototype.setLayers = function (layers) {\n        this.set(Property.LAYERS, layers);\n    };\n    /**\n     * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n     */\n    LayerGroup.prototype.getLayersArray = function (opt_array) {\n        var array = opt_array !== undefined ? opt_array : [];\n        this.getLayers().forEach(function (layer) {\n            layer.getLayersArray(array);\n        });\n        return array;\n    };\n    /**\n     * @param {Array<import(\"./Laye
 r.js\").State>=} opt_states Optional list of layer states (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n     */\n    LayerGroup.prototype.getLayerStatesArray = function (opt_states) {\n        var states = opt_states !== undefined ? opt_states : [];\n        var pos = states.length;\n        this.getLayers().forEach(function (layer) {\n            layer.getLayerStatesArray(states);\n        });\n        var ownLayerState = this.getLayerState();\n        for (var i = pos, ii = states.length; i < ii; i++) {\n            var layerState = states[i];\n            layerState.opacity *= ownLayerState.opacity;\n            layerState.visible = layerState.visible && ownLayerState.visible;\n            layerState.maxResolution = Math.min(layerState.maxResolution, ownLayerState.maxResolution);\n            layerState.minResolution = Math.max(layerState.minResolution, ownLayerState.minResolution);\n            layerState.minZoom = Math.m
 ax(layerState.minZoom, ownLayerState.minZoom);\n            layerState.maxZoom = Math.min(layerState.maxZoom, ownLayerState.maxZoom);\n            if (ownLayerState.extent !== undefined) {\n                if (layerState.extent !== undefined) {\n                    layerState.extent = getIntersection(layerState.extent, ownLayerState.extent);\n                }\n                else {\n                    layerState.extent = ownLayerState.extent;\n                }\n            }\n        }\n        return states;\n    };\n    /**\n     * @return {import(\"../source/State.js\").default} Source state.\n     */\n    LayerGroup.prototype.getSourceState = function () {\n        return SourceState.READY;\n    };\n    return LayerGroup;\n}(BaseLayer));\nexport default LayerGroup;\n//# sourceMappingURL=Group.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto_
 _: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/MapEvent\n */\nimport Event from './events/Event.js';\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map event.\n */\nvar MapEvent = /** @class */ (function (_super) {\n    __extends(MapEvent, _super);\n    /**\n     * @param {string} type Event type.\n     * @param {import(\"./PluggableMap.js\").default} map Map.\n     * @param {?import(\"./PluggableMap.js\").FrameState=} opt_frameState Frame state.\n     */\n    function MapEvent(type, 
 map, opt_frameState) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The map where the event occurred.\n         * @type {import(\"./PluggableMap.js\").default}\n         * @api\n         */\n        _this.map = map;\n        /**\n         * The frame state at the time of the event.\n         * @type {?import(\"./PluggableMap.js\").FrameState}\n         * @api\n         */\n        _this.frameState = opt_frameState !== undefined ? opt_frameState : null;\n        return _this;\n    }\n    return MapEvent;\n}(Event));\nexport default MapEvent;\n//# sourceMappingURL=MapEvent.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    
 };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/MapBrowserEvent\n */\nimport MapEvent from './MapEvent.js';\n/**\n * @classdesc\n * Events emitted as map browser events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map browser event.\n * @template {UIEvent} EVENT\n */\nvar MapBrowserEvent = /** @class */ (function (_super) {\n    __extends(MapBrowserEvent, _super);\n    /**\n     * @param {string} type Event type.\n     * @param {import(\"./PluggableMap.js\").default} map Map.\n     * @param {EVENT} originalEvent Original event.\n     * @param {boolean=} opt_dragging Is the map currently being dragged?\n     * @param {?import(\"./PluggableMap.js\").FrameState=} opt_frameState Frame state.\n     */\n    function MapBrowserEvent(type,
  map, originalEvent, opt_dragging, opt_frameState) {\n        var _this = _super.call(this, type, map, opt_frameState) || this;\n        /**\n         * The original browser event.\n         * @const\n         * @type {EVENT}\n         * @api\n         */\n        _this.originalEvent = originalEvent;\n        /**\n         * The map pixel relative to the viewport corresponding to the original browser event.\n         * @type {?import(\"./pixel.js\").Pixel}\n         */\n        _this.pixel_ = null;\n        /**\n         * The coordinate in the user projection corresponding to the original browser event.\n         * @type {?import(\"./coordinate.js\").Coordinate}\n         */\n        _this.coordinate_ = null;\n        /**\n         * Indicates if the map is currently being dragged. Only set for\n         * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.\n         *\n         * @type {boolean}\n         * @api\n         */\n        _this.dragging = opt_dragging !== undef
 ined ? opt_dragging : false;\n        return _this;\n    }\n    Object.defineProperty(MapBrowserEvent.prototype, \"pixel\", {\n        /**\n         * The map pixel relative to the viewport corresponding to the original event.\n         * @type {import(\"./pixel.js\").Pixel}\n         * @api\n         */\n        get: function () {\n            if (!this.pixel_) {\n                this.pixel_ = this.map.getEventPixel(this.originalEvent);\n            }\n            return this.pixel_;\n        },\n        set: function (pixel) {\n            this.pixel_ = pixel;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MapBrowserEvent.prototype, \"coordinate\", {\n        /**\n         * The coordinate corresponding to the original browser event.  This will be in the user\n         * projection if one is set.  Otherwise it will be in the view projection.\n         * @type {import(\"./coordinate.js\").Coordinate}\n         * @api\n       
   */\n        get: function () {\n            if (!this.coordinate_) {\n                this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel);\n            }\n            return this.coordinate_;\n        },\n        set: function (coordinate) {\n            this.coordinate_ = coordinate;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    /**\n     * Prevents the default browser action.\n     * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.\n     * @api\n     */\n    MapBrowserEvent.prototype.preventDefault = function () {\n        _super.prototype.preventDefault.call(this);\n        this.originalEvent.preventDefault();\n    };\n    /**\n     * Prevents further propagation of the current event.\n     * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.\n     * @api\n     */\n    MapBrowserEvent.prototype.stopPropagation = function () {\n        _super.prototype.stopPropagation.call(this);\n 
        this.originalEvent.stopPropagation();\n    };\n    return MapBrowserEvent;\n}(MapEvent));\nexport default MapBrowserEvent;\n//# sourceMappingURL=MapBrowserEvent.js.map","/**\n * @module ol/MapBrowserEventType\n */\nimport EventType from './events/EventType.js';\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n    /**\n     * A true single click with no dragging and no double click. Note that this\n     * event is delayed by 250 ms to ensure that it is not a double click.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick\n     * @api\n     */\n    SINGLECLICK: 'singleclick',\n    /**\n     * A click with no dragging. A double click will fire two of this.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#click\n     * @api\n     */\n    CLICK: EventType.CLICK,\n    /**\n     * A true double click, with no dragging.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n     * @api\n     */\n    DBLCLICK: EventT
 ype.DBLCLICK,\n    /**\n     * Triggered when a pointer is dragged.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n     * @api\n     */\n    POINTERDRAG: 'pointerdrag',\n    /**\n     * Triggered when a pointer is moved. Note that on touch devices this is\n     * triggered when the map is panned, so is not the same as mousemove.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove\n     * @api\n     */\n    POINTERMOVE: 'pointermove',\n    POINTERDOWN: 'pointerdown',\n    POINTERUP: 'pointerup',\n    POINTEROVER: 'pointerover',\n    POINTEROUT: 'pointerout',\n    POINTERENTER: 'pointerenter',\n    POINTERLEAVE: 'pointerleave',\n    POINTERCANCEL: 'pointercancel',\n};\n//# sourceMappingURL=MapBrowserEventType.js.map","/**\n * @module ol/pointer/EventType\n */\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n    POINTERMOVE: 'pointermove',\n    POINTERDOWN: 'pointerdown',\n    POINTERUP: 'pointerup',\n    POINTEROVER
 : 'pointerover',\n    POINTEROUT: 'pointerout',\n    POINTERENTER: 'pointerenter',\n    POINTERLEAVE: 'pointerleave',\n    POINTERCANCEL: 'pointercancel',\n};\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/MapBrowserEventHandler\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nim
 port MapBrowserEventType from './MapBrowserEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport { DEVICE_PIXEL_RATIO, PASSIVE_EVENT_LISTENERS } from './has.js';\nimport { listen, unlistenByKey } from './events.js';\nvar MapBrowserEventHandler = /** @class */ (function (_super) {\n    __extends(MapBrowserEventHandler, _super);\n    /**\n     * @param {import(\"./PluggableMap.js\").default} map The map with the viewport to listen to events on.\n     * @param {number=} moveTolerance The minimal distance the pointer must travel to trigger a move.\n     */\n    function MapBrowserEventHandler(map, moveTolerance) {\n        var _this = _super.call(this, map) || this;\n        /**\n         * This is the element that we will listen to the real events on.\n         * @type {import(\"./PluggableMap.js\").default}\n         * @private\n         */\n        _this.map_ = map;\n        /**\n         * @type {any}\n         * @private\n         */\n        _this.clickTim
 eoutId_;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.dragging_ = false;\n        /**\n         * @type {!Array<import(\"./events.js\").EventsKey>}\n         * @private\n         */\n        _this.dragListenerKeys_ = [];\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.moveTolerance_ = moveTolerance\n            ? moveTolerance * DEVICE_PIXEL_RATIO\n            : DEVICE_PIXEL_RATIO;\n        /**\n         * The most recent \"down\" type event (or null if none have occurred).\n         * Set on pointerdown.\n         * @type {PointerEvent}\n         * @private\n         */\n        _this.down_ = null;\n        var element = _this.map_.getViewport();\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.activePointers_ = 0;\n        /**\n         * @type {!Object<number, boolean>}\n         * @private\n         */\n        _this.trackedTouches_ = {};\n        _this.e
 lement_ = element;\n        /**\n         * @type {?import(\"./events.js\").EventsKey}\n         * @private\n         */\n        _this.pointerdownListenerKey_ = listen(element, PointerEventType.POINTERDOWN, _this.handlePointerDown_, _this);\n        /**\n         * @type {PointerEvent}\n         * @private\n         */\n        _this.originalPointerMoveEvent_;\n        /**\n         * @type {?import(\"./events.js\").EventsKey}\n         * @private\n         */\n        _this.relayedListenerKey_ = listen(element, PointerEventType.POINTERMOVE, _this.relayEvent_, _this);\n        /**\n         * @private\n         */\n        _this.boundHandleTouchMove_ = _this.handleTouchMove_.bind(_this);\n        _this.element_.addEventListener(EventType.TOUCHMOVE, _this.boundHandleTouchMove_, PASSIVE_EVENT_LISTENERS ? { passive: false } : false);\n        return _this;\n    }\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHa
 ndler.prototype.emulateClick_ = function (pointerEvent) {\n        var newEvent = new MapBrowserEvent(MapBrowserEventType.CLICK, this.map_, pointerEvent);\n        this.dispatchEvent(newEvent);\n        if (this.clickTimeoutId_ !== undefined) {\n            // double-click\n            clearTimeout(this.clickTimeoutId_);\n            this.clickTimeoutId_ = undefined;\n            newEvent = new MapBrowserEvent(MapBrowserEventType.DBLCLICK, this.map_, pointerEvent);\n            this.dispatchEvent(newEvent);\n        }\n        else {\n            // click\n            this.clickTimeoutId_ = setTimeout(function () {\n                this.clickTimeoutId_ = undefined;\n                var newEvent = new MapBrowserEvent(MapBrowserEventType.SINGLECLICK, this.map_, pointerEvent);\n                this.dispatchEvent(newEvent);\n            }.bind(this), 250);\n        }\n    };\n    /**\n     * Keeps track on how many pointers are currently active.\n     *\n     * @param {PointerEvent} poi
 nterEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.updateActivePointers_ = function (pointerEvent) {\n        var event = pointerEvent;\n        if (event.type == MapBrowserEventType.POINTERUP ||\n            event.type == MapBrowserEventType.POINTERCANCEL) {\n            delete this.trackedTouches_[event.pointerId];\n        }\n        else if (event.type == MapBrowserEventType.POINTERDOWN) {\n            this.trackedTouches_[event.pointerId] = true;\n        }\n        this.activePointers_ = Object.keys(this.trackedTouches_).length;\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handlePointerUp_ = function (pointerEvent) {\n        this.updateActivePointers_(pointerEvent);\n        var newEvent = new MapBrowserEvent(MapBrowserEventType.POINTERUP, this.map_, pointerEvent);\n        this.dispatchEvent(newEvent);\n        // We emulate clic
 k events on left mouse button click, touch contact, and pen\n        // contact. isMouseActionButton returns true in these cases (evt.button is set\n        // to 0).\n        // See http://www.w3.org/TR/pointerevents/#button-states\n        // We only fire click, singleclick, and doubleclick if nobody has called\n        // event.stopPropagation() or event.preventDefault().\n        if (!newEvent.propagationStopped &&\n            !this.dragging_ &&\n            this.isMouseActionButton_(pointerEvent)) {\n            this.emulateClick_(this.down_);\n        }\n        if (this.activePointers_ === 0) {\n            this.dragListenerKeys_.forEach(unlistenByKey);\n            this.dragListenerKeys_.length = 0;\n            this.dragging_ = false;\n            this.down_ = null;\n        }\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @return {boolean} If the left mouse button was pressed.\n     * @private\n     */\n    MapBrowserEventHandle
 r.prototype.isMouseActionButton_ = function (pointerEvent) {\n        return pointerEvent.button === 0;\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handlePointerDown_ = function (pointerEvent) {\n        this.updateActivePointers_(pointerEvent);\n        var newEvent = new MapBrowserEvent(MapBrowserEventType.POINTERDOWN, this.map_, pointerEvent);\n        this.dispatchEvent(newEvent);\n        this.down_ = pointerEvent;\n        if (this.dragListenerKeys_.length === 0) {\n            this.dragListenerKeys_.push(listen(document, MapBrowserEventType.POINTERMOVE, this.handlePointerMove_, this), listen(document, MapBrowserEventType.POINTERUP, this.handlePointerUp_, this), \n            /* Note that the listener for `pointercancel is set up on\n             * `pointerEventHandler_` and not `documentPointerEventHandler_` like\n             * the `pointerup` and `pointermove` listeners.\n
              *\n             * The reason for this is the following: `TouchSource.vacuumTouches_()`\n             * issues `pointercancel` events, when there was no `touchend` for a\n             * `touchstart`. Now, let's say a first `touchstart` is registered on\n             * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.\n             * But `documentPointerEventHandler_` doesn't know about the first\n             * `touchstart`. If there is no `touchend` for the `touchstart`, we can\n             * only receive a `touchcancel` from `pointerEventHandler_`, because it is\n             * only registered there.\n             */\n            listen(this.element_, MapBrowserEventType.POINTERCANCEL, this.handlePointerUp_, this));\n            if (this.element_.getRootNode &&\n                this.element_.getRootNode() !== document) {\n                this.dragListenerKeys_.push(listen(this.element_.getRootNode(), MapBrowserEventType.POINTERUP, this.handlePointe
 rUp_, this));\n            }\n        }\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handlePointerMove_ = function (pointerEvent) {\n        // Between pointerdown and pointerup, pointermove events are triggered.\n        // To avoid a 'false' touchmove event to be dispatched, we test if the pointer\n        // moved a significant distance.\n        if (this.isMoving_(pointerEvent)) {\n            this.dragging_ = true;\n            var newEvent = new MapBrowserEvent(MapBrowserEventType.POINTERDRAG, this.map_, pointerEvent, this.dragging_);\n            this.dispatchEvent(newEvent);\n        }\n    };\n    /**\n     * Wrap and relay a pointer event.  Note that this requires that the type\n     * string for the MapBrowserEvent matches the PointerEvent type.\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototyp
 e.relayEvent_ = function (pointerEvent) {\n        this.originalPointerMoveEvent_ = pointerEvent;\n        var dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n        this.dispatchEvent(new MapBrowserEvent(pointerEvent.type, this.map_, pointerEvent, dragging));\n    };\n    /**\n     * Flexible handling of a `touch-action: none` css equivalent: because calling\n     * `preventDefault()` on a `pointermove` event does not stop native page scrolling\n     * and zooming, we also listen for `touchmove` and call `preventDefault()` on it\n     * when an interaction (currently `DragPan` handles the event.\n     * @param {TouchEvent} event Event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handleTouchMove_ = function (event) {\n        // Due to https://github.com/mpizenberg/elm-pep/issues/2, `this.originalPointerMoveEvent_`\n        // may not be initialized yet when we get here on a platform without native pointer events.\n        if (!this.originalPointerMo
 veEvent_ ||\n            this.originalPointerMoveEvent_.defaultPrevented) {\n            event.preventDefault();\n        }\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @return {boolean} Is moving.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.isMoving_ = function (pointerEvent) {\n        return (this.dragging_ ||\n            Math.abs(pointerEvent.clientX - this.down_.clientX) >\n                this.moveTolerance_ ||\n            Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_);\n    };\n    /**\n     * Clean up.\n     */\n    MapBrowserEventHandler.prototype.disposeInternal = function () {\n        if (this.relayedListenerKey_) {\n            unlistenByKey(this.relayedListenerKey_);\n            this.relayedListenerKey_ = null;\n        }\n        this.element_.removeEventListener(EventType.TOUCHMOVE, this.boundHandleTouchMove_);\n        if (this.pointerdownListenerKey_) {\n            unl
 istenByKey(this.pointerdownListenerKey_);\n            this.pointerdownListenerKey_ = null;\n        }\n        this.dragListenerKeys_.forEach(unlistenByKey);\n        this.dragListenerKeys_.length = 0;\n        this.element_ = null;\n        _super.prototype.disposeInternal.call(this);\n    };\n    return MapBrowserEventHandler;\n}(EventTarget));\nexport default MapBrowserEventHandler;\n//# sourceMappingURL=MapBrowserEventHandler.js.map","/**\n * @module ol/MapEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered after a map frame is rendered.\n     * @event module:ol/MapEvent~MapEvent#postrender\n     * @api\n     */\n    POSTRENDER: 'postrender',\n    /**\n     * Triggered when the map starts moving.\n     * @event module:ol/MapEvent~MapEvent#movestart\n     * @api\n     */\n    MOVESTART: 'movestart',\n    /**\n     * Triggered after the map is moved.\n     * @event module:ol/MapEvent~MapEvent#moveend\n     * @api\n     */\n    MOVEEND: 'moveen
 d',\n};\n//# sourceMappingURL=MapEventType.js.map","/**\n * @module ol/MapProperty\n */\n/**\n * @enum {string}\n */\nexport default {\n    LAYERGROUP: 'layergroup',\n    SIZE: 'size',\n    TARGET: 'target',\n    VIEW: 'view',\n};\n//# sourceMappingURL=MapProperty.js.map","/**\n * @module ol/structs/PriorityQueue\n */\nimport { assert } from '../asserts.js';\nimport { clear } from '../obj.js';\n/**\n * @type {number}\n */\nexport var DROP = Infinity;\n/**\n * @classdesc\n * Priority queue.\n *\n * The implementation is inspired from the Closure Library's Heap class and\n * Python's heapq module.\n *\n * See http://closure-library.googlecode.com/svn/docs/closure_goog_structs_heap.js.source.html\n * and http://hg.python.org/cpython/file/2.7/Lib/heapq.py.\n *\n * @template T\n */\nvar PriorityQueue = /** @class */ (function () {\n    /**\n     * @param {function(T): number} priorityFunction Priority function.\n     * @param {function(T): string} keyFunction Key function.\n     */\n    
 function PriorityQueue(priorityFunction, keyFunction) {\n        /**\n         * @type {function(T): number}\n         * @private\n         */\n        this.priorityFunction_ = priorityFunction;\n        /**\n         * @type {function(T): string}\n         * @private\n         */\n        this.keyFunction_ = keyFunction;\n        /**\n         * @type {Array<T>}\n         * @private\n         */\n        this.elements_ = [];\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        this.priorities_ = [];\n        /**\n         * @type {!Object<string, boolean>}\n         * @private\n         */\n        this.queuedElements_ = {};\n    }\n    /**\n     * FIXME empty description for jsdoc\n     */\n    PriorityQueue.prototype.clear = function () {\n        this.elements_.length = 0;\n        this.priorities_.length = 0;\n        clear(this.queuedElements_);\n    };\n    /**\n     * Remove and return the highest-priority element. O(log N).\n     * @retu
 rn {T} Element.\n     */\n    PriorityQueue.prototype.dequeue = function () {\n        var elements = this.elements_;\n        var priorities = this.priorities_;\n        var element = elements[0];\n        if (elements.length == 1) {\n            elements.length = 0;\n            priorities.length = 0;\n        }\n        else {\n            elements[0] = elements.pop();\n            priorities[0] = priorities.pop();\n            this.siftUp_(0);\n        }\n        var elementKey = this.keyFunction_(element);\n        delete this.queuedElements_[elementKey];\n        return element;\n    };\n    /**\n     * Enqueue an element. O(log N).\n     * @param {T} element Element.\n     * @return {boolean} The element was added to the queue.\n     */\n    PriorityQueue.prototype.enqueue = function (element) {\n        assert(!(this.keyFunction_(element) in this.queuedElements_), 31); // Tried to enqueue an `element` that was already added to the queue\n        var priority = this.priorityF
 unction_(element);\n        if (priority != DROP) {\n            this.elements_.push(element);\n            this.priorities_.push(priority);\n            this.queuedElements_[this.keyFunction_(element)] = true;\n            this.siftDown_(0, this.elements_.length - 1);\n            return true;\n        }\n        return false;\n    };\n    /**\n     * @return {number} Count.\n     */\n    PriorityQueue.prototype.getCount = function () {\n        return this.elements_.length;\n    };\n    /**\n     * Gets the index of the left child of the node at the given index.\n     * @param {number} index The index of the node to get the left child for.\n     * @return {number} The index of the left child.\n     * @private\n     */\n    PriorityQueue.prototype.getLeftChildIndex_ = function (index) {\n        return index * 2 + 1;\n    };\n    /**\n     * Gets the index of the right child of the node at the given index.\n     * @param {number} index The index of the node to get the right child f
 or.\n     * @return {number} The index of the right child.\n     * @private\n     */\n    PriorityQueue.prototype.getRightChildIndex_ = function (index) {\n        return index * 2 + 2;\n    };\n    /**\n     * Gets the index of the parent of the node at the given index.\n     * @param {number} index The index of the node to get the parent for.\n     * @return {number} The index of the parent.\n     * @private\n     */\n    PriorityQueue.prototype.getParentIndex_ = function (index) {\n        return (index - 1) >> 1;\n    };\n    /**\n     * Make this a heap. O(N).\n     * @private\n     */\n    PriorityQueue.prototype.heapify_ = function () {\n        var i;\n        for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {\n            this.siftUp_(i);\n        }\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    PriorityQueue.prototype.isEmpty = function () {\n        return this.elements_.length === 0;\n    };\n    /**\n     * @param {string} key Key.\n     * @re
 turn {boolean} Is key queued.\n     */\n    PriorityQueue.prototype.isKeyQueued = function (key) {\n        return key in this.queuedElements_;\n    };\n    /**\n     * @param {T} element Element.\n     * @return {boolean} Is queued.\n     */\n    PriorityQueue.prototype.isQueued = function (element) {\n        return this.isKeyQueued(this.keyFunction_(element));\n    };\n    /**\n     * @param {number} index The index of the node to move down.\n     * @private\n     */\n    PriorityQueue.prototype.siftUp_ = function (index) {\n        var elements = this.elements_;\n        var priorities = this.priorities_;\n        var count = elements.length;\n        var element = elements[index];\n        var priority = priorities[index];\n        var startIndex = index;\n        while (index < count >> 1) {\n            var lIndex = this.getLeftChildIndex_(index);\n            var rIndex = this.getRightChildIndex_(index);\n            var smallerChildIndex = rIndex < count && priorities[rInde
 x] < priorities[lIndex]\n                ? rIndex\n                : lIndex;\n            elements[index] = elements[smallerChildIndex];\n            priorities[index] = priorities[smallerChildIndex];\n            index = smallerChildIndex;\n        }\n        elements[index] = element;\n        priorities[index] = priority;\n        this.siftDown_(startIndex, index);\n    };\n    /**\n     * @param {number} startIndex The index of the root.\n     * @param {number} index The index of the node to move up.\n     * @private\n     */\n    PriorityQueue.prototype.siftDown_ = function (startIndex, index) {\n        var elements = this.elements_;\n        var priorities = this.priorities_;\n        var element = elements[index];\n        var priority = priorities[index];\n        while (index > startIndex) {\n            var parentIndex = this.getParentIndex_(index);\n            if (priorities[parentIndex] > priority) {\n                elements[index] = elements[parentIndex];\n          
       priorities[index] = priorities[parentIndex];\n                index = parentIndex;\n            }\n            else {\n                break;\n            }\n        }\n        elements[index] = element;\n        priorities[index] = priority;\n    };\n    /**\n     * FIXME empty description for jsdoc\n     */\n    PriorityQueue.prototype.reprioritize = function () {\n        var priorityFunction = this.priorityFunction_;\n        var elements = this.elements_;\n        var priorities = this.priorities_;\n        var index = 0;\n        var n = elements.length;\n        var element, i, priority;\n        for (i = 0; i < n; ++i) {\n            element = elements[i];\n            priority = priorityFunction(element);\n            if (priority == DROP) {\n                delete this.queuedElements_[this.keyFunction_(element)];\n            }\n            else {\n                priorities[index] = priority;\n                elements[index++] = element;\n            }\n        }\n 
        elements.length = index;\n        priorities.length = index;\n        this.heapify_();\n    };\n    return PriorityQueue;\n}());\nexport default PriorityQueue;\n//# sourceMappingURL=PriorityQueue.js.map","/**\n * @module ol/TileState\n */\n/**\n * @enum {number}\n */\nexport default {\n    IDLE: 0,\n    LOADING: 1,\n    LOADED: 2,\n    /**\n     * Indicates that tile loading failed\n     * @type {number}\n     */\n    ERROR: 3,\n    EMPTY: 4,\n};\n//# sourceMappingURL=TileState.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d
 .prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/TileQueue\n */\nimport EventType from './events/EventType.js';\nimport PriorityQueue, { DROP } from './structs/PriorityQueue.js';\nimport TileState from './TileState.js';\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\nvar TileQueue = /** @class */ (function (_super) {\n    __extends(TileQueue, _super);\n    /**\n     * @param {PriorityFunction} tilePriorityFunction Tile priority function.\n     * @param {function(): ?} tileChangeCallback Function called on each tile change event.\n     */\n    function TileQueue(tilePriorityFunction, tileChangeCallback) {\n        var _this = _super.call(this, \n        /**\n         * @param {Array} element Element.\n         * @return {number} Priority.\n         */\n        function (element) {\n            return tilePriorityFunc
 tion.apply(null, element);\n        }, \n        /**\n         * @param {Array} element Element.\n         * @return {string} Key.\n         */\n        function (element) {\n            return /** @type {import(\"./Tile.js\").default} */ (element[0]).getKey();\n        }) || this;\n        /** @private */\n        _this.boundHandleTileChange_ = _this.handleTileChange.bind(_this);\n        /**\n         * @private\n         * @type {function(): ?}\n         */\n        _this.tileChangeCallback_ = tileChangeCallback;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.tilesLoading_ = 0;\n        /**\n         * @private\n         * @type {!Object<string,boolean>}\n         */\n        _this.tilesLoadingKeys_ = {};\n        return _this;\n    }\n    /**\n     * @param {Array} element Element.\n     * @return {boolean} The element was added to the queue.\n     */\n    TileQueue.prototype.enqueue = function (element) {\n        var added = _super.pro
 totype.enqueue.call(this, element);\n        if (added) {\n            var tile = element[0];\n            tile.addEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n        }\n        return added;\n    };\n    /**\n     * @return {number} Number of tiles loading.\n     */\n    TileQueue.prototype.getTilesLoading = function () {\n        return this.tilesLoading_;\n    };\n    /**\n     * @param {import(\"./events/Event.js\").default} event Event.\n     * @protected\n     */\n    TileQueue.prototype.handleTileChange = function (event) {\n        var tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n        var state = tile.getState();\n        if ((tile.hifi && state === TileState.LOADED) ||\n            state === TileState.ERROR ||\n            state === TileState.EMPTY) {\n            tile.removeEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n            var tileKey = tile.getKey();\n            if (tileKey in this.tilesLoadingKeys_) 
 {\n                delete this.tilesLoadingKeys_[tileKey];\n                --this.tilesLoading_;\n            }\n            this.tileChangeCallback_();\n        }\n    };\n    /**\n     * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n     * @param {number} maxNewLoads Maximum number of new tiles to load.\n     */\n    TileQueue.prototype.loadMoreTiles = function (maxTotalLoading, maxNewLoads) {\n        var newLoads = 0;\n        var state, tile, tileKey;\n        while (this.tilesLoading_ < maxTotalLoading &&\n            newLoads < maxNewLoads &&\n            this.getCount() > 0) {\n            tile = /** @type {import(\"./Tile.js\").default} */ (this.dequeue()[0]);\n            tileKey = tile.getKey();\n            state = tile.getState();\n            if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n                this.tilesLoadingKeys_[tileKey] = true;\n                ++this.tilesLoading_;\n                ++newLoads;\
 n                tile.load();\n            }\n        }\n    };\n    return TileQueue;\n}(PriorityQueue));\nexport default TileQueue;\n/**\n * @param {import('./PluggableMap.js').FrameState} frameState Frame state.\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\nexport function getTilePriority(frameState, tile, tileSourceKey, tileCenter, tileResolution) {\n    // Filter out tiles at higher zoom levels than the current zoom level, or that\n    // are outside the visible extent.\n    if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {\n        return DROP;\n    }\n    if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {\n        return DROP;\n    }\n    // Prioritize the highest zoom level tiles closest to the focus.\n    // Tiles at higher 
 zoom levels are prioritized using Math.log(tileResolution).\n    // Within a zoom level, tiles are prioritized by the distance in pixels between\n    // the center of the tile and the center of the viewport.  The factor of 65536\n    // means that the prioritization should behave as desired for tiles up to\n    // 65536 * Math.log(2) = 45426 pixels from the focus.\n    var center = frameState.viewState.center;\n    var deltaX = tileCenter[0] - center[0];\n    var deltaY = tileCenter[1] - center[1];\n    return (65536 * Math.log(tileResolution) +\n        Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution);\n}\n//# sourceMappingURL=TileQueue.js.map","/**\n * @module ol/ViewHint\n */\n/**\n * @enum {number}\n */\nexport default {\n    ANIMATING: 0,\n    INTERACTING: 1,\n};\n//# sourceMappingURL=ViewHint.js.map","/**\n * @module ol/ViewProperty\n */\n/**\n * @enum {string}\n */\nexport default {\n    CENTER: 'center',\n    RESOLUTION: 'resolution',\n    ROTATION: 'rotation',
 \n};\n//# sourceMappingURL=ViewProperty.js.map","/**\n * @module ol/centerconstraint\n */\nimport { clamp } from './math.js';\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined), number, import(\"./size.js\").Size, boolean=): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {boolean} onlyCenter If true, the constraint will only apply to the view center.\n * @param {boolean} smooth If true, the view will be able to go slightly out of the given extent\n * (only during interaction and animation).\n * @return {Type} The constraint.\n */\nexport function createExtent(extent, onlyCenter, smooth) {\n    return (\n    /**\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n     * @param {number} resolution Resolution.\n     * @param {import(\"./size.js\").Size} size Viewport size; unused if `onlyCenter` was specified.\n     * @param {boolean=} opt_
 isMoving True if an interaction or animation is in progress.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n     */\n    function (center, resolution, size, opt_isMoving) {\n        if (center) {\n            var viewWidth = onlyCenter ? 0 : size[0] * resolution;\n            var viewHeight = onlyCenter ? 0 : size[1] * resolution;\n            var minX = extent[0] + viewWidth / 2;\n            var maxX = extent[2] - viewWidth / 2;\n            var minY = extent[1] + viewHeight / 2;\n            var maxY = extent[3] - viewHeight / 2;\n            // note: when zooming out of bounds, min and max values for x and y may\n            // end up inverted (min > max); this has to be accounted for\n            if (minX > maxX) {\n                minX = (maxX + minX) / 2;\n                maxX = minX;\n            }\n            if (minY > maxY) {\n                minY = (maxY + minY) / 2;\n                maxY = minY;\n            }\n            var x = clamp(cen
 ter[0], minX, maxX);\n            var y = clamp(center[1], minY, maxY);\n            var ratio = 30 * resolution;\n            // during an interaction, allow some overscroll\n            if (opt_isMoving && smooth) {\n                x +=\n                    -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) +\n                        ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio);\n                y +=\n                    -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) +\n                        ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n            }\n            return [x, y];\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate=} center Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\nexport function none(center) {\n    return center;\n}\n//# sourceMappingURL=centerconstraint.js.map","/**\n * @module ol/
 resolutionconstraint\n */\nimport { clamp } from './math.js';\nimport { getHeight, getWidth } from './extent.js';\nimport { linearFindNearest } from './array.js';\n/**\n * @typedef {function((number|undefined), number, import(\"./size.js\").Size, boolean=): (number|undefined)} Type\n */\n/**\n * Returns a modified resolution taking into account the viewport size and maximum\n * allowed extent.\n * @param {number} resolution Resolution\n * @param {import(\"./extent.js\").Extent=} maxExtent Maximum allowed extent.\n * @param {import(\"./size.js\").Size} viewportSize Viewport size.\n * @param {boolean} showFullExtent Whether to show the full extent.\n * @return {number} Capped resolution.\n */\nfunction getViewportClampedResolution(resolution, maxExtent, viewportSize, showFullExtent) {\n    var xResolution = getWidth(maxExtent) / viewportSize[0];\n    var yResolution = getHeight(maxExtent) / viewportSize[1];\n    if (showFullExtent) {\n        return Math.min(resolution, Math.max(xReso
 lution, yResolution));\n    }\n    return Math.min(resolution, Math.min(xResolution, yResolution));\n}\n/**\n * Returns a modified resolution to be between maxResolution and minResolution while\n * still allowing the value to be slightly out of bounds.\n * Note: the computation is based on the logarithm function (ln):\n *  - at 1, ln(x) is 0\n *  - above 1, ln(x) keeps increasing but at a much slower pace than x\n * The final result is clamped to prevent getting too far away from bounds.\n * @param {number} resolution Resolution.\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @return {number} Smoothed resolution.\n */\nfunction getSmoothClampedResolution(resolution, maxResolution, minResolution) {\n    var result = Math.min(resolution, maxResolution);\n    var ratio = 50;\n    result *=\n        Math.log(1 + ratio * Math.max(0, resolution / maxResolution - 1)) / ratio +\n            1;\n    if (minResolution) {\n        result
  = Math.max(result, minResolution);\n        result /=\n            Math.log(1 + ratio * Math.max(0, minResolution / resolution - 1)) /\n                ratio +\n                1;\n    }\n    return clamp(result, minResolution / 2, maxResolution * 2);\n}\n/**\n * @param {Array<number>} resolutions Resolutions.\n * @param {boolean=} opt_smooth If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent=} opt_maxExtent Maximum allowed extent.\n * @param {boolean=} opt_showFullExtent If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(resolutions, opt_smooth, opt_maxExtent, opt_showFullExtent) {\n    return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size} size Viewport size.\n     * @param {boolean=} opt_isMoving True if an in
 teraction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, opt_isMoving) {\n        if (resolution !== undefined) {\n            var maxResolution = resolutions[0];\n            var minResolution = resolutions[resolutions.length - 1];\n            var cappedMaxRes = opt_maxExtent\n                ? getViewportClampedResolution(maxResolution, opt_maxExtent, size, opt_showFullExtent)\n                : maxResolution;\n            // during interacting or animating, allow intermediary values\n            if (opt_isMoving) {\n                var smooth = opt_smooth !== undefined ? opt_smooth : true;\n                if (!smooth) {\n                    return clamp(resolution, minResolution, cappedMaxRes);\n                }\n                return getSmoothClampedResolution(resolution, cappedMaxRes, minResolution);\n            }\n            var capped = Math.min(cappedMaxRes, resolution);\n            var 
 z = Math.floor(linearFindNearest(resolutions, capped, direction));\n            if (resolutions[z] > cappedMaxRes && z < resolutions.length - 1) {\n                return resolutions[z + 1];\n            }\n            return resolutions[z];\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number=} opt_minResolution Minimum resolution.\n * @param {boolean=} opt_smooth If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent=} opt_maxExtent Maximum allowed extent.\n * @param {boolean=} opt_showFullExtent If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(power, maxResolution, opt_minResolution, opt_smooth, opt_maxExtent, opt_showFullExtent) {\n    return (\n    /**\n     * @param {number|undefined} r
 esolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size} size Viewport size.\n     * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, opt_isMoving) {\n        if (resolution !== undefined) {\n            var cappedMaxRes = opt_maxExtent\n                ? getViewportClampedResolution(maxResolution, opt_maxExtent, size, opt_showFullExtent)\n                : maxResolution;\n            var minResolution = opt_minResolution !== undefined ? opt_minResolution : 0;\n            // during interacting or animating, allow intermediary values\n            if (opt_isMoving) {\n                var smooth = opt_smooth !== undefined ? opt_smooth : true;\n                if (!smooth) {\n                    return clamp(resolution, minResolution, cappedMaxRes);\n                }\n                return getSmooth
 ClampedResolution(resolution, cappedMaxRes, minResolution);\n            }\n            var tolerance = 1e-9;\n            var minZoomLevel = Math.ceil(Math.log(maxResolution / cappedMaxRes) / Math.log(power) - tolerance);\n            var offset = -direction * (0.5 - tolerance) + 0.5;\n            var capped = Math.min(cappedMaxRes, resolution);\n            var cappedZoomLevel = Math.floor(Math.log(maxResolution / capped) / Math.log(power) + offset);\n            var zoomLevel = Math.max(minZoomLevel, cappedZoomLevel);\n            var newResolution = maxResolution / Math.pow(power, zoomLevel);\n            return clamp(newResolution, minResolution, cappedMaxRes);\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @param {boolean=} opt_smooth If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(
 \"./extent.js\").Extent=} opt_maxExtent Maximum allowed extent.\n * @param {boolean=} opt_showFullExtent If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createMinMaxResolution(maxResolution, minResolution, opt_smooth, opt_maxExtent, opt_showFullExtent) {\n    return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size} size Viewport size.\n     * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, opt_isMoving) {\n        if (resolution !== undefined) {\n            var cappedMaxRes = opt_maxExtent\n                ? getViewportClampedResolution(maxResolution, opt_maxExtent, size, opt_showFullExtent)\n                : maxResolution;\n            var smooth = opt_smooth !== undefined ? 
 opt_smooth : true;\n            if (!smooth || !opt_isMoving) {\n                return clamp(resolution, minResolution, cappedMaxRes);\n            }\n            return getSmoothClampedResolution(resolution, cappedMaxRes, minResolution);\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n//# sourceMappingURL=resolutionconstraint.js.map","/**\n * @module ol/rotationconstraint\n */\nimport { toRadians } from './math.js';\n/**\n * @typedef {function((number|undefined), boolean=): (number|undefined)} Type\n */\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function disable(rotation) {\n    if (rotation !== undefined) {\n        return 0;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function none(rotation) {\n    if (rotation !== undefined) {\n        return rotation;\n    }\n  
   else {\n        return undefined;\n    }\n}\n/**\n * @param {number} n N.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToN(n) {\n    var theta = (2 * Math.PI) / n;\n    return (\n    /**\n     * @param {number|undefined} rotation Rotation.\n     * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */\n    function (rotation, opt_isMoving) {\n        if (opt_isMoving) {\n            return rotation;\n        }\n        if (rotation !== undefined) {\n            rotation = Math.floor(rotation / theta + 0.5) * theta;\n            return rotation;\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {number=} opt_tolerance Tolerance.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToZero(opt_tolerance) {\n    var tolerance = opt_tolerance || toRadians(5);\n    return (\n    /**\n     * @param {number|undefined
 } rotation Rotation.\n     * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */\n    function (rotation, opt_isMoving) {\n        if (opt_isMoving) {\n            return rotation;\n        }\n        if (rotation !== undefined) {\n            if (Math.abs(rotation) <= tolerance) {\n                return 0;\n            }\n            else {\n                return rotation;\n            }\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n//# sourceMappingURL=rotationconstraint.js.map","/**\n * @module ol/easing\n */\n/**\n * Start slow and speed up.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeIn(t) {\n    return Math.pow(t, 3);\n}\n/**\n * Start fast and slow down.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function ea
 seOut(t) {\n    return 1 - easeIn(1 - t);\n}\n/**\n * Start slow, speed up, and then slow down again.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function inAndOut(t) {\n    return 3 * t * t - 2 * t * t * t;\n}\n/**\n * Maintain a constant speed over time.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function linear(t) {\n    return t;\n}\n/**\n * Start slow, speed up, and at the very end slow down again.  This has the\n * same general behavior as {@link module:ol/easing~inAndOut}, but the final\n * slowdown is delayed.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function upAndDown(t) {\n    if (t < 0.5) {\n        return inAndOut(2 * t);\n    }\n    else {\n        return 1 - inAndOut(2 * (t - 0.5));\n    }\n}\n//# sourceMappingURL=easing.js.map","var __extends = (this && this.__ext
 ends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/View\n */\nimport BaseObject from './Object.js';\nimport GeometryType from './geom/GeometryType.js';\nimport Units from './proj/Units.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport { DEFAULT_TILE_SIZE } from './tilegrid/common.js';\nimport { METERS_PER_UNIT, createProjection, fromUserCoordinate, fromUserExtent, getUserProjection, toUserCoordinate, toUserExtent
 , } from './proj.js';\nimport { VOID } from './functions.js';\nimport { add as addCoordinate, equals as coordinatesEqual, rotate as rotateCoordinate, } from './coordinate.js';\nimport { assert } from './asserts.js';\nimport { assign } from './obj.js';\nimport { none as centerNone, createExtent } from './centerconstraint.js';\nimport { clamp, modulo } from './math.js';\nimport { createMinMaxResolution } from './resolutionconstraint.js';\nimport { createSnapToN, createSnapToZero, disable, none as rotationNone, } from './rotationconstraint.js';\nimport { createSnapToPower, createSnapToResolutions, } from './resolutionconstraint.js';\nimport { easeOut } from './easing.js';\nimport { equals } from './coordinate.js';\nimport { getCenter, getForViewAndSize, getHeight, getWidth, isEmpty, } from './extent.js';\nimport { inAndOut } from './easing.js';\nimport { linearFindNearest } from './array.js';\nimport { fromExtent as polygonFromExtent } from './geom/Polygon.js';\n/**\n * An animation co
 nfiguration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter]\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter]\n * @property {number} [sourceResolution]\n * @property {number} [targetResolution]\n * @property {number} [sourceRotation]\n * @property {number} [targetRotation]\n * @property {import(\"./coordinate.js\").Coordinate} [anchor]\n * @property {number} start\n * @property {number} duration\n * @property {boolean} complete\n * @property {function(number):number} easing\n * @property {function(boolean):void} callback\n */\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center\n * @property {import(\"./resolutionconstraint.js\").Type} resolution\n * @property {import(\"./rotationconstraint.js\").Type} rotation\n */\n/**\n * @typedef {Object} FitOptions\n * @property {import(\"./size.js\").Size} [size] The size in pixels of the box to fit\n * the extent into.
  Default is the current size of the first map in the DOM that\n * uses this view, or `[100, 100]` if no such map is found.\n * @property {!Array<number>} [padding=[0, 0, 0, 0]] Padding (in pixels) to be\n * cleared inside the view. Values in the array are top, right, bottom and left\n * padding.\n * @property {boolean} [nearest=false] If the view `constrainResolution` option is `true`,\n * get the nearest extent instead of the closest that actually fits the view.\n * @property {number} [minResolution=0] Minimum resolution that we zoom to.\n * @property {number} [maxZoom] Maximum zoom level that we zoom to. If\n * `minResolution` is given, this property is ignored.\n * @property {number} [duration] The duration of the animation in milliseconds.\n * By default, there is no animation to the target extent.\n * @property {function(number):number} [easing] The easing function used during\n * the animation (defaults to {@link module:ol/easing~inAndOut}).\n * The function will be called for
  each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n * @property {function(boolean):void} [callback] Function called when the view is in\n * its final position. The callback will be called with `true` if the animation\n * series completed on its own or `false` if it was cancelled.\n */\n/**\n * @typedef {Object} ViewOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The initial center for\n * the view. If a user projection is not set, the coordinate system for the center is\n * specified with the `projection` option. Layer sources will not be fetched if this\n * is not set, but the center can be set later with {@link #setCenter}.\n * @property {boolean|number} [constrainRotation=true] Rotation constraint.\n * `false` means no constraint. `true` means no constraint, but snap to zero\n * near zero. A number constrains the
  rotation to that number of values. For\n * example, `4` will constrain the rotation to 0, 90, 180, and 270 degrees.\n * @property {boolean} [enableRotation=true] Enable rotation.\n * If `false`, a rotation constraint that always sets the rotation to zero is\n * used. The `constrainRotation` option has no effect if `enableRotation` is\n * `false`.\n * @property {import(\"./extent.js\").Extent} [extent] The extent that constrains the\n * view, in other words, nothing outside of this extent can be visible on the map.\n * @property {boolean} [constrainOnlyCenter=false] If true, the extent\n * constraint will only apply to the view center and not the whole extent.\n * @property {boolean} [smoothExtentConstraint=true] If true, the extent\n * constraint will be applied smoothly, i.e. allow the view to go slightly outside\n * of the given `extent`.\n * @property {number} [maxResolution] The maximum resolution used to determine\n * the resolution constraint. It is used together with `minRes
 olution` (or\n * `maxZoom`) and `zoomFactor`. If unspecified it is calculated in such a way\n * that the projection's validity extent fits in a 256x256 px tile. If the\n * projection is Spherical Mercator (the default) then `maxResolution` defaults\n * to `40075016.68557849 / 256 = 156543.03392804097`.\n * @property {number} [minResolution] The minimum resolution used to determine\n * the resolution constraint.  It is used together with `maxResolution` (or\n * `minZoom`) and `zoomFactor`.  If unspecified it is calculated assuming 29\n * zoom levels (with a factor of 2). If the projection is Spherical Mercator\n * (the default) then `minResolution` defaults to\n * `40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253`.\n * @property {number} [maxZoom=28] The maximum zoom level used to determine the\n * resolution constraint. It is used together with `minZoom` (or\n * `maxResolution`) and `zoomFactor`.  Note that if `minResolution` is also\n * provided, it is given preced
 ence over `maxZoom`.\n * @property {number} [minZoom=0] The minimum zoom level used to determine the\n * resolution constraint. It is used together with `maxZoom` (or\n * `minResolution`) and `zoomFactor`.  Note that if `maxResolution` is also\n * provided, it is given precedence over `minZoom`.\n * @property {boolean} [multiWorld=false] If `false` the view is constrained so\n * only one world is visible, and you cannot pan off the edge.  If `true` the map\n * may show multiple worlds at low zoom levels.  Only used if the `projection` is\n * global.  Note that if `extent` is also provided it is given precedence.\n * @property {boolean} [constrainResolution=false] If true, the view will always\n * animate to the closest zoom level after an interaction; false means\n * intermediary zoom levels are allowed.\n * @property {boolean} [smoothResolutionConstraint=true] If true, the resolution\n * min/max values will be applied smoothly, i. e. allow the view to exceed slightly\n * the given 
 resolution or zoom bounds.\n * @property {boolean} [showFullExtent=false] Allow the view to be zoomed out to\n * show the full configured extent. By default, when a view is configured with an\n * extent, users will not be able to zoom out so the viewport exceeds the extent in\n * either dimension. This means the full extent may not be visible if the viewport\n * is taller or wider than the aspect ratio of the configured extent. If\n * showFullExtent is true, the user will be able to zoom out so that the viewport\n * exceeds the height or width of the configured extent, but not both, allowing the\n * full extent to be shown.\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857'] The\n * projection. The default is Spherical Mercator.\n * @property {number} [resolution] The initial resolution for the view. The\n * units are `projection` units per pixel (e.g. meters per pixel). An\n * alternative to setting this is to set `zoom`. Layer sources will not be\n * fetc
 hed if neither this nor `zoom` are defined, but they can be set later\n * with {@link #setZoom} or {@link #setResolution}.\n * @property {Array<number>} [resolutions] Resolutions to determine the\n * resolution constraint. If set the `maxResolution`, `minResolution`,\n * `minZoom`, `maxZoom`, and `zoomFactor` options are ignored.\n * @property {number} [rotation=0] The initial rotation for the view in radians\n * (positive rotation clockwise, 0 means North).\n * @property {number} [zoom] Only used if `resolution` is not defined. Zoom\n * level used to calculate the initial resolution for the view.\n * @property {number} [zoomFactor=2] The zoom factor used to compute the\n * corresponding resolution.\n */\n/**\n * @typedef {Object} AnimationOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The center of the view at the end of\n * the animation.\n * @property {number} [zoom] The zoom level of the view at the end of the\n * animation. This takes precedence over `r
 esolution`.\n * @property {number} [resolution] The resolution of the view at the end\n * of the animation.  If `zoom` is also provided, this option will be ignored.\n * @property {number} [rotation] The rotation of the view at the end of\n * the animation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Optional anchor to remain fixed\n * during a rotation or resolution animation.\n * @property {number} [duration=1000] The duration of the animation in milliseconds.\n * @property {function(number):number} [easing] The easing function used\n * during the animation (defaults to {@link module:ol/easing~inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n */\n/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center\n * @property {import(\"./proj/
 Projection.js\").default} projection\n * @property {number} resolution\n * @property {number} rotation\n * @property {number} zoom\n */\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nvar DEFAULT_MIN_ZOOM = 0;\n/**\n * @classdesc\n * A View object represents a simple 2D view of the map.\n *\n * This is the object to act upon to change the center, resolution,\n * and rotation of the map.\n *\n * A View has a `projection`. The projection determines the\n * coordinate system of the center, and its units determine the units of the\n * resolution (projection units per pixel). The default projection is\n * Spherical Mercator (EPSG:3857).\n *\n * ### The view states\n *\n * A View is determined by three states: `center`, `resolution`,\n * and `rotation`. Each state has a corresponding getter and setter, e.g.\n * `getCenter` and `setCenter` for the `center` state.\n *\n * The `zoom` state is actually not saved on the view: all computations\n * internally use the `
 resolution` state. Still, the `setZoom` and `getZoom`\n * methods are available, as well as `getResolutionForZoom` and\n * `getZoomForResolution` to switch from one system to the other.\n *\n * ### The constraints\n *\n * `setCenter`, `setResolution` and `setRotation` can be used to change the\n * states of the view, but any constraint defined in the constructor will\n * be applied along the way.\n *\n * A View object can have a *resolution constraint*, a *rotation constraint*\n * and a *center constraint*.\n *\n * The *resolution constraint* typically restricts min/max values and\n * snaps to specific resolutions. It is determined by the following\n * options: `resolutions`, `maxResolution`, `maxZoom` and `zoomFactor`.\n * If `resolutions` is set, the other three options are ignored. See\n * documentation for each option for more information. By default, the view\n * only has a min/max restriction and allow intermediary zoom levels when\n * pinch-zooming for example.\n *\n * The *r
 otation constraint* snaps to specific angles. It is determined\n * by the following options: `enableRotation` and `constrainRotation`.\n * By default rotation is allowed and its value is snapped to zero when approaching the\n * horizontal.\n *\n * The *center constraint* is determined by the `extent` option. By\n * default the view center is not constrained at all.\n *\n * ### Changing the view state\n *\n * It is important to note that `setZoom`, `setResolution`, `setCenter` and\n * `setRotation` are subject to the above mentioned constraints. As such, it\n * may sometimes not be possible to know in advance the resulting state of the\n * View. For example, calling `setResolution(10)` does not guarantee that\n * `getResolution()` will return `10`.\n *\n * A consequence of this is that, when applying a delta on the view state, one\n * should use `adjustCenter`, `adjustRotation`, `adjustZoom` and `adjustResolution`\n * rather than the corresponding setters. This will let view do its i
 nternal\n * computations. Besides, the `adjust*` methods also take an `opt_anchor`\n * argument which allows specifying an origin for the transformation.\n *\n * ### Interacting with the view\n *\n * View constraints are usually only applied when the view is *at rest*, meaning that\n * no interaction or animation is ongoing. As such, if the user puts the view in a\n * state that is not equivalent to a constrained one (e.g. rotating the view when\n * the snap angle is 0), an animation will be triggered at the interaction end to\n * put back the view to a stable state;\n *\n * @api\n */\nvar View = /** @class */ (function (_super) {\n    __extends(View, _super);\n    /**\n     * @param {ViewOptions=} opt_options View options.\n     */\n    function View(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = assign({}, opt_options);\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.hints_ = [0, 0];\n        /*
 *\n         * @private\n         * @type {Array<Array<Animation>>}\n         */\n        _this.animations_ = [];\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.updateAnimationKey_;\n        /**\n         * @private\n         * @const\n         * @type {import(\"./proj/Projection.js\").default}\n         */\n        _this.projection_ = createProjection(options.projection, 'EPSG:3857');\n        /**\n         * @private\n         * @type {import(\"./size.js\").Size}\n         */\n        _this.viewportSize_ = [100, 100];\n        /**\n         * @private\n         * @type {import(\"./coordinate.js\").Coordinate|undefined}\n         */\n        _this.targetCenter_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.targetResolution_;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.targetRotation_;\n        /**\n         * @private
 \n         * @type {import(\"./coordinate.js\").Coordinate|undefined}\n         */\n        _this.cancelAnchor_ = undefined;\n        if (options.center) {\n            options.center = fromUserCoordinate(options.center, _this.projection_);\n        }\n        if (options.extent) {\n            options.extent = fromUserExtent(options.extent, _this.projection_);\n        }\n        _this.applyOptions_(options);\n        return _this;\n    }\n    /**\n     * Set up the view with the given options.\n     * @param {ViewOptions} options View options.\n     */\n    View.prototype.applyOptions_ = function (options) {\n        /**\n         * @type {Object<string, *>}\n         */\n        var properties = {};\n        var resolutionConstraintInfo = createResolutionConstraint(options);\n        /**\n         * @private\n         * @type {number}\n         */\n        this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n        /**\n         * @private\n         * @type {number}\n 
         */\n        this.minResolution_ = resolutionConstraintInfo.minResolution;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n        /**\n         * @private\n         * @type {Array<number>|undefined}\n         */\n        this.resolutions_ = options.resolutions;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.minZoom_ = resolutionConstraintInfo.minZoom;\n        var centerConstraint = createCenterConstraint(options);\n        var resolutionConstraint = resolutionConstraintInfo.constraint;\n        var rotationConstraint = createRotationConstraint(options);\n        /**\n         * @private\n         * @type {Constraints}\n         */\n        this.constraints_ = {\n            center: centerConstraint,\n            resolution: resolutionConstraint,\n            rotation: rotationConstraint,\n        };\n        this.setRotation(options.rotation !
 == undefined ? options.rotation : 0);\n        this.setCenterInternal(options.center !== undefined ? options.center : null);\n        if (options.resolution !== undefined) {\n            this.setResolution(options.resolution);\n        }\n        else if (options.zoom !== undefined) {\n            this.setZoom(options.zoom);\n        }\n        this.setProperties(properties);\n        /**\n         * @private\n         * @type {ViewOptions}\n         */\n        this.options_ = options;\n    };\n    /**\n     * Get an updated version of the view options used to construct the view.  The\n     * current resolution (or zoom), center, and rotation are applied to any stored\n     * options.  The provided options can be used to apply new min/max zoom or\n     * resolution limits.\n     * @param {ViewOptions} newOptions New options to be applied.\n     * @return {ViewOptions} New options updated with the current view state.\n     */\n    View.prototype.getUpdatedOptions_ = function (newOpt
 ions) {\n        var options = assign({}, this.options_);\n        // preserve resolution (or zoom)\n        if (options.resolution !== undefined) {\n            options.resolution = this.getResolution();\n        }\n        else {\n            options.zoom = this.getZoom();\n        }\n        // preserve center\n        options.center = this.getCenterInternal();\n        // preserve rotation\n        options.rotation = this.getRotation();\n        return assign({}, options, newOptions);\n    };\n    /**\n     * Animate the view.  The view's center, zoom (or resolution), and rotation\n     * can be animated for smooth transitions between view states.  For example,\n     * to animate the view to a new zoom level:\n     *\n     *     view.animate({zoom: view.getZoom() + 1});\n     *\n     * By default, the animation lasts one second and uses in-and-out easing.  You\n     * can customize this behavior by including `duration` (in milliseconds) and\n     * `easing` options (see {@link m
 odule:ol/easing}).\n     *\n     * To chain together multiple animations, call the method with multiple\n     * animation objects.  For example, to first zoom and then pan:\n     *\n     *     view.animate({zoom: 10}, {center: [0, 0]});\n     *\n     * If you provide a function as the last argument to the animate method, it\n     * will get called at the end of an animation series.  The callback will be\n     * called with `true` if the animation series completed on its own or `false`\n     * if it was cancelled.\n     *\n     * Animations are cancelled by user interactions (e.g. dragging the map) or by\n     * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`\n     * (or another method that calls one of these).\n     *\n     * @param {...(AnimationOptions|function(boolean): void)} var_args Animation\n     *     options.  Multiple animations can be run in series by passing multiple\n     *     options objects.  To run multiple animations in parallel, call t
 he method\n     *     multiple times.  An optional callback can be provided as a final\n     *     argument.  The callback will be called with a boolean indicating whether\n     *     the animation completed without being cancelled.\n     * @api\n     */\n    View.prototype.animate = function (var_args) {\n        if (this.isDef() && !this.getAnimating()) {\n            this.resolveConstraints(0);\n        }\n        var args = new Array(arguments.length);\n        for (var i = 0; i < args.length; ++i) {\n            var options = arguments[i];\n            if (options.center) {\n                options = assign({}, options);\n                options.center = fromUserCoordinate(options.center, this.getProjection());\n            }\n            if (options.anchor) {\n                options = assign({}, options);\n                options.anchor = fromUserCoordinate(options.anchor, this.getProjection());\n            }\n            args[i] = options;\n        }\n        this.animateIn
 ternal.apply(this, args);\n    };\n    /**\n     * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.\n     */\n    View.prototype.animateInternal = function (var_args) {\n        var animationCount = arguments.length;\n        var callback;\n        if (animationCount > 1 &&\n            typeof arguments[animationCount - 1] === 'function') {\n            callback = arguments[animationCount - 1];\n            --animationCount;\n        }\n        if (!this.isDef()) {\n            // if view properties are not yet set, shortcut to the final state\n            var state = arguments[animationCount - 1];\n            if (state.center) {\n                this.setCenterInternal(state.center);\n            }\n            if (state.zoom !== undefined) {\n                this.setZoom(state.zoom);\n            }\n            if (state.rotation !== undefined) {\n                this.setRotation(state.rotation);\n            }\n            if (callback) {\n      
           animationCallback(callback, true);\n            }\n            return;\n        }\n        var start = Date.now();\n        var center = this.targetCenter_.slice();\n        var resolution = this.targetResolution_;\n        var rotation = this.targetRotation_;\n        var series = [];\n        for (var i = 0; i < animationCount; ++i) {\n            var options = /** @type {AnimationOptions} */ (arguments[i]);\n            var animation = {\n                start: start,\n                complete: false,\n                anchor: options.anchor,\n                duration: options.duration !== undefined ? options.duration : 1000,\n                easing: options.easing || inAndOut,\n                callback: callback,\n            };\n            if (options.center) {\n                animation.sourceCenter = center;\n                animation.targetCenter = options.center.slice();\n                center = animation.targetCenter;\n            }\n            if (options.zoom
  !== undefined) {\n                animation.sourceResolution = resolution;\n                animation.targetResolution = this.getResolutionForZoom(options.zoom);\n                resolution = animation.targetResolution;\n            }\n            else if (options.resolution) {\n                animation.sourceResolution = resolution;\n                animation.targetResolution = options.resolution;\n                resolution = animation.targetResolution;\n            }\n            if (options.rotation !== undefined) {\n                animation.sourceRotation = rotation;\n                var delta = modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n                animation.targetRotation = rotation + delta;\n                rotation = animation.targetRotation;\n            }\n            // check if animation is a no-op\n            if (isNoopAnimation(animation)) {\n                animation.complete = true;\n                // we still push it onto the se
 ries for callback handling\n            }\n            else {\n                start += animation.duration;\n            }\n            series.push(animation);\n        }\n        this.animations_.push(series);\n        this.setHint(ViewHint.ANIMATING, 1);\n        this.updateAnimations_();\n    };\n    /**\n     * Determine if the view is being animated.\n     * @return {boolean} The view is being animated.\n     * @api\n     */\n    View.prototype.getAnimating = function () {\n        return this.hints_[ViewHint.ANIMATING] > 0;\n    };\n    /**\n     * Determine if the user is interacting with the view, such as panning or zooming.\n     * @return {boolean} The view is being interacted with.\n     * @api\n     */\n    View.prototype.getInteracting = function () {\n        return this.hints_[ViewHint.INTERACTING] > 0;\n    };\n    /**\n     * Cancel any ongoing animations.\n     * @api\n     */\n    View.prototype.cancelAnimations = function () {\n        this.setHint(ViewHint.ANIMA
 TING, -this.hints_[ViewHint.ANIMATING]);\n        var anchor;\n        for (var i = 0, ii = this.animations_.length; i < ii; ++i) {\n            var series = this.animations_[i];\n            if (series[0].callback) {\n                animationCallback(series[0].callback, false);\n            }\n            if (!anchor) {\n                for (var j = 0, jj = series.length; j < jj; ++j) {\n                    var animation = series[j];\n                    if (!animation.complete) {\n                        anchor = animation.anchor;\n                        break;\n                    }\n                }\n            }\n        }\n        this.animations_.length = 0;\n        this.cancelAnchor_ = anchor;\n    };\n    /**\n     * Update all animations.\n     */\n    View.prototype.updateAnimations_ = function () {\n        if (this.updateAnimationKey_ !== undefined) {\n            cancelAnimationFrame(this.updateAnimationKey_);\n            this.updateAnimationKey_ = undefined;\n  
       }\n        if (!this.getAnimating()) {\n            return;\n        }\n        var now = Date.now();\n        var more = false;\n        for (var i = this.animations_.length - 1; i >= 0; --i) {\n            var series = this.animations_[i];\n            var seriesComplete = true;\n            for (var j = 0, jj = series.length; j < jj; ++j) {\n                var animation = series[j];\n                if (animation.complete) {\n                    continue;\n                }\n                var elapsed = now - animation.start;\n                var fraction = animation.duration > 0 ? elapsed / animation.duration : 1;\n                if (fraction >= 1) {\n                    animation.complete = true;\n                    fraction = 1;\n                }\n                else {\n                    seriesComplete = false;\n                }\n                var progress = animation.easing(fraction);\n                if (animation.sourceCenter) {\n                    var x0 
 = animation.sourceCenter[0];\n                    var y0 = animation.sourceCenter[1];\n                    var x1 = animation.targetCenter[0];\n                    var y1 = animation.targetCenter[1];\n                    var x = x0 + progress * (x1 - x0);\n                    var y = y0 + progress * (y1 - y0);\n                    this.targetCenter_ = [x, y];\n                }\n                if (animation.sourceResolution && animation.targetResolution) {\n                    var resolution = progress === 1\n                        ? animation.targetResolution\n                        : animation.sourceResolution +\n                            progress *\n                                (animation.targetResolution - animation.sourceResolution);\n                    if (animation.anchor) {\n                        var size = this.getViewportSize_(this.getRotation());\n                        var constrainedResolution = this.constraints_.resolution(resolution, 0, size, true);\n     
                    this.targetCenter_ = this.calculateCenterZoom(constrainedResolution, animation.anchor);\n                    }\n                    this.targetResolution_ = resolution;\n                    this.applyTargetState_(true);\n                }\n                if (animation.sourceRotation !== undefined &&\n                    animation.targetRotation !== undefined) {\n                    var rotation = progress === 1\n                        ? modulo(animation.targetRotation + Math.PI, 2 * Math.PI) -\n                            Math.PI\n                        : animation.sourceRotation +\n                            progress *\n                                (animation.targetRotation - animation.sourceRotation);\n                    if (animation.anchor) {\n                        var constrainedRotation = this.constraints_.rotation(rotation, true);\n                        this.targetCenter_ = this.calculateCenterRotate(constrainedRotation, animation.anchor);\n    
                 }\n                    this.targetRotation_ = rotation;\n                }\n                this.applyTargetState_(true);\n                more = true;\n                if (!animation.complete) {\n                    break;\n                }\n            }\n            if (seriesComplete) {\n                this.animations_[i] = null;\n                this.setHint(ViewHint.ANIMATING, -1);\n                var callback = series[0].callback;\n                if (callback) {\n                    animationCallback(callback, true);\n                }\n            }\n        }\n        // prune completed series\n        this.animations_ = this.animations_.filter(Boolean);\n        if (more && this.updateAnimationKey_ === undefined) {\n            this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_.bind(this));\n        }\n    };\n    /**\n     * @param {number} rotation Target rotation.\n     * @param {import(\"./coordinate.js\").Coordinate} anchor Rot
 ation anchor.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for rotation and anchor.\n     */\n    View.prototype.calculateCenterRotate = function (rotation, anchor) {\n        var center;\n        var currentCenter = this.getCenterInternal();\n        if (currentCenter !== undefined) {\n            center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];\n            rotateCoordinate(center, rotation - this.getRotation());\n            addCoordinate(center, anchor);\n        }\n        return center;\n    };\n    /**\n     * @param {number} resolution Target resolution.\n     * @param {import(\"./coordinate.js\").Coordinate} anchor Zoom anchor.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for resolution and anchor.\n     */\n    View.prototype.calculateCenterZoom = function (resolution, anchor) {\n        var center;\n        var currentCenter = this.getCenterInternal();\n        var currentResolution = this.get
 Resolution();\n        if (currentCenter !== undefined && currentResolution !== undefined) {\n            var x = anchor[0] -\n                (resolution * (anchor[0] - currentCenter[0])) / currentResolution;\n            var y = anchor[1] -\n                (resolution * (anchor[1] - currentCenter[1])) / currentResolution;\n            center = [x, y];\n        }\n        return center;\n    };\n    /**\n     * Returns the current viewport size.\n     * @private\n     * @param {number=} opt_rotation Take into account the rotation of the viewport when giving the size\n     * @return {import(\"./size.js\").Size} Viewport size or `[100, 100]` when no viewport is found.\n     */\n    View.prototype.getViewportSize_ = function (opt_rotation) {\n        var size = this.viewportSize_;\n        if (opt_rotation) {\n            var w = size[0];\n            var h = size[1];\n            return [\n                Math.abs(w * Math.cos(opt_rotation)) +\n                    Math.abs(h * Math.
 sin(opt_rotation)),\n                Math.abs(w * Math.sin(opt_rotation)) +\n                    Math.abs(h * Math.cos(opt_rotation)),\n            ];\n        }\n        else {\n            return size;\n        }\n    };\n    /**\n     * Stores the viewport size on the view. The viewport size is not read every time from the DOM\n     * to avoid performance hit and layout reflow.\n     * This should be done on map size change.\n     * Note: the constraints are not resolved during an animation to avoid stopping it\n     * @param {import(\"./size.js\").Size=} opt_size Viewport size; if undefined, [100, 100] is assumed\n     */\n    View.prototype.setViewportSize = function (opt_size) {\n        this.viewportSize_ = Array.isArray(opt_size)\n            ? opt_size.slice()\n            : [100, 100];\n        if (!this.getAnimating()) {\n            this.resolveConstraints(0);\n        }\n    };\n    /**\n     * Get the view center.\n     * @return {import(\"./coordinate.js\").Coordinate
 |undefined} The center of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.getCenter = function () {\n        var center = this.getCenterInternal();\n        if (!center) {\n            return center;\n        }\n        return toUserCoordinate(center, this.getProjection());\n    };\n    /**\n     * Get the view center without transforming to user projection.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n     */\n    View.prototype.getCenterInternal = function () {\n        return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(ViewProperty.CENTER));\n    };\n    /**\n     * @return {Constraints} Constraints.\n     */\n    View.prototype.getConstraints = function () {\n        return this.constraints_;\n    };\n    /**\n     * @return {boolean} Resolution constraint is set\n     */\n    View.prototype.getConstrainResolution = function () {\n        return this.options_.constrainResolution;
 \n    };\n    /**\n     * @param {Array<number>=} opt_hints Destination array.\n     * @return {Array<number>} Hint.\n     */\n    View.prototype.getHints = function (opt_hints) {\n        if (opt_hints !== undefined) {\n            opt_hints[0] = this.hints_[0];\n            opt_hints[1] = this.hints_[1];\n            return opt_hints;\n        }\n        else {\n            return this.hints_.slice();\n        }\n    };\n    /**\n     * Calculate the extent for the current view state and the passed size.\n     * The size is the pixel dimensions of the box into which the calculated extent\n     * should fit. In most cases you want to get the extent of the entire map,\n     * that is `map.getSize()`.\n     * @param {import(\"./size.js\").Size=} opt_size Box pixel size. If not provided, the size\n     * of the map that uses this view will be used.\n     * @return {import(\"./extent.js\").Extent} Extent.\n     * @api\n     */\n    View.prototype.calculateExtent = function (opt_size) {
 \n        var extent = this.calculateExtentInternal(opt_size);\n        return toUserExtent(extent, this.getProjection());\n    };\n    /**\n     * @param {import(\"./size.js\").Size=} opt_size Box pixel size. If not provided, the size of the\n     * first map that uses this view will be used.\n     * @return {import(\"./extent.js\").Extent} Extent.\n     */\n    View.prototype.calculateExtentInternal = function (opt_size) {\n        var size = opt_size || this.getViewportSize_();\n        var center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (this.getCenterInternal());\n        assert(center, 1); // The view center is not defined\n        var resolution = /** @type {!number} */ (this.getResolution());\n        assert(resolution !== undefined, 2); // The view resolution is not defined\n        var rotation = /** @type {!number} */ (this.getRotation());\n        assert(rotation !== undefined, 3); // The view rotation is not defined\n        return getForViewAndSize(cent
 er, resolution, rotation, size);\n    };\n    /**\n     * Get the maximum resolution of the view.\n     * @return {number} The maximum resolution of the view.\n     * @api\n     */\n    View.prototype.getMaxResolution = function () {\n        return this.maxResolution_;\n    };\n    /**\n     * Get the minimum resolution of the view.\n     * @return {number} The minimum resolution of the view.\n     * @api\n     */\n    View.prototype.getMinResolution = function () {\n        return this.minResolution_;\n    };\n    /**\n     * Get the maximum zoom level for the view.\n     * @return {number} The maximum zoom level.\n     * @api\n     */\n    View.prototype.getMaxZoom = function () {\n        return /** @type {number} */ (this.getZoomForResolution(this.minResolution_));\n    };\n    /**\n     * Set a new maximum zoom level for the view.\n     * @param {number} zoom The maximum zoom level.\n     * @api\n     */\n    View.prototype.setMaxZoom = function (zoom) {\n        this.applyOpt
 ions_(this.getUpdatedOptions_({ maxZoom: zoom }));\n    };\n    /**\n     * Get the minimum zoom level for the view.\n     * @return {number} The minimum zoom level.\n     * @api\n     */\n    View.prototype.getMinZoom = function () {\n        return /** @type {number} */ (this.getZoomForResolution(this.maxResolution_));\n    };\n    /**\n     * Set a new minimum zoom level for the view.\n     * @param {number} zoom The minimum zoom level.\n     * @api\n     */\n    View.prototype.setMinZoom = function (zoom) {\n        this.applyOptions_(this.getUpdatedOptions_({ minZoom: zoom }));\n    };\n    /**\n     * Set whether the view shoud allow intermediary zoom levels.\n     * @param {boolean} enabled Whether the resolution is constrained.\n     * @api\n     */\n    View.prototype.setConstrainResolution = function (enabled) {\n        this.applyOptions_(this.getUpdatedOptions_({ constrainResolution: enabled }));\n    };\n    /**\n     * Get the view projection.\n     * @return {import(\
 "./proj/Projection.js\").default} The projection of the view.\n     * @api\n     */\n    View.prototype.getProjection = function () {\n        return this.projection_;\n    };\n    /**\n     * Get the view resolution.\n     * @return {number|undefined} The resolution of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.getResolution = function () {\n        return /** @type {number|undefined} */ (this.get(ViewProperty.RESOLUTION));\n    };\n    /**\n     * Get the resolutions for the view. This returns the array of resolutions\n     * passed to the constructor of the View, or undefined if none were given.\n     * @return {Array<number>|undefined} The resolutions of the view.\n     * @api\n     */\n    View.prototype.getResolutions = function () {\n        return this.resolutions_;\n    };\n    /**\n     * Get the resolution for a provided extent (in map units) and size (in pixels).\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {i
 mport(\"./size.js\").Size=} opt_size Box pixel size.\n     * @return {number} The resolution at which the provided extent will render at\n     *     the given size.\n     * @api\n     */\n    View.prototype.getResolutionForExtent = function (extent, opt_size) {\n        return this.getResolutionForExtentInternal(fromUserExtent(extent, this.getProjection()), opt_size);\n    };\n    /**\n     * Get the resolution for a provided extent (in map units) and size (in pixels).\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {import(\"./size.js\").Size=} opt_size Box pixel size.\n     * @return {number} The resolution at which the provided extent will render at\n     *     the given size.\n     */\n    View.prototype.getResolutionForExtentInternal = function (extent, opt_size) {\n        var size = opt_size || this.getViewportSize_();\n        var xResolution = getWidth(extent) / size[0];\n        var yResolution = getHeight(extent) / size[1];\n        return Ma
 th.max(xResolution, yResolution);\n    };\n    /**\n     * Return a function that returns a value between 0 and 1 for a\n     * resolution. Exponential scaling is assumed.\n     * @param {number=} opt_power Power.\n     * @return {function(number): number} Resolution for value function.\n     */\n    View.prototype.getResolutionForValueFunction = function (opt_power) {\n        var power = opt_power || 2;\n        var maxResolution = this.getConstrainedResolution(this.maxResolution_);\n        var minResolution = this.minResolution_;\n        var max = Math.log(maxResolution / minResolution) / Math.log(power);\n        return (\n        /**\n         * @param {number} value Value.\n         * @return {number} Resolution.\n         */\n        function (value) {\n            var resolution = maxResolution / Math.pow(power, value * max);\n            return resolution;\n        });\n    };\n    /**\n     * Get the view rotation.\n     * @return {number} The rotation of the view in rad
 ians.\n     * @observable\n     * @api\n     */\n    View.prototype.getRotation = function () {\n        return /** @type {number} */ (this.get(ViewProperty.ROTATION));\n    };\n    /**\n     * Return a function that returns a resolution for a value between\n     * 0 and 1. Exponential scaling is assumed.\n     * @param {number=} opt_power Power.\n     * @return {function(number): number} Value for resolution function.\n     */\n    View.prototype.getValueForResolutionFunction = function (opt_power) {\n        var logPower = Math.log(opt_power || 2);\n        var maxResolution = this.getConstrainedResolution(this.maxResolution_);\n        var minResolution = this.minResolution_;\n        var max = Math.log(maxResolution / minResolution) / logPower;\n        return (\n        /**\n         * @param {number} resolution Resolution.\n         * @return {number} Value.\n         */\n        function (resolution) {\n            var value = Math.log(maxResolution / resolution) / logPower /
  max;\n            return value;\n        });\n    };\n    /**\n     * @return {State} View state.\n     */\n    View.prototype.getState = function () {\n        var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (this.getCenterInternal());\n        var projection = this.getProjection();\n        var resolution = /** @type {number} */ (this.getResolution());\n        var rotation = this.getRotation();\n        return {\n            center: center.slice(0),\n            projection: projection !== undefined ? projection : null,\n            resolution: resolution,\n            rotation: rotation,\n            zoom: this.getZoom(),\n        };\n    };\n    /**\n     * Get the current zoom level. This method may return non-integer zoom levels\n     * if the view does not constrain the resolution, or if an interaction or\n     * animation is underway.\n     * @return {number|undefined} Zoom.\n     * @api\n     */\n    View.prototype.getZoom = function () {\n        var zo
 om;\n        var resolution = this.getResolution();\n        if (resolution !== undefined) {\n            zoom = this.getZoomForResolution(resolution);\n        }\n        return zoom;\n    };\n    /**\n     * Get the zoom level for a resolution.\n     * @param {number} resolution The resolution.\n     * @return {number|undefined} The zoom level for the provided resolution.\n     * @api\n     */\n    View.prototype.getZoomForResolution = function (resolution) {\n        var offset = this.minZoom_ || 0;\n        var max, zoomFactor;\n        if (this.resolutions_) {\n            var nearest = linearFindNearest(this.resolutions_, resolution, 1);\n            offset = nearest;\n            max = this.resolutions_[nearest];\n            if (nearest == this.resolutions_.length - 1) {\n                zoomFactor = 2;\n            }\n            else {\n                zoomFactor = max / this.resolutions_[nearest + 1];\n            }\n        }\n        else {\n            max = this.maxRe
 solution_;\n            zoomFactor = this.zoomFactor_;\n        }\n        return offset + Math.log(max / resolution) / Math.log(zoomFactor);\n    };\n    /**\n     * Get the resolution for a zoom level.\n     * @param {number} zoom Zoom level.\n     * @return {number} The view resolution for the provided zoom level.\n     * @api\n     */\n    View.prototype.getResolutionForZoom = function (zoom) {\n        if (this.resolutions_) {\n            if (this.resolutions_.length <= 1) {\n                return 0;\n            }\n            var baseLevel = clamp(Math.floor(zoom), 0, this.resolutions_.length - 2);\n            var zoomFactor = this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1];\n            return (this.resolutions_[baseLevel] /\n                Math.pow(zoomFactor, clamp(zoom - baseLevel, 0, 1)));\n        }\n        else {\n            return (this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_));\n        }\n    };\n    /**\n     * Fit the
  given geometry or extent based on the given map size and border.\n     * The size is pixel dimensions of the box to fit the extent into.\n     * In most cases you will want to use the map size, that is `map.getSize()`.\n     * Takes care of the map angle.\n     * @param {import(\"./geom/SimpleGeometry.js\").default|import(\"./extent.js\").Extent} geometryOrExtent The geometry or\n     *     extent to fit the view to.\n     * @param {FitOptions=} opt_options Options.\n     * @api\n     */\n    View.prototype.fit = function (geometryOrExtent, opt_options) {\n        var options = assign({ size: this.getViewportSize_() }, opt_options || {});\n        /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n        var geometry;\n        assert(Array.isArray(geometryOrExtent) ||\n            typeof ( /** @type {?} */(geometryOrExtent).getSimplifiedGeometry) ===\n                'function', 24); // Invalid extent or geometry provided as `geometry`\n        if (Array.isArray(geometry
 OrExtent)) {\n            assert(!isEmpty(geometryOrExtent), 25); // Cannot fit empty extent provided as `geometry`\n            var extent = fromUserExtent(geometryOrExtent, this.getProjection());\n            geometry = polygonFromExtent(extent);\n        }\n        else if (geometryOrExtent.getType() === GeometryType.CIRCLE) {\n            var extent = fromUserExtent(geometryOrExtent.getExtent(), this.getProjection());\n            geometry = polygonFromExtent(extent);\n            geometry.rotate(this.getRotation(), getCenter(extent));\n        }\n        else {\n            var userProjection = getUserProjection();\n            if (userProjection) {\n                geometry = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometryOrExtent\n                    .clone()\n                    .transform(userProjection, this.getProjection()));\n            }\n            else {\n                geometry = geometryOrExtent;\n            }\n        }\n        this.fitIn
 ternal(geometry, options);\n    };\n    /**\n     * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n     * @param {FitOptions=} opt_options Options.\n     */\n    View.prototype.fitInternal = function (geometry, opt_options) {\n        var options = opt_options || {};\n        var size = options.size;\n        if (!size) {\n            size = this.getViewportSize_();\n        }\n        var padding = options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n        var nearest = options.nearest !== undefined ? options.nearest : false;\n        var minResolution;\n        if (options.minResolution !== undefined) {\n            minResolution = options.minResolution;\n        }\n        else if (options.maxZoom !== undefined) {\n            minResolution = this.getResolutionForZoom(options.maxZoom);\n        }\n        else {\n            minResolution = 0;\n        }\n        var coords = geometry.getFlatCoordinates();\n        // calculate rotated
  extent\n        var rotation = this.getRotation();\n        var cosAngle = Math.cos(-rotation);\n        var sinAngle = Math.sin(-rotation);\n        var minRotX = +Infinity;\n        var minRotY = +Infinity;\n        var maxRotX = -Infinity;\n        var maxRotY = -Infinity;\n        var stride = geometry.getStride();\n        for (var i = 0, ii = coords.length; i < ii; i += stride) {\n            var rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n            var rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle;\n            minRotX = Math.min(minRotX, rotX);\n            minRotY = Math.min(minRotY, rotY);\n            maxRotX = Math.max(maxRotX, rotX);\n            maxRotY = Math.max(maxRotY, rotY);\n        }\n        // calculate resolution\n        var resolution = this.getResolutionForExtentInternal([minRotX, minRotY, maxRotX, maxRotY], [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]);\n        resolution = isNaN(resolution)\n           
  ? minResolution\n            : Math.max(resolution, minResolution);\n        resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1);\n        // calculate center\n        sinAngle = -sinAngle; // go back to original rotation\n        var centerRotX = (minRotX + maxRotX) / 2;\n        var centerRotY = (minRotY + maxRotY) / 2;\n        centerRotX += ((padding[1] - padding[3]) / 2) * resolution;\n        centerRotY += ((padding[0] - padding[2]) / 2) * resolution;\n        var centerX = centerRotX * cosAngle - centerRotY * sinAngle;\n        var centerY = centerRotY * cosAngle + centerRotX * sinAngle;\n        var center = [centerX, centerY];\n        var callback = options.callback ? options.callback : VOID;\n        if (options.duration !== undefined) {\n            this.animateInternal({\n                resolution: resolution,\n                center: this.getConstrainedCenter(center, resolution),\n                duration: options.duration,\n                easing
 : options.easing,\n            }, callback);\n        }\n        else {\n            this.targetResolution_ = resolution;\n            this.targetCenter_ = center;\n            this.applyTargetState_(false, true);\n            animationCallback(callback, true);\n        }\n    };\n    /**\n     * Center on coordinate and view position.\n     * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"./size.js\").Size} size Box pixel size.\n     * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n     * @api\n     */\n    View.prototype.centerOn = function (coordinate, size, position) {\n        this.centerOnInternal(fromUserCoordinate(coordinate, this.getProjection()), size, position);\n    };\n    /**\n     * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"./size.js\").Size} size Box pixel size.\n     * @param {import(\"./pixel.js\").Pixel} position Position on th
 e view to center on.\n     */\n    View.prototype.centerOnInternal = function (coordinate, size, position) {\n        // calculate rotated position\n        var rotation = this.getRotation();\n        var cosAngle = Math.cos(-rotation);\n        var sinAngle = Math.sin(-rotation);\n        var rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n        var rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n        var resolution = this.getResolution();\n        rotX += (size[0] / 2 - position[0]) * resolution;\n        rotY += (position[1] - size[1] / 2) * resolution;\n        // go back to original angle\n        sinAngle = -sinAngle; // go back to original rotation\n        var centerX = rotX * cosAngle - rotY * sinAngle;\n        var centerY = rotY * cosAngle + rotX * sinAngle;\n        this.setCenterInternal([centerX, centerY]);\n    };\n    /**\n     * @return {boolean} Is defined.\n     */\n    View.prototype.isDef = function () {\n        return !!this.getC
 enterInternal() && this.getResolution() !== undefined;\n    };\n    /**\n     * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n     * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n     * @api\n     */\n    View.prototype.adjustCenter = function (deltaCoordinates) {\n        var center = toUserCoordinate(this.targetCenter_, this.getProjection());\n        this.setCenter([\n            center[0] + deltaCoordinates[0],\n            center[1] + deltaCoordinates[1],\n        ]);\n    };\n    /**\n     * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n     * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n     */\n    View.prototype.adjustCenterInternal = function (deltaCoordinates) {\n        var center = this.targetCenter_;\n        this.setCenterInternal([\n            center[0] + deltaCoordinates[0],\n            center[1]
  + deltaCoordinates[1],\n        ]);\n    };\n    /**\n     * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n     * constraint will apply.\n     * @param {number} ratio The ratio to apply on the view resolution.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     * @api\n     */\n    View.prototype.adjustResolution = function (ratio, opt_anchor) {\n        var anchor = opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection());\n        this.adjustResolutionInternal(ratio, anchor);\n    };\n    /**\n     * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n     * constraint will apply.\n     * @param {number} ratio The ratio to apply on the view resolution.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     */\n    View.prototype.adjustResolutionInternal = function (ratio, opt_anchor) {\n     
    var isMoving = this.getAnimating() || this.getInteracting();\n        var size = this.getViewportSize_(this.getRotation());\n        var newResolution = this.constraints_.resolution(this.targetResolution_ * ratio, 0, size, isMoving);\n        if (opt_anchor) {\n            this.targetCenter_ = this.calculateCenterZoom(newResolution, opt_anchor);\n        }\n        this.targetResolution_ *= ratio;\n        this.applyTargetState_();\n    };\n    /**\n     * Adds a value to the view zoom level, optionally using an anchor. Any resolution\n     * constraint will apply.\n     * @param {number} delta Relative value to add to the zoom level.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     * @api\n     */\n    View.prototype.adjustZoom = function (delta, opt_anchor) {\n        this.adjustResolution(Math.pow(this.zoomFactor_, -delta), opt_anchor);\n    };\n    /**\n     * Adds a value to the view rotation, optionally using an anc
 hor. Any rotation\n     * constraint will apply.\n     * @param {number} delta Relative value to add to the zoom rotation, in radians.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The rotation center.\n     * @api\n     */\n    View.prototype.adjustRotation = function (delta, opt_anchor) {\n        if (opt_anchor) {\n            opt_anchor = fromUserCoordinate(opt_anchor, this.getProjection());\n        }\n        this.adjustRotationInternal(delta, opt_anchor);\n    };\n    /**\n     * @param {number} delta Relative value to add to the zoom rotation, in radians.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The rotation center.\n     */\n    View.prototype.adjustRotationInternal = function (delta, opt_anchor) {\n        var isMoving = this.getAnimating() || this.getInteracting();\n        var newRotation = this.constraints_.rotation(this.targetRotation_ + delta, isMoving);\n        if (opt_anchor) {\n            this.targetCenter_ = this.
 calculateCenterRotate(newRotation, opt_anchor);\n        }\n        this.targetRotation_ += delta;\n        this.applyTargetState_();\n    };\n    /**\n     * Set the center of the current view. Any extent constraint will apply.\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.setCenter = function (center) {\n        this.setCenterInternal(fromUserCoordinate(center, this.getProjection()));\n    };\n    /**\n     * Set the center using the view projection (not the user projection).\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n     */\n    View.prototype.setCenterInternal = function (center) {\n        this.targetCenter_ = center;\n        this.applyTargetState_();\n    };\n    /**\n     * @param {import(\"./ViewHint.js\").default} hint Hint.\n     * @param {number} delta Delta.\n     * @return {number} New value.\n     */\n
     View.prototype.setHint = function (hint, delta) {\n        this.hints_[hint] += delta;\n        this.changed();\n        return this.hints_[hint];\n    };\n    /**\n     * Set the resolution for this view. Any resolution constraint will apply.\n     * @param {number|undefined} resolution The resolution of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.setResolution = function (resolution) {\n        this.targetResolution_ = resolution;\n        this.applyTargetState_();\n    };\n    /**\n     * Set the rotation for this view. Any rotation constraint will apply.\n     * @param {number} rotation The rotation of the view in radians.\n     * @observable\n     * @api\n     */\n    View.prototype.setRotation = function (rotation) {\n        this.targetRotation_ = rotation;\n        this.applyTargetState_();\n    };\n    /**\n     * Zoom to a specific zoom level. Any resolution constrain will apply.\n     * @param {number} zoom Zoom level.\n     * @api\n     */
 \n    View.prototype.setZoom = function (zoom) {\n        this.setResolution(this.getResolutionForZoom(zoom));\n    };\n    /**\n     * Recompute rotation/resolution/center based on target values.\n     * Note: we have to compute rotation first, then resolution and center considering that\n     * parameters can influence one another in case a view extent constraint is present.\n     * @param {boolean=} opt_doNotCancelAnims Do not cancel animations.\n     * @param {boolean=} opt_forceMoving Apply constraints as if the view is moving.\n     * @private\n     */\n    View.prototype.applyTargetState_ = function (opt_doNotCancelAnims, opt_forceMoving) {\n        var isMoving = this.getAnimating() || this.getInteracting() || opt_forceMoving;\n        // compute rotation\n        var newRotation = this.constraints_.rotation(this.targetRotation_, isMoving);\n        var size = this.getViewportSize_(newRotation);\n        var newResolution = this.constraints_.resolution(this.targetResolution_
 , 0, size, isMoving);\n        var newCenter = this.constraints_.center(this.targetCenter_, newResolution, size, isMoving);\n        if (this.get(ViewProperty.ROTATION) !== newRotation) {\n            this.set(ViewProperty.ROTATION, newRotation);\n        }\n        if (this.get(ViewProperty.RESOLUTION) !== newResolution) {\n            this.set(ViewProperty.RESOLUTION, newResolution);\n        }\n        if (!this.get(ViewProperty.CENTER) ||\n            !equals(this.get(ViewProperty.CENTER), newCenter)) {\n            this.set(ViewProperty.CENTER, newCenter);\n        }\n        if (this.getAnimating() && !opt_doNotCancelAnims) {\n            this.cancelAnimations();\n        }\n        this.cancelAnchor_ = undefined;\n    };\n    /**\n     * If any constraints need to be applied, an animation will be triggered.\n     * This is typically done on interaction end.\n     * Note: calling this with a duration of 0 will apply the constrained values straight away,\n     * without animati
 on.\n     * @param {number=} opt_duration The animation duration in ms.\n     * @param {number=} opt_resolutionDirection Which direction to zoom.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     */\n    View.prototype.resolveConstraints = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n        var duration = opt_duration !== undefined ? opt_duration : 200;\n        var direction = opt_resolutionDirection || 0;\n        var newRotation = this.constraints_.rotation(this.targetRotation_);\n        var size = this.getViewportSize_(newRotation);\n        var newResolution = this.constraints_.resolution(this.targetResolution_, direction, size);\n        var newCenter = this.constraints_.center(this.targetCenter_, newResolution, size);\n        if (duration === 0 && !this.cancelAnchor_) {\n            this.targetResolution_ = newResolution;\n            this.targetRotation_ = newRotation;\n            this.targetCen
 ter_ = newCenter;\n            this.applyTargetState_();\n            return;\n        }\n        var anchor = opt_anchor || (duration === 0 ? this.cancelAnchor_ : undefined);\n        this.cancelAnchor_ = undefined;\n        if (this.getResolution() !== newResolution ||\n            this.getRotation() !== newRotation ||\n            !this.getCenterInternal() ||\n            !equals(this.getCenterInternal(), newCenter)) {\n            if (this.getAnimating()) {\n                this.cancelAnimations();\n            }\n            this.animateInternal({\n                rotation: newRotation,\n                center: newCenter,\n                resolution: newResolution,\n                duration: duration,\n                easing: easeOut,\n                anchor: anchor,\n            });\n        }\n    };\n    /**\n     * Notify the View that an interaction has started.\n     * The view state will be resolved to a stable one if needed\n     * (depending on its constraints).\n     
 * @api\n     */\n    View.prototype.beginInteraction = function () {\n        this.resolveConstraints(0);\n        this.setHint(ViewHint.INTERACTING, 1);\n    };\n    /**\n     * Notify the View that an interaction has ended. The view state will be resolved\n     * to a stable one if needed (depending on its constraints).\n     * @param {number=} opt_duration Animation duration in ms.\n     * @param {number=} opt_resolutionDirection Which direction to zoom.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     * @api\n     */\n    View.prototype.endInteraction = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n        var anchor = opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection());\n        this.endInteractionInternal(opt_duration, opt_resolutionDirection, anchor);\n    };\n    /**\n     * Notify the View that an interaction has ended. The view state will be resolved\n     * to a stable one if neede
 d (depending on its constraints).\n     * @param {number=} opt_duration Animation duration in ms.\n     * @param {number=} opt_resolutionDirection Which direction to zoom.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     */\n    View.prototype.endInteractionInternal = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n        this.setHint(ViewHint.INTERACTING, -1);\n        this.resolveConstraints(opt_duration, opt_resolutionDirection, opt_anchor);\n    };\n    /**\n     * Get a valid position for the view center according to the current constraints.\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} targetCenter Target center position.\n     * @param {number=} opt_targetResolution Target resolution. If not supplied, the current one will be used.\n     * This is useful to guess a valid center position at a different zoom level.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Val
 id center position.\n     */\n    View.prototype.getConstrainedCenter = function (targetCenter, opt_targetResolution) {\n        var size = this.getViewportSize_(this.getRotation());\n        return this.constraints_.center(targetCenter, opt_targetResolution || this.getResolution(), size);\n    };\n    /**\n     * Get a valid zoom level according to the current view constraints.\n     * @param {number|undefined} targetZoom Target zoom.\n     * @param {number=} [opt_direction=0] Indicate which resolution should be used\n     * by a renderer if the view resolution does not match any resolution of the tile source.\n     * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n     * will be used. If -1, the nearest higher resolution will be used.\n     * @return {number|undefined} Valid zoom level.\n     */\n    View.prototype.getConstrainedZoom = function (targetZoom, opt_direction) {\n        var targetRes = this.getResolutionForZoom(targetZoom);\n        retu
 rn this.getZoomForResolution(this.getConstrainedResolution(targetRes, opt_direction));\n    };\n    /**\n     * Get a valid resolution according to the current view constraints.\n     * @param {number|undefined} targetResolution Target resolution.\n     * @param {number=} [opt_direction=0] Indicate which resolution should be used\n     * by a renderer if the view resolution does not match any resolution of the tile source.\n     * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n     * will be used. If -1, the nearest higher resolution will be used.\n     * @return {number|undefined} Valid resolution.\n     */\n    View.prototype.getConstrainedResolution = function (targetResolution, opt_direction) {\n        var direction = opt_direction || 0;\n        var size = this.getViewportSize_(this.getRotation());\n        return this.constraints_.resolution(targetResolution, direction, size);\n    };\n    return View;\n}(BaseObject));\n/**\n * @param {Function
 } callback Callback.\n * @param {*} returnValue Return value.\n */\nfunction animationCallback(callback, returnValue) {\n    setTimeout(function () {\n        callback(returnValue);\n    }, 0);\n}\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./centerconstraint.js\").Type} The constraint.\n */\nexport function createCenterConstraint(options) {\n    if (options.extent !== undefined) {\n        var smooth = options.smoothExtentConstraint !== undefined\n            ? options.smoothExtentConstraint\n            : true;\n        return createExtent(options.extent, options.constrainOnlyCenter, smooth);\n    }\n    var projection = createProjection(options.projection, 'EPSG:3857');\n    if (options.multiWorld !== true && projection.isGlobal()) {\n        var extent = projection.getExtent().slice();\n        extent[0] = -Infinity;\n        extent[2] = Infinity;\n        return createExtent(extent, false, false);\n    }\n    return centerNone;\n}\n/**\n * @param {
 ViewOptions} options View options.\n * @return {{constraint: import(\"./resolutionconstraint.js\").Type, maxResolution: number,\n *     minResolution: number, minZoom: number, zoomFactor: number}} The constraint.\n */\nexport function createResolutionConstraint(options) {\n    var resolutionConstraint;\n    var maxResolution;\n    var minResolution;\n    // TODO: move these to be ol constants\n    // see https://github.com/openlayers/openlayers/issues/2076\n    var defaultMaxZoom = 28;\n    var defaultZoomFactor = 2;\n    var minZoom = options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM;\n    var maxZoom = options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom;\n    var zoomFactor = options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor;\n    var multiWorld = options.multiWorld !== undefined ? options.multiWorld : false;\n    var smooth = options.smoothResolutionConstraint !== undefined\n        ? options.smoothResolutionConstraint\n      
   : true;\n    var showFullExtent = options.showFullExtent !== undefined ? options.showFullExtent : false;\n    var projection = createProjection(options.projection, 'EPSG:3857');\n    var projExtent = projection.getExtent();\n    var constrainOnlyCenter = options.constrainOnlyCenter;\n    var extent = options.extent;\n    if (!multiWorld && !extent && projection.isGlobal()) {\n        constrainOnlyCenter = false;\n        extent = projExtent;\n    }\n    if (options.resolutions !== undefined) {\n        var resolutions = options.resolutions;\n        maxResolution = resolutions[minZoom];\n        minResolution =\n            resolutions[maxZoom] !== undefined\n                ? resolutions[maxZoom]\n                : resolutions[resolutions.length - 1];\n        if (options.constrainResolution) {\n            resolutionConstraint = createSnapToResolutions(resolutions, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n        else {\n            resolutionConstrai
 nt = createMinMaxResolution(maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n    }\n    else {\n        // calculate the default min and max resolution\n        var size = !projExtent\n            ? // use an extent that can fit the whole world if need be\n                (360 * METERS_PER_UNIT[Units.DEGREES]) / projection.getMetersPerUnit()\n            : Math.max(getWidth(projExtent), getHeight(projExtent));\n        var defaultMaxResolution = size / DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM);\n        var defaultMinResolution = defaultMaxResolution /\n            Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n        // user provided maxResolution takes precedence\n        maxResolution = options.maxResolution;\n        if (maxResolution !== undefined) {\n            minZoom = 0;\n        }\n        else {\n            maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n 
        }\n        // user provided minResolution takes precedence\n        minResolution = options.minResolution;\n        if (minResolution === undefined) {\n            if (options.maxZoom !== undefined) {\n                if (options.maxResolution !== undefined) {\n                    minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);\n                }\n                else {\n                    minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n                }\n            }\n            else {\n                minResolution = defaultMinResolution;\n            }\n        }\n        // given discrete zoom levels, minResolution may be different than provided\n        maxZoom =\n            minZoom +\n                Math.floor(Math.log(maxResolution / minResolution) / Math.log(zoomFactor));\n        minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n        if (options.constrainResolution) {\n            resolutionConstra
 int = createSnapToPower(zoomFactor, maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n        else {\n            resolutionConstraint = createMinMaxResolution(maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n    }\n    return {\n        constraint: resolutionConstraint,\n        maxResolution: maxResolution,\n        minResolution: minResolution,\n        minZoom: minZoom,\n        zoomFactor: zoomFactor,\n    };\n}\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./rotationconstraint.js\").Type} Rotation constraint.\n */\nexport function createRotationConstraint(options) {\n    var enableRotation = options.enableRotation !== undefined ? options.enableRotation : true;\n    if (enableRotation) {\n        var constrainRotation = options.constrainRotation;\n        if (constrainRotation === undefined || constrainRotation === true) {\n            return createSnap
 ToZero();\n        }\n        else if (constrainRotation === false) {\n            return rotationNone;\n        }\n        else if (typeof constrainRotation === 'number') {\n            return createSnapToN(constrainRotation);\n        }\n        else {\n            return rotationNone;\n        }\n    }\n    else {\n        return disable;\n    }\n}\n/**\n * Determine if an animation involves no view change.\n * @param {Animation} animation The animation.\n * @return {boolean} The animation involves no view change.\n */\nexport function isNoopAnimation(animation) {\n    if (animation.sourceCenter && animation.targetCenter) {\n        if (!coordinatesEqual(animation.sourceCenter, animation.targetCenter)) {\n            return false;\n        }\n    }\n    if (animation.sourceResolution !== animation.targetResolution) {\n        return false;\n    }\n    if (animation.sourceRotation !== animation.targetRotation) {\n        return false;\n    }\n    return true;\n}\nexport default Vi
 ew;\n//# sourceMappingURL=View.js.map","/**\n * @module ol/tilegrid/common\n */\n/**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */\nexport var DEFAULT_MAX_ZOOM = 42;\n/**\n * Default tile size.\n * @type {number}\n */\nexport var DEFAULT_TILE_SIZE = 256;\n//# sourceMappingURL=common.js.map","/**\n * @module ol/size\n */\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array<number>} Size\n * @api\n */\n/**\n * Returns a buffered size.\n * @param {Size} size Size.\n * @param {number} num The amount by which to buffer.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} The buffered size.\n */\nexport function buffer(size, num, opt_size) {\n    if (opt_size === undefined) {\n        opt_size = [0, 0];\n    }\n    opt_size[0] = size[0] + 2 * num;\n    opt_size[1] = size[1] + 2 * num;\n    return opt_size;\n}\n/**\n * Determines if a size has a positive area.\n * @param {Size} size The size to test.\n 
 * @return {boolean} The size has a positive area.\n */\nexport function hasArea(size) {\n    return size[0] > 0 && size[1] > 0;\n}\n/**\n * Returns a size scaled by a ratio. The result will be an array of integers.\n * @param {Size} size Size.\n * @param {number} ratio Ratio.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} The scaled size.\n */\nexport function scale(size, ratio, opt_size) {\n    if (opt_size === undefined) {\n        opt_size = [0, 0];\n    }\n    opt_size[0] = (size[0] * ratio + 0.5) | 0;\n    opt_size[1] = (size[1] * ratio + 0.5) | 0;\n    return opt_size;\n}\n/**\n * Returns an `Size` array for the passed in number (meaning: square) or\n * `Size` array.\n * (meaning: non-square),\n * @param {number|Size} size Width and height.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} Size.\n * @api\n */\nexport function toSize(size, opt_size) {\n    if (Array.isArray(size)) {\n        return size;\n    }\n    else 
 {\n        if (opt_size === undefined) {\n            opt_size = [size, size];\n        }\n        else {\n            opt_size[0] = size;\n            opt_size[1] = size;\n        }\n        return opt_size;\n    }\n}\n//# sourceMappingURL=size.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/PluggableMap\n */\nimport BaseObject, { getChangeEventType } from './Object.js';\nimport Collection from './Collection.js';\
 nimport CollectionEventType from './CollectionEventType.js';\nimport EventType from './events/EventType.js';\nimport LayerGroup from './layer/Group.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventHandler from './MapBrowserEventHandler.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport MapEvent from './MapEvent.js';\nimport MapEventType from './MapEventType.js';\nimport MapProperty from './MapProperty.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport RenderEventType from './render/EventType.js';\nimport TileQueue, { getTilePriority } from './TileQueue.js';\nimport View from './View.js';\nimport ViewHint from './ViewHint.js';\nimport { DEVICE_PIXEL_RATIO, IMAGE_DECODE, PASSIVE_EVENT_LISTENERS, } from './has.js';\nimport { TRUE } from './functions.js';\nimport { apply as applyTransform, create as createTransform, } from './transform.js';\nimport { assert } fro
 m './asserts.js';\nimport { clone, createOrUpdateEmpty, equals, getForViewAndSize, isEmpty, } from './extent.js';\nimport { fromUserCoordinate, toUserCoordinate } from './proj.js';\nimport { hasArea } from './size.js';\nimport { listen, unlistenByKey } from './events.js';\nimport { removeNode } from './dom.js';\n/**\n * State of the current frame. Only `pixelRatio`, `time` and `viewState` should\n * be used in applications.\n * @typedef {Object} FrameState\n * @property {number} pixelRatio The pixel ratio of the frame.\n * @property {number} time The time when rendering of the frame was requested.\n * @property {import(\"./View.js\").State} viewState The state of the current view.\n * @property {boolean} animate\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform\n * @property {null|import(\"./extent.js\").Extent} extent\n * @property {Array<DeclutterItems>} declutterItems\n * @property {number} index\n * @property {Array<import(\"./layer/Layer.js\").Stat
 e>} layerStatesArray\n * @property {number} layerIndex\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform\n * @property {Array<PostRenderFunction>} postRenderFunctions\n * @property {import(\"./size.js\").Size} size\n * @property {TileQueue} tileQueue\n * @property {!Object<string, Object<string, boolean>>} usedTiles\n * @property {Array<number>} viewHints\n * @property {!Object<string, Object<string, boolean>>} wantedTiles\n */\n/**\n * @typedef {Object} DeclutterItems\n * @property {Array<*>} items Declutter items of an executor.\n * @property {number} opacity Layer opacity.\n */\n/**\n * @typedef {function(PluggableMap, ?FrameState): any} PostRenderFunction\n */\n/**\n * @typedef {Object} AtPixelOptions\n * @property {undefined|function(import(\"./layer/Layer.js\").default): boolean} [layerFilter] Layer filter\n * function. The filter function will receive one argument, the\n * {@link module:ol/layer/Layer layer-candidate} and it should return a boole
 an value.\n * Only layers which are visible and for which this function returns `true`\n * will be tested for features. By default, all visible layers will be tested.\n * @property {number} [hitTolerance=0] Hit-detection tolerance in pixels. Pixels\n * inside the radius around the given position will be checked for features.\n * @property {boolean} [checkWrapped=true] Check-Wrapped Will check for for wrapped geometries inside the range of\n *   +/- 1 world width. Works only if a projection is used that can be wrapped.\n */\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection<import(\"./control/Control.js\").default>} [controls]\n * @property {Collection<import(\"./interaction/Interaction.js\").default>} [interactions]\n * @property {HTMLElement|Document} keyboardEventTarget\n * @property {Collection<import(\"./Overlay.js\").default>} overlays\n * @property {Object<string, *>} values\n */\n/**\n * Object literal with config options for the map.\n * @typedef {Object
 } MapOptions\n * @property {Collection<import(\"./control/Control.js\").default>|Array<import(\"./control/Control.js\").default>} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control~defaults} is used.\n * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between\n * physical pixels and device-independent pixels (dips) on the device.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>|Array<import(\"./interaction/Interaction.js\").default>} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction~defaults} is used.\n * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to\n * listen to keyboard events on. This determines when the `KeyboardPan` and\n * `KeyboardZoom` interactions trigger. For example, if this option is set to\n * `document` the keyboard interactions will always trigger. If this option is\n * not sp
 ecified, the element the library listens to keyboard events on is the\n * map target (i.e. the user-provided div for the map). If this is not\n * `document`, the target element needs to be focused for key events to be\n * emitted, requiring that the target element has a `tabindex` attribute.\n * @property {Array<import(\"./layer/Base.js\").default>|Collection<import(\"./layer/Base.js\").default>|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be rendered. Note\n * that layers are rendered in the order supplied, so if you want, for example,\n * a vector layer to appear on top of a tile layer, it must come after the tile\n * layer.\n * @property {number} [maxTilesLoading=16] Maximum number tiles to load\n * simultaneously.\n * @property {number} [moveTolerance=1] The minimum distance in pixels the\n * cursor must move to be detected as a map move event instead of a click.\n * Increasing this value can make it easier to click on the map.\n * @property
  {Collection<import(\"./Overlay.js\").default>|Array<import(\"./Overlay.js\").default>} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string} [target] The container for the map, either the\n * element itself or the `id` of the element. If not specified at construction\n * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be\n * rendered.\n * @property {View} [view] The map's view.  No layer sources will be\n * fetched unless this is specified at construction time or through\n * {@link module:ol/Map~Map#setView}.\n */\n/**\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires import(\"./render/Event.js\").default#precompose\n * @fires import(\"./render/Event.js\").default#postcompose\n * @fires import(\"./render/Event.js\").default#rendercomplete\n * @api\n */\nvar PluggableMap = /** @class */ (function (_super) {\n    __extends(Plug
 gableMap, _super);\n    /**\n     * @param {MapOptions} options Map options.\n     */\n    function PluggableMap(options) {\n        var _this = _super.call(this) || this;\n        var optionsInternal = createOptionsInternal(options);\n        /** @private */\n        _this.boundHandleBrowserEvent_ = _this.handleBrowserEvent.bind(_this);\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxTilesLoading_ =\n            options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ =\n            options.pixelRatio !== undefined\n                ? options.pixelRatio\n                : DEVICE_PIXEL_RATIO;\n        /**\n         * @private\n         * @type {*}\n         */\n        _this.postRenderTimeoutHandle_;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.animationDelayKey_;\n        /*
 *\n         * @private\n         */\n        _this.animationDelay_ = function () {\n            this.animationDelayKey_ = undefined;\n            this.renderFrame_(Date.now());\n        }.bind(_this);\n        /**\n         * @private\n         * @type {import(\"./transform.js\").Transform}\n         */\n        _this.coordinateToPixelTransform_ = createTransform();\n        /**\n         * @private\n         * @type {import(\"./transform.js\").Transform}\n         */\n        _this.pixelToCoordinateTransform_ = createTransform();\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.frameIndex_ = 0;\n        /**\n         * @private\n         * @type {?FrameState}\n         */\n        _this.frameState_ = null;\n        /**\n         * The extent at the previous 'moveend' event.\n         * @private\n         * @type {import(\"./extent.js\").Extent}\n         */\n        _this.previousExtent_ = null;\n        /**\n         * @private\n         * @
 type {?import(\"./events.js\").EventsKey}\n         */\n        _this.viewPropertyListenerKey_ = null;\n        /**\n         * @private\n         * @type {?import(\"./events.js\").EventsKey}\n         */\n        _this.viewChangeListenerKey_ = null;\n        /**\n         * @private\n         * @type {?Array<import(\"./events.js\").EventsKey>}\n         */\n        _this.layerGroupPropertyListenerKeys_ = null;\n        /**\n         * @private\n         * @type {!HTMLElement}\n         */\n        _this.viewport_ = document.createElement('div');\n        _this.viewport_.className =\n            'ol-viewport' + ('ontouchstart' in window ? ' ol-touch' : '');\n        _this.viewport_.style.position = 'relative';\n        _this.viewport_.style.overflow = 'hidden';\n        _this.viewport_.style.width = '100%';\n        _this.viewport_.style.height = '100%';\n        /**\n         * @private\n         * @type {!HTMLElement}\n         */\n        _this.overlayContainer_ = document.create
 Element('div');\n        _this.overlayContainer_.style.position = 'absolute';\n        _this.overlayContainer_.style.zIndex = '0';\n        _this.overlayContainer_.style.width = '100%';\n        _this.overlayContainer_.style.height = '100%';\n        _this.overlayContainer_.style.pointerEvents = 'none';\n        _this.overlayContainer_.className = 'ol-overlaycontainer';\n        _this.viewport_.appendChild(_this.overlayContainer_);\n        /**\n         * @private\n         * @type {!HTMLElement}\n         */\n        _this.overlayContainerStopEvent_ = document.createElement('div');\n        _this.overlayContainerStopEvent_.style.position = 'absolute';\n        _this.overlayContainerStopEvent_.style.zIndex = '0';\n        _this.overlayContainerStopEvent_.style.width = '100%';\n        _this.overlayContainerStopEvent_.style.height = '100%';\n        _this.overlayContainerStopEvent_.style.pointerEvents = 'none';\n        _this.overlayContainerStopEvent_.className = 'ol-overlaycontain
 er-stopevent';\n        _this.viewport_.appendChild(_this.overlayContainerStopEvent_);\n        /**\n         * @private\n         * @type {MapBrowserEventHandler}\n         */\n        _this.mapBrowserEventHandler_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.moveTolerance_ = options.moveTolerance;\n        /**\n         * @private\n         * @type {HTMLElement|Document}\n         */\n        _this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n        /**\n         * @private\n         * @type {?Array<import(\"./events.js\").EventsKey>}\n         */\n        _this.keyHandlerKeys_ = null;\n        /**\n         * @type {Collection<import(\"./control/Control.js\").default>}\n         * @protected\n         */\n        _this.controls = optionsInternal.controls || new Collection();\n        /**\n         * @type {Collection<import(\"./interaction/Interaction.js\").default>}\n         * @protected\n         */\n        
 _this.interactions = optionsInternal.interactions || new Collection();\n        /**\n         * @type {Collection<import(\"./Overlay.js\").default>}\n         * @private\n         */\n        _this.overlays_ = optionsInternal.overlays;\n        /**\n         * A lookup of overlays by id.\n         * @private\n         * @type {Object<string, import(\"./Overlay.js\").default>}\n         */\n        _this.overlayIdIndex_ = {};\n        /**\n         * @type {import(\"./renderer/Map.js\").default}\n         * @private\n         */\n        _this.renderer_ = null;\n        /**\n         * @type {undefined|function(Event): void}\n         * @private\n         */\n        _this.handleResize_;\n        /**\n         * @private\n         * @type {!Array<PostRenderFunction>}\n         */\n        _this.postRenderFunctions_ = [];\n        /**\n         * @private\n         * @type {TileQueue}\n         */\n        _this.tileQueue_ = new TileQueue(_this.getTilePriority.bind(_this), _this.handl
 eTileChange_.bind(_this));\n        _this.addEventListener(getChangeEventType(MapProperty.LAYERGROUP), _this.handleLayerGroupChanged_);\n        _this.addEventListener(getChangeEventType(MapProperty.VIEW), _this.handleViewChanged_);\n        _this.addEventListener(getChangeEventType(MapProperty.SIZE), _this.handleSizeChanged_);\n        _this.addEventListener(getChangeEventType(MapProperty.TARGET), _this.handleTargetChanged_);\n        // setProperties will trigger the rendering of the map if the map\n        // is \"defined\" already.\n        _this.setProperties(optionsInternal.values);\n        _this.controls.forEach(\n        /**\n         * @param {import(\"./control/Control.js\").default} control Control.\n         * @this {PluggableMap}\n         */\n        function (control) {\n            control.setMap(this);\n        }.bind(_this));\n        _this.controls.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEv
 ent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(this);\n        }.bind(_this));\n        _this.controls.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(null);\n        }.bind(_this));\n        _this.interactions.forEach(\n        /**\n         * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction.\n         * @this {PluggableMap}\n         */\n        function (interaction) {\n            interaction.setMap(this);\n        }.bind(_this));\n        _this.interactions.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(this);\n        }.bind(_this));\n        _this.i
 nteractions.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(null);\n        }.bind(_this));\n        _this.overlays_.forEach(_this.addOverlayInternal_.bind(_this));\n        _this.overlays_.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            this.addOverlayInternal_(\n            /** @type {import(\"./Overlay.js\").default} */ (event.element));\n        }.bind(_this));\n        _this.overlays_.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            var overlay = /** @type {import(\"./Overlay.js\").default} */ (event.element);\
 n            var id = overlay.getId();\n            if (id !== undefined) {\n                delete this.overlayIdIndex_[id.toString()];\n            }\n            event.element.setMap(null);\n        }.bind(_this));\n        return _this;\n    }\n    /**\n     * @abstract\n     * @return {import(\"./renderer/Map.js\").default} The map renderer\n     */\n    PluggableMap.prototype.createRenderer = function () {\n        throw new Error('Use a map type that has a createRenderer method');\n    };\n    /**\n     * Add the given control to the map.\n     * @param {import(\"./control/Control.js\").default} control Control.\n     * @api\n     */\n    PluggableMap.prototype.addControl = function (control) {\n        this.getControls().push(control);\n    };\n    /**\n     * Add the given interaction to the map. If you want to add an interaction\n     * at another point of the collection use `getInteraction()` and the methods\n     * available on {@link module:ol/Collection~Collection}. Th
 is can be used to\n     * stop the event propagation from the handleEvent function. The interactions\n     * get to handle the events in the reverse order of this collection.\n     * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to add.\n     * @api\n     */\n    PluggableMap.prototype.addInteraction = function (interaction) {\n        this.getInteractions().push(interaction);\n    };\n    /**\n     * Adds the given layer to the top of this map. If you want to add a layer\n     * elsewhere in the stack, use `getLayers()` and the methods available on\n     * {@link module:ol/Collection~Collection}.\n     * @param {import(\"./layer/Base.js\").default} layer Layer.\n     * @api\n     */\n    PluggableMap.prototype.addLayer = function (layer) {\n        var layers = this.getLayerGroup().getLayers();\n        layers.push(layer);\n    };\n    /**\n     * Add the given overlay to the map.\n     * @param {import(\"./Overlay.js\").default} overlay Overlay.
 \n     * @api\n     */\n    PluggableMap.prototype.addOverlay = function (overlay) {\n        this.getOverlays().push(overlay);\n    };\n    /**\n     * This deals with map's overlay collection changes.\n     * @param {import(\"./Overlay.js\").default} overlay Overlay.\n     * @private\n     */\n    PluggableMap.prototype.addOverlayInternal_ = function (overlay) {\n        var id = overlay.getId();\n        if (id !== undefined) {\n            this.overlayIdIndex_[id.toString()] = overlay;\n        }\n        overlay.setMap(this);\n    };\n    /**\n     *\n     * Clean up.\n     */\n    PluggableMap.prototype.disposeInternal = function () {\n        this.setTarget(null);\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Detect features that intersect a pixel on the viewport, and execute a\n     * callback with each intersecting feature. Layers included in the detection can\n     * be configured through the `layerFilter` option in `opt_options`.\n     * @
 param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {function(this: S, import(\"./Feature.js\").FeatureLike,\n     *     import(\"./layer/Layer.js\").default): T} callback Feature callback. The callback will be\n     *     called with two arguments. The first argument is one\n     *     {@link module:ol/Feature feature} or\n     *     {@link module:ol/render/Feature render feature} at the pixel, the second is\n     *     the {@link module:ol/layer/Layer layer} of the feature and will be null for\n     *     unmanaged layers. To stop detection, callback functions can return a\n     *     truthy value.\n     * @param {AtPixelOptions=} opt_options Optional options.\n     * @return {T|undefined} Callback result, i.e. the return value of last\n     * callback execution, or the first truthy callback return value.\n     * @template S,T\n     * @api\n     */\n    PluggableMap.prototype.forEachFeatureAtPixel = function (pixel, callback, opt_options) {\n        if (!this.frameSta
 te_) {\n            return;\n        }\n        var coordinate = this.getCoordinateFromPixelInternal(pixel);\n        opt_options = opt_options !== undefined ? opt_options : {};\n        var hitTolerance = opt_options.hitTolerance !== undefined\n            ? opt_options.hitTolerance * this.frameState_.pixelRatio\n            : 0;\n        var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;\n        var checkWrapped = opt_options.checkWrapped !== false;\n        return this.renderer_.forEachFeatureAtCoordinate(coordinate, this.frameState_, hitTolerance, checkWrapped, callback, null, layerFilter, null);\n    };\n    /**\n     * Get all features that intersect a pixel on the viewport.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {AtPixelOptions=} opt_options Optional options.\n     * @return {Array<import(\"./Feature.js\").FeatureLike>} The detected features or\n     * an empty array if none were found.\n     * @api\n 
     */\n    PluggableMap.prototype.getFeaturesAtPixel = function (pixel, opt_options) {\n        var features = [];\n        this.forEachFeatureAtPixel(pixel, function (feature) {\n            features.push(feature);\n        }, opt_options);\n        return features;\n    };\n    /**\n     * Detect layers that have a color value at a pixel on the viewport, and\n     * execute a callback with each matching layer. Layers included in the\n     * detection can be configured through `opt_layerFilter`.\n     *\n     * Note: this may give false positives unless the map layers have had different `className`\n     * properties assigned to them.\n     *\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {function(this: S, import(\"./layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback\n     *     Layer callback. This callback will receive two arguments: first is the\n     *     {@link module:ol/layer/Layer layer}, second argument is an array represen
 ting\n     *     [R, G, B, A] pixel values (0 - 255) and will be `null` for layer types\n     *     that do not currently support this argument. To stop detection, callback\n     *     functions can return a truthy value.\n     * @param {AtPixelOptions=} opt_options Configuration options.\n     * @return {T|undefined} Callback result, i.e. the return value of last\n     * callback execution, or the first truthy callback return value.\n     * @template S,T\n     * @api\n     */\n    PluggableMap.prototype.forEachLayerAtPixel = function (pixel, callback, opt_options) {\n        if (!this.frameState_) {\n            return;\n        }\n        var options = opt_options || {};\n        var hitTolerance = options.hitTolerance !== undefined\n            ? options.hitTolerance * this.frameState_.pixelRatio\n            : 0;\n        var layerFilter = options.layerFilter || TRUE;\n        return this.renderer_.forEachLayerAtPixel(pixel, this.frameState_, hitTolerance, callback, layerFilter)
 ;\n    };\n    /**\n     * Detect if features intersect a pixel on the viewport. Layers included in the\n     * detection can be configured through `opt_layerFilter`.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {AtPixelOptions=} opt_options Optional options.\n     * @return {boolean} Is there a feature at the given pixel?\n     * @api\n     */\n    PluggableMap.prototype.hasFeatureAtPixel = function (pixel, opt_options) {\n        if (!this.frameState_) {\n            return false;\n        }\n        var coordinate = this.getCoordinateFromPixelInternal(pixel);\n        opt_options = opt_options !== undefined ? opt_options : {};\n        var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;\n        var hitTolerance = opt_options.hitTolerance !== undefined\n            ? opt_options.hitTolerance * this.frameState_.pixelRatio\n            : 0;\n        var checkWrapped = opt_options.checkWrapped !== false;\n        ret
 urn this.renderer_.hasFeatureAtCoordinate(coordinate, this.frameState_, hitTolerance, checkWrapped, layerFilter, null);\n    };\n    /**\n     * Returns the coordinate in user projection for a browser event.\n     * @param {MouseEvent} event Event.\n     * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n     * @api\n     */\n    PluggableMap.prototype.getEventCoordinate = function (event) {\n        return this.getCoordinateFromPixel(this.getEventPixel(event));\n    };\n    /**\n     * Returns the coordinate in view projection for a browser event.\n     * @param {MouseEvent} event Event.\n     * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n     */\n    PluggableMap.prototype.getEventCoordinateInternal = function (event) {\n        return this.getCoordinateFromPixelInternal(this.getEventPixel(event));\n    };\n    /**\n     * Returns the map pixel position for a browser event relative to the viewport.\n     * @param {UIEvent} event Event.\n     * @retur
 n {import(\"./pixel.js\").Pixel} Pixel.\n     * @api\n     */\n    PluggableMap.prototype.getEventPixel = function (event) {\n        var viewportPosition = this.viewport_.getBoundingClientRect();\n        var eventPosition = \n        //FIXME Are we really calling this with a TouchEvent anywhere?\n        'changedTouches' in event\n            ? /** @type {TouchEvent} */ (event).changedTouches[0]\n            : /** @type {MouseEvent} */ (event);\n        return [\n            eventPosition.clientX - viewportPosition.left,\n            eventPosition.clientY - viewportPosition.top,\n        ];\n    };\n    /**\n     * Get the target in which this map is rendered.\n     * Note that this returns what is entered as an option or in setTarget:\n     * if that was an element, it returns an element; if a string, it returns that.\n     * @return {HTMLElement|string|undefined} The Element or id of the Element that the\n     *     map is rendered in.\n     * @observable\n     * @api\n     */\n
     PluggableMap.prototype.getTarget = function () {\n        return /** @type {HTMLElement|string|undefined} */ (this.get(MapProperty.TARGET));\n    };\n    /**\n     * Get the DOM element into which this map is rendered. In contrast to\n     * `getTarget` this method always return an `Element`, or `null` if the\n     * map has no target.\n     * @return {HTMLElement} The element that the map is rendered in.\n     * @api\n     */\n    PluggableMap.prototype.getTargetElement = function () {\n        var target = this.getTarget();\n        if (target !== undefined) {\n            return typeof target === 'string'\n                ? document.getElementById(target)\n                : target;\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * Get the coordinate for a given pixel.  This returns a coordinate in the\n     * user projection.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n     * @return {import(\
 "./coordinate.js\").Coordinate} The coordinate for the pixel position.\n     * @api\n     */\n    PluggableMap.prototype.getCoordinateFromPixel = function (pixel) {\n        return toUserCoordinate(this.getCoordinateFromPixelInternal(pixel), this.getView().getProjection());\n    };\n    /**\n     * Get the coordinate for a given pixel.  This returns a coordinate in the\n     * map view projection.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n     * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n     */\n    PluggableMap.prototype.getCoordinateFromPixelInternal = function (pixel) {\n        var frameState = this.frameState_;\n        if (!frameState) {\n            return null;\n        }\n        else {\n            return applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n        }\n    };\n    /**\n     * Get the map controls. Modifying this collection changes the controls\n  
    * associated with the map.\n     * @return {Collection<import(\"./control/Control.js\").default>} Controls.\n     * @api\n     */\n    PluggableMap.prototype.getControls = function () {\n        return this.controls;\n    };\n    /**\n     * Get the map overlays. Modifying this collection changes the overlays\n     * associated with the map.\n     * @return {Collection<import(\"./Overlay.js\").default>} Overlays.\n     * @api\n     */\n    PluggableMap.prototype.getOverlays = function () {\n        return this.overlays_;\n    };\n    /**\n     * Get an overlay by its identifier (the value returned by overlay.getId()).\n     * Note that the index treats string and numeric identifiers as the same. So\n     * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.\n     * @param {string|number} id Overlay identifier.\n     * @return {import(\"./Overlay.js\").default} Overlay.\n     * @api\n     */\n    PluggableMap.prototype.getOverlayById = function (id) {\n        var
  overlay = this.overlayIdIndex_[id.toString()];\n        return overlay !== undefined ? overlay : null;\n    };\n    /**\n     * Get the map interactions. Modifying this collection changes the interactions\n     * associated with the map.\n     *\n     * Interactions are used for e.g. pan, zoom and rotate.\n     * @return {Collection<import(\"./interaction/Interaction.js\").default>} Interactions.\n     * @api\n     */\n    PluggableMap.prototype.getInteractions = function () {\n        return this.interactions;\n    };\n    /**\n     * Get the layergroup associated with this map.\n     * @return {LayerGroup} A layer group containing the layers in this map.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.getLayerGroup = function () {\n        return /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP));\n    };\n    /**\n     * Get the collection of layers associated with this map.\n     * @return {!Collection<import(\"./layer/Base.js\").default>} Layers
 .\n     * @api\n     */\n    PluggableMap.prototype.getLayers = function () {\n        var layers = this.getLayerGroup().getLayers();\n        return layers;\n    };\n    /**\n     * @return {boolean} Layers have sources that are still loading.\n     */\n    PluggableMap.prototype.getLoading = function () {\n        var layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n        for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n            var layer = layerStatesArray[i].layer;\n            var source = /** @type {import(\"./layer/Layer.js\").default} */ (layer).getSource();\n            if (source && source.loading) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * Get the pixel for a coordinate.  This takes a coordinate in the user\n     * projection and returns the corresponding pixel.\n     * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n     * @return {import(\"./pixe
 l.js\").Pixel} A pixel position in the map viewport.\n     * @api\n     */\n    PluggableMap.prototype.getPixelFromCoordinate = function (coordinate) {\n        var viewCoordinate = fromUserCoordinate(coordinate, this.getView().getProjection());\n        return this.getPixelFromCoordinateInternal(viewCoordinate);\n    };\n    /**\n     * Get the pixel for a coordinate.  This takes a coordinate in the map view\n     * projection and returns the corresponding pixel.\n     * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n     * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n     */\n    PluggableMap.prototype.getPixelFromCoordinateInternal = function (coordinate) {\n        var frameState = this.frameState_;\n        if (!frameState) {\n            return null;\n        }\n        else {\n            return applyTransform(frameState.coordinateToPixelTransform, coordinate.slice(0, 2));\n        }\n    };\n    /**\n     * Get 
 the map renderer.\n     * @return {import(\"./renderer/Map.js\").default} Renderer\n     */\n    PluggableMap.prototype.getRenderer = function () {\n        return this.renderer_;\n    };\n    /**\n     * Get the size of this map.\n     * @return {import(\"./size.js\").Size|undefined} The size in pixels of the map in the DOM.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.getSize = function () {\n        return /** @type {import(\"./size.js\").Size|undefined} */ (this.get(MapProperty.SIZE));\n    };\n    /**\n     * Get the view associated with this map. A view manages properties such as\n     * center and resolution.\n     * @return {View} The view that controls this map.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.getView = function () {\n        return /** @type {View} */ (this.get(MapProperty.VIEW));\n    };\n    /**\n     * Get the element that serves as the map viewport.\n     * @return {HTMLElement} Viewport.\n     * @api\n    
  */\n    PluggableMap.prototype.getViewport = function () {\n        return this.viewport_;\n    };\n    /**\n     * Get the element that serves as the container for overlays.  Elements added to\n     * this container will let mousedown and touchstart events through to the map,\n     * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}\n     * events.\n     * @return {!HTMLElement} The map's overlay container.\n     */\n    PluggableMap.prototype.getOverlayContainer = function () {\n        return this.overlayContainer_;\n    };\n    /**\n     * Get the element that serves as a container for overlays that don't allow\n     * event propagation. Elements added to this container won't let mousedown and\n     * touchstart events through to the map, so clicks and gestures on an overlay\n     * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n     * @return {!HTMLElement} The map's overlay container that stops events.\n
      */\n    PluggableMap.prototype.getOverlayContainerStopEvent = function () {\n        return this.overlayContainerStopEvent_;\n    };\n    /**\n     * @param {import(\"./Tile.js\").default} tile Tile.\n     * @param {string} tileSourceKey Tile source key.\n     * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n     * @param {number} tileResolution Tile resolution.\n     * @return {number} Tile priority.\n     */\n    PluggableMap.prototype.getTilePriority = function (tile, tileSourceKey, tileCenter, tileResolution) {\n        return getTilePriority(this.frameState_, tile, tileSourceKey, tileCenter, tileResolution);\n    };\n    /**\n     * @param {UIEvent} browserEvent Browser event.\n     * @param {string=} opt_type Type.\n     */\n    PluggableMap.prototype.handleBrowserEvent = function (browserEvent, opt_type) {\n        var type = opt_type || browserEvent.type;\n        var mapBrowserEvent = new MapBrowserEvent(type, this, browserEvent);\n        thi
 s.handleMapBrowserEvent(mapBrowserEvent);\n    };\n    /**\n     * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n     */\n    PluggableMap.prototype.handleMapBrowserEvent = function (mapBrowserEvent) {\n        if (!this.frameState_) {\n            // With no view defined, we cannot translate pixels into geographical\n            // coordinates so interactions cannot be used.\n            return;\n        }\n        var originalEvent = /** @type {PointerEvent} */ (mapBrowserEvent.originalEvent);\n        var eventType = originalEvent.type;\n        if (eventType === PointerEventType.POINTERDOWN ||\n            eventType === EventType.WHEEL ||\n            eventType === EventType.KEYDOWN) {\n            var rootNode = this.viewport_.getRootNode\n                ? this.viewport_.getRootNode()\n                : document;\n            var target = rootNode === document\n                ? /** @type {Node} */ (originalEvent.target)\n                : /** @type {ShadowRoo
 t} */ (rootNode).elementFromPoint(originalEvent.clientX, originalEvent.clientY);\n            if (\n            // Abort if the target is a child of the container for elements whose events are not meant\n            // to be handled by map interactions.\n            this.overlayContainerStopEvent_.contains(target) ||\n                // Abort if the event target is a child of the container that is no longer in the page.\n                // It's possible for the target to no longer be in the page if it has been removed in an\n                // event listener, this might happen in a Control that recreates it's content based on\n                // user interaction either manually or via a render in something like https://reactjs.org/\n                !(rootNode === document ? document.documentElement : rootNode).contains(target)) {\n                return;\n            }\n        }\n        mapBrowserEvent.frameState = this.frameState_;\n        var interactionsArray = this.getInterac
 tions().getArray();\n        if (this.dispatchEvent(mapBrowserEvent) !== false) {\n            for (var i = interactionsArray.length - 1; i >= 0; i--) {\n                var interaction = interactionsArray[i];\n                if (!interaction.getActive()) {\n                    continue;\n                }\n                var cont = interaction.handleEvent(mapBrowserEvent);\n                if (!cont) {\n                    break;\n                }\n            }\n        }\n    };\n    /**\n     * @protected\n     */\n    PluggableMap.prototype.handlePostRender = function () {\n        var frameState = this.frameState_;\n        // Manage the tile queue\n        // Image loads are expensive and a limited resource, so try to use them\n        // efficiently:\n        // * When the view is static we allow a large number of parallel tile loads\n        //   to complete the frame as quickly as possible.\n        // * When animating or interacting, image loads can cause janks, so we 
 reduce\n        //   the maximum number of loads per frame and limit the number of parallel\n        //   tile loads to remain reactive to view changes and to reduce the chance of\n        //   loading tiles that will quickly disappear from view.\n        var tileQueue = this.tileQueue_;\n        if (!tileQueue.isEmpty()) {\n            var maxTotalLoading = this.maxTilesLoading_;\n            var maxNewLoads = maxTotalLoading;\n            if (frameState) {\n                var hints = frameState.viewHints;\n                if (hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING]) {\n                    var lowOnFrameBudget = !IMAGE_DECODE && Date.now() - frameState.time > 8;\n                    maxTotalLoading = lowOnFrameBudget ? 0 : 8;\n                    maxNewLoads = lowOnFrameBudget ? 0 : 2;\n                }\n            }\n            if (tileQueue.getTilesLoading() < maxTotalLoading) {\n                tileQueue.reprioritize(); // FIXME only call if view has changed
 \n                tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n            }\n        }\n        if (frameState &&\n            this.hasListener(RenderEventType.RENDERCOMPLETE) &&\n            !frameState.animate &&\n            !this.tileQueue_.getTilesLoading() &&\n            !this.getLoading()) {\n            this.renderer_.dispatchRenderEvent(RenderEventType.RENDERCOMPLETE, frameState);\n        }\n        var postRenderFunctions = this.postRenderFunctions_;\n        for (var i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n            postRenderFunctions[i](this, frameState);\n        }\n        postRenderFunctions.length = 0;\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleSizeChanged_ = function () {\n        if (this.getView() && !this.getView().getAnimating()) {\n            this.getView().resolveConstraints(0);\n        }\n        this.render();\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleTarg
 etChanged_ = function () {\n        // target may be undefined, null, a string or an Element.\n        // If it's a string we convert it to an Element before proceeding.\n        // If it's not now an Element we remove the viewport from the DOM.\n        // If it's an Element we append the viewport element to it.\n        var targetElement;\n        if (this.getTarget()) {\n            targetElement = this.getTargetElement();\n        }\n        if (this.mapBrowserEventHandler_) {\n            for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {\n                unlistenByKey(this.keyHandlerKeys_[i]);\n            }\n            this.keyHandlerKeys_ = null;\n            this.viewport_.removeEventListener(EventType.CONTEXTMENU, this.boundHandleBrowserEvent_);\n            this.viewport_.removeEventListener(EventType.WHEEL, this.boundHandleBrowserEvent_);\n            if (this.handleResize_ !== undefined) {\n                removeEventListener(EventType.RESIZE, this.handle
 Resize_, false);\n                this.handleResize_ = undefined;\n            }\n            this.mapBrowserEventHandler_.dispose();\n            this.mapBrowserEventHandler_ = null;\n            removeNode(this.viewport_);\n        }\n        if (!targetElement) {\n            if (this.renderer_) {\n                clearTimeout(this.postRenderTimeoutHandle_);\n                this.postRenderFunctions_.length = 0;\n                this.renderer_.dispose();\n                this.renderer_ = null;\n            }\n            if (this.animationDelayKey_) {\n                cancelAnimationFrame(this.animationDelayKey_);\n                this.animationDelayKey_ = undefined;\n            }\n        }\n        else {\n            targetElement.appendChild(this.viewport_);\n            if (!this.renderer_) {\n                this.renderer_ = this.createRenderer();\n            }\n            this.mapBrowserEventHandler_ = new MapBrowserEventHandler(this, this.moveTolerance_);\n            
 for (var key in MapBrowserEventType) {\n                this.mapBrowserEventHandler_.addEventListener(MapBrowserEventType[key], this.handleMapBrowserEvent.bind(this));\n            }\n            this.viewport_.addEventListener(EventType.CONTEXTMENU, this.boundHandleBrowserEvent_, false);\n            this.viewport_.addEventListener(EventType.WHEEL, this.boundHandleBrowserEvent_, PASSIVE_EVENT_LISTENERS ? { passive: false } : false);\n            var keyboardEventTarget = !this.keyboardEventTarget_\n                ? targetElement\n                : this.keyboardEventTarget_;\n            this.keyHandlerKeys_ = [\n                listen(keyboardEventTarget, EventType.KEYDOWN, this.handleBrowserEvent, this),\n                listen(keyboardEventTarget, EventType.KEYPRESS, this.handleBrowserEvent, this),\n            ];\n            if (!this.handleResize_) {\n                this.handleResize_ = this.updateSize.bind(this);\n                window.addEventListener(EventType.RESIZE, th
 is.handleResize_, false);\n            }\n        }\n        this.updateSize();\n        // updateSize calls setSize, so no need to call this.render\n        // ourselves here.\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleTileChange_ = function () {\n        this.render();\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleViewPropertyChanged_ = function () {\n        this.render();\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleViewChanged_ = function () {\n        if (this.viewPropertyListenerKey_) {\n            unlistenByKey(this.viewPropertyListenerKey_);\n            this.viewPropertyListenerKey_ = null;\n        }\n        if (this.viewChangeListenerKey_) {\n            unlistenByKey(this.viewChangeListenerKey_);\n            this.viewChangeListenerKey_ = null;\n        }\n        var view = this.getView();\n        if (view) {\n            this.updateViewportSize_();\n            this.vie
 wPropertyListenerKey_ = listen(view, ObjectEventType.PROPERTYCHANGE, this.handleViewPropertyChanged_, this);\n            this.viewChangeListenerKey_ = listen(view, EventType.CHANGE, this.handleViewPropertyChanged_, this);\n            view.resolveConstraints(0);\n        }\n        this.render();\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleLayerGroupChanged_ = function () {\n        if (this.layerGroupPropertyListenerKeys_) {\n            this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey);\n            this.layerGroupPropertyListenerKeys_ = null;\n        }\n        var layerGroup = this.getLayerGroup();\n        if (layerGroup) {\n            this.layerGroupPropertyListenerKeys_ = [\n                listen(layerGroup, ObjectEventType.PROPERTYCHANGE, this.render, this),\n                listen(layerGroup, EventType.CHANGE, this.render, this),\n            ];\n        }\n        this.render();\n    };\n    /**\n     * @return {boolean} Is re
 ndered.\n     */\n    PluggableMap.prototype.isRendered = function () {\n        return !!this.frameState_;\n    };\n    /**\n     * Requests an immediate render in a synchronous manner.\n     * @api\n     */\n    PluggableMap.prototype.renderSync = function () {\n        if (this.animationDelayKey_) {\n            cancelAnimationFrame(this.animationDelayKey_);\n        }\n        this.animationDelay_();\n    };\n    /**\n     * Redraws all text after new fonts have loaded\n     */\n    PluggableMap.prototype.redrawText = function () {\n        var layerStates = this.getLayerGroup().getLayerStatesArray();\n        for (var i = 0, ii = layerStates.length; i < ii; ++i) {\n            var layer = layerStates[i].layer;\n            if (layer.hasRenderer()) {\n                layer.getRenderer().handleFontsChanged();\n            }\n        }\n    };\n    /**\n     * Request a map rendering (at the next animation frame).\n     * @api\n     */\n    PluggableMap.prototype.render = function
  () {\n        if (this.renderer_ && this.animationDelayKey_ === undefined) {\n            this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n        }\n    };\n    /**\n     * Remove the given control from the map.\n     * @param {import(\"./control/Control.js\").default} control Control.\n     * @return {import(\"./control/Control.js\").default|undefined} The removed control (or undefined\n     *     if the control was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeControl = function (control) {\n        return this.getControls().remove(control);\n    };\n    /**\n     * Remove the given interaction from the map.\n     * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to remove.\n     * @return {import(\"./interaction/Interaction.js\").default|undefined} The removed interaction (or\n     *     undefined if the interaction was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeInteraction =
  function (interaction) {\n        return this.getInteractions().remove(interaction);\n    };\n    /**\n     * Removes the given layer from the map.\n     * @param {import(\"./layer/Base.js\").default} layer Layer.\n     * @return {import(\"./layer/Base.js\").default|undefined} The removed layer (or undefined if the\n     *     layer was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeLayer = function (layer) {\n        var layers = this.getLayerGroup().getLayers();\n        return layers.remove(layer);\n    };\n    /**\n     * Remove the given overlay from the map.\n     * @param {import(\"./Overlay.js\").default} overlay Overlay.\n     * @return {import(\"./Overlay.js\").default|undefined} The removed overlay (or undefined\n     *     if the overlay was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeOverlay = function (overlay) {\n        return this.getOverlays().remove(overlay);\n    };\n    /**\n     * @param {number} time Time.\n     * 
 @private\n     */\n    PluggableMap.prototype.renderFrame_ = function (time) {\n        var size = this.getSize();\n        var view = this.getView();\n        var previousFrameState = this.frameState_;\n        /** @type {?FrameState} */\n        var frameState = null;\n        if (size !== undefined && hasArea(size) && view && view.isDef()) {\n            var viewHints = view.getHints(this.frameState_ ? this.frameState_.viewHints : undefined);\n            var viewState = view.getState();\n            frameState = {\n                animate: false,\n                coordinateToPixelTransform: this.coordinateToPixelTransform_,\n                declutterItems: previousFrameState\n                    ? previousFrameState.declutterItems\n                    : [],\n                extent: getForViewAndSize(viewState.center, viewState.resolution, viewState.rotation, size),\n                index: this.frameIndex_++,\n                layerIndex: 0,\n                layerStatesArray: this
 .getLayerGroup().getLayerStatesArray(),\n                pixelRatio: this.pixelRatio_,\n                pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n                postRenderFunctions: [],\n                size: size,\n                tileQueue: this.tileQueue_,\n                time: time,\n                usedTiles: {},\n                viewState: viewState,\n                viewHints: viewHints,\n                wantedTiles: {},\n            };\n        }\n        this.frameState_ = frameState;\n        this.renderer_.renderFrame(frameState);\n        if (frameState) {\n            if (frameState.animate) {\n                this.render();\n            }\n            Array.prototype.push.apply(this.postRenderFunctions_, frameState.postRenderFunctions);\n            if (previousFrameState) {\n                var moveStart = !this.previousExtent_ ||\n                    (!isEmpty(this.previousExtent_) &&\n                        !equals(frameState.extent, this.pre
 viousExtent_));\n                if (moveStart) {\n                    this.dispatchEvent(new MapEvent(MapEventType.MOVESTART, this, previousFrameState));\n                    this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_);\n                }\n            }\n            var idle = this.previousExtent_ &&\n                !frameState.viewHints[ViewHint.ANIMATING] &&\n                !frameState.viewHints[ViewHint.INTERACTING] &&\n                !equals(frameState.extent, this.previousExtent_);\n            if (idle) {\n                this.dispatchEvent(new MapEvent(MapEventType.MOVEEND, this, frameState));\n                clone(frameState.extent, this.previousExtent_);\n            }\n        }\n        this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n        this.postRenderTimeoutHandle_ = setTimeout(this.handlePostRender.bind(this), 0);\n    };\n    /**\n     * Sets the layergroup of this map.\n     * @param {LayerGroup} layerGroup 
 A layer group containing the layers in this map.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.setLayerGroup = function (layerGroup) {\n        this.set(MapProperty.LAYERGROUP, layerGroup);\n    };\n    /**\n     * Set the size of this map.\n     * @param {import(\"./size.js\").Size|undefined} size The size in pixels of the map in the DOM.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.setSize = function (size) {\n        this.set(MapProperty.SIZE, size);\n    };\n    /**\n     * Set the target element to render this map into.\n     * @param {HTMLElement|string|undefined} target The Element or id of the Element\n     *     that the map is rendered in.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.setTarget = function (target) {\n        this.set(MapProperty.TARGET, target);\n    };\n    /**\n     * Set the view for this map.\n     * @param {View} view The view that controls this map.\n     * @observable\n     * @
 api\n     */\n    PluggableMap.prototype.setView = function (view) {\n        this.set(MapProperty.VIEW, view);\n    };\n    /**\n     * Force a recalculation of the map viewport size.  This should be called when\n     * third-party code changes the size of the map viewport.\n     * @api\n     */\n    PluggableMap.prototype.updateSize = function () {\n        var targetElement = this.getTargetElement();\n        if (!targetElement) {\n            this.setSize(undefined);\n        }\n        else {\n            var computedStyle = getComputedStyle(targetElement);\n            this.setSize([\n                targetElement.offsetWidth -\n                    parseFloat(computedStyle['borderLeftWidth']) -\n                    parseFloat(computedStyle['paddingLeft']) -\n                    parseFloat(computedStyle['paddingRight']) -\n                    parseFloat(computedStyle['borderRightWidth']),\n                targetElement.offsetHeight -\n                    parseFloat(computedStyl
 e['borderTopWidth']) -\n                    parseFloat(computedStyle['paddingTop']) -\n                    parseFloat(computedStyle['paddingBottom']) -\n                    parseFloat(computedStyle['borderBottomWidth']),\n            ]);\n        }\n        this.updateViewportSize_();\n    };\n    /**\n     * Recomputes the viewport size and save it on the view object (if any)\n     * @private\n     */\n    PluggableMap.prototype.updateViewportSize_ = function () {\n        var view = this.getView();\n        if (view) {\n            var size = undefined;\n            var computedStyle = getComputedStyle(this.viewport_);\n            if (computedStyle.width && computedStyle.height) {\n                size = [\n                    parseInt(computedStyle.width, 10),\n                    parseInt(computedStyle.height, 10),\n                ];\n            }\n            view.setViewportSize(size);\n        }\n    };\n    return PluggableMap;\n}(BaseObject));\n/**\n * @param {MapOptions
 } options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n    /**\n     * @type {HTMLElement|Document}\n     */\n    var keyboardEventTarget = null;\n    if (options.keyboardEventTarget !== undefined) {\n        keyboardEventTarget =\n            typeof options.keyboardEventTarget === 'string'\n                ? document.getElementById(options.keyboardEventTarget)\n                : options.keyboardEventTarget;\n    }\n    /**\n     * @type {Object<string, *>}\n     */\n    var values = {};\n    var layerGroup = options.layers &&\n        typeof ( /** @type {?} */(options.layers).getLayers) === 'function'\n        ? /** @type {LayerGroup} */ (options.layers)\n        : new LayerGroup({ layers: /** @type {Collection} */ (options.layers) });\n    values[MapProperty.LAYERGROUP] = layerGroup;\n    values[MapProperty.TARGET] = options.target;\n    values[MapProperty.VIEW] =\n        options.view !== undefined ? options.
 view : new View();\n    var controls;\n    if (options.controls !== undefined) {\n        if (Array.isArray(options.controls)) {\n            controls = new Collection(options.controls.slice());\n        }\n        else {\n            assert(typeof ( /** @type {?} */(options.controls).getArray) === 'function', 47); // Expected `controls` to be an array or an `import(\"./Collection.js\").Collection`\n            controls = /** @type {Collection} */ (options.controls);\n        }\n    }\n    var interactions;\n    if (options.interactions !== undefined) {\n        if (Array.isArray(options.interactions)) {\n            interactions = new Collection(options.interactions.slice());\n        }\n        else {\n            assert(typeof ( /** @type {?} */(options.interactions).getArray) ===\n                'function', 48); // Expected `interactions` to be an array or an `import(\"./Collection.js\").Collection`\n            interactions = /** @type {Collection} */ (options.interactions);\n
         }\n    }\n    var overlays;\n    if (options.overlays !== undefined) {\n        if (Array.isArray(options.overlays)) {\n            overlays = new Collection(options.overlays.slice());\n        }\n        else {\n            assert(typeof ( /** @type {?} */(options.overlays).getArray) === 'function', 49); // Expected `overlays` to be an array or an `import(\"./Collection.js\").Collection`\n            overlays = options.overlays;\n        }\n    }\n    else {\n        overlays = new Collection();\n    }\n    return {\n        controls: controls,\n        interactions: interactions,\n        keyboardEventTarget: keyboardEventTarget,\n        overlays: overlays,\n        values: values,\n    };\n}\nexport default PluggableMap;\n//# sourceMappingURL=PluggableMap.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && functi
 on (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Control\n */\nimport BaseObject from '../Object.js';\nimport MapEventType from '../MapEventType.js';\nimport { VOID } from '../functions.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { removeNode } from '../dom.js';\n/**\n * @typedef {Object} Options\n * @property {HTMLElement} [element] The element is the control's\n * container element. This only needs to be specified if you're developing\n * a custom control.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is 
 called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want\n * the control to be rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A control is a visible widget with a DOM element in a fixed position on the\n * screen. They can involve user input (buttons), or be informational only;\n * the position is determined using CSS. By default these are placed in the\n * container with CSS class name `ol-overlaycontainer-stopevent`, but can use\n * any outside DOM element.\n *\n * This is the base class for controls. You can use it for simple custom\n * controls by creating the element with listeners, creating an instance:\n * ```js\n * var myControl = new Control({element: myElement});\n * ```\n * and then adding this to the map.\n *\n * The main advantage of having this as a control rather than a simple separate\n * DOM element is that preventing propagation is handled for you. Controls\n * will also be obje
 cts in a {@link module:ol/Collection~Collection}, so you can use their methods.\n *\n * You can also extend this base for your own control class. See\n * examples/custom-controls for an example of how to do this.\n *\n * @api\n */\nvar Control = /** @class */ (function (_super) {\n    __extends(Control, _super);\n    /**\n     * @param {Options} options Control options.\n     */\n    function Control(options) {\n        var _this = _super.call(this) || this;\n        var element = options.element;\n        if (element && !options.target && !element.style.pointerEvents) {\n            element.style.pointerEvents = 'auto';\n        }\n        /**\n         * @protected\n         * @type {HTMLElement}\n         */\n        _this.element = element ? element : null;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.target_ = null;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        
 _this.map_ = null;\n        /**\n         * @protected\n         * @type {!Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.listenerKeys = [];\n        if (options.render) {\n            _this.render = options.render;\n        }\n        if (options.target) {\n            _this.setTarget(options.target);\n        }\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    Control.prototype.disposeInternal = function () {\n        removeNode(this.element);\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Get the map associated with this control.\n     * @return {import(\"../PluggableMap.js\").default} Map.\n     * @api\n     */\n    Control.prototype.getMap = function () {\n        return this.map_;\n    };\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../P
 luggableMap.js\").default} map Map.\n     * @api\n     */\n    Control.prototype.setMap = function (map) {\n        if (this.map_) {\n            removeNode(this.element);\n        }\n        for (var i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n            unlistenByKey(this.listenerKeys[i]);\n        }\n        this.listenerKeys.length = 0;\n        this.map_ = map;\n        if (this.map_) {\n            var target = this.target_\n                ? this.target_\n                : map.getOverlayContainerStopEvent();\n            target.appendChild(this.element);\n            if (this.render !== VOID) {\n                this.listenerKeys.push(listen(map, MapEventType.POSTRENDER, this.render, this));\n            }\n            map.render();\n        }\n    };\n    /**\n     * Renders the control.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @api\n     */\n    Control.prototype.render = function (mapEvent) { };\n    /**\n     * This functio
 n is used to set a target element for the control. It has no\n     * effect if it is called after the control has been added to the map (i.e.\n     * after `setMap` is called on the control). If no `target` is set in the\n     * options passed to the control constructor and if `setTarget` is not called\n     * then the control is added to the map's overlay container.\n     * @param {HTMLElement|string} target Target.\n     * @api\n     */\n    Control.prototype.setTarget = function (target) {\n        this.target_ =\n            typeof target === 'string' ? document.getElementById(target) : target;\n    };\n    return Control;\n}(BaseObject));\nexport default Control;\n//# sourceMappingURL=Control.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (
 var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Attribution\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { equals } from '../array.js';\nimport { inView } from '../layer/Layer.js';\nimport { removeChildren, replaceNode } from '../dom.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-attribution'] CSS class name.\n * @property {HTMLElement|string} [target] Specify a target if you\n * want the control to be rendered outside of the map's\n * viewport.\n * @property {boolean} [collapsible] Specify if attributions can\n * be collapsed. 
 If not specified, sources control this behavior with their\n * `attributionsCollapsible` setting.\n * @property {boolean} [collapsed=true] Specify if attributions should\n * be collapsed at startup.\n * @property {string} [tipLabel='Attributions'] Text label to use for the button tip.\n * @property {string} [label='i'] Text label to use for the\n * collapsed attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [collapseLabel='»'] Text label to use\n * for the expanded attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n */\n/**\n * @classdesc\n * Control to show all the attributions associated with the layer sources\n * in the map. This control is one of the default control
 s included in maps.\n * By default it will show in the bottom right portion of the map, but this can\n * be changed by using a css selector for `.ol-attribution`.\n *\n * @api\n */\nvar Attribution = /** @class */ (function (_super) {\n    __extends(Attribution, _super);\n    /**\n     * @param {Options=} opt_options Attribution options.\n     */\n    function Attribution(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target,\n        }) || this;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.ulElement_ = document.createElement('ul');\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.collapsed_ =\n            options.collapsed !== undefined ? options.collapsed : true;\n        /**\n         * @p
 rivate\n         * @type {boolean}\n         */\n        _this.overrideCollapsible_ = options.collapsible !== undefined;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.collapsible_ =\n            options.collapsible !== undefined ? options.collapsible : true;\n        if (!_this.collapsible_) {\n            _this.collapsed_ = false;\n        }\n        var className = options.className !== undefined ? options.className : 'ol-attribution';\n        var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n        var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u00BB';\n        if (typeof collapseLabel === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.collapseLabel_ = document.createElement('span');\n            _this.collapseLabel_.textContent = collapseLabel;\n        }\n        else {\n            _
 this.collapseLabel_ = collapseLabel;\n        }\n        var label = options.label !== undefined ? options.label : 'i';\n        if (typeof label === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.label_ = document.createElement('span');\n            _this.label_.textContent = label;\n        }\n        else {\n            _this.label_ = label;\n        }\n        var activeLabel = _this.collapsible_ && !_this.collapsed_ ? _this.collapseLabel_ : _this.label_;\n        var button = document.createElement('button');\n        button.setAttribute('type', 'button');\n        button.title = tipLabel;\n        button.appendChild(activeLabel);\n        button.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        var cssClasses = className +\n            ' ' +\n            CLASS_UNSELECTABLE +\n            ' ' +\n            CLASS_CONTROL +\n            (_this.collapsed_ && _this.colla
 psible_ ? ' ' + CLASS_COLLAPSED : '') +\n            (_this.collapsible_ ? '' : ' ol-uncollapsible');\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(_this.ulElement_);\n        element.appendChild(button);\n        /**\n         * A list of currently rendered resolutions.\n         * @type {Array<string>}\n         * @private\n         */\n        _this.renderedAttributions_ = [];\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderedVisible_ = true;\n        return _this;\n    }\n    /**\n     * Collect a list of visible attributions and set the collapsible state.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {Array<string>} Attributions.\n     * @private\n     */\n    Attribution.prototype.collectSourceAttributions_ = function (frameState) {\n        /**\n         * Used to determine if an attribution already exists.\n       
   * @type {!Object<string, boolean>}\n         */\n        var lookup = {};\n        /**\n         * A list of visible attributions.\n         * @type {Array<string>}\n         */\n        var visibleAttributions = [];\n        var layerStatesArray = frameState.layerStatesArray;\n        for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n            var layerState = layerStatesArray[i];\n            if (!inView(layerState, frameState.viewState)) {\n                continue;\n            }\n            var source = /** @type {import(\"../layer/Layer.js\").default} */ (layerState.layer).getSource();\n            if (!source) {\n                continue;\n            }\n            var attributionGetter = source.getAttributions();\n            if (!attributionGetter) {\n                continue;\n            }\n            var attributions = attributionGetter(frameState);\n            if (!attributions) {\n                continue;\n            }\n            if (!this.overr
 ideCollapsible_ &&\n                source.getAttributionsCollapsible() === false) {\n                this.setCollapsible(false);\n            }\n            if (Array.isArray(attributions)) {\n                for (var j = 0, jj = attributions.length; j < jj; ++j) {\n                    if (!(attributions[j] in lookup)) {\n                        visibleAttributions.push(attributions[j]);\n                        lookup[attributions[j]] = true;\n                    }\n                }\n            }\n            else {\n                if (!(attributions in lookup)) {\n                    visibleAttributions.push(attributions);\n                    lookup[attributions] = true;\n                }\n            }\n        }\n        return visibleAttributions;\n    };\n    /**\n     * @private\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    Attribution.prototype.updateElement_ = function (frameState) {\n        if (!frameState) {\n    
         if (this.renderedVisible_) {\n                this.element.style.display = 'none';\n                this.renderedVisible_ = false;\n            }\n            return;\n        }\n        var attributions = this.collectSourceAttributions_(frameState);\n        var visible = attributions.length > 0;\n        if (this.renderedVisible_ != visible) {\n            this.element.style.display = visible ? '' : 'none';\n            this.renderedVisible_ = visible;\n        }\n        if (equals(attributions, this.renderedAttributions_)) {\n            return;\n        }\n        removeChildren(this.ulElement_);\n        // append the attributions\n        for (var i = 0, ii = attributions.length; i < ii; ++i) {\n            var element = document.createElement('li');\n            element.innerHTML = attributions[i];\n            this.ulElement_.appendChild(element);\n        }\n        this.renderedAttributions_ = attributions;\n    };\n    /**\n     * @param {MouseEvent} event The ev
 ent to handle\n     * @private\n     */\n    Attribution.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        this.handleToggle_();\n    };\n    /**\n     * @private\n     */\n    Attribution.prototype.handleToggle_ = function () {\n        this.element.classList.toggle(CLASS_COLLAPSED);\n        if (this.collapsed_) {\n            replaceNode(this.collapseLabel_, this.label_);\n        }\n        else {\n            replaceNode(this.label_, this.collapseLabel_);\n        }\n        this.collapsed_ = !this.collapsed_;\n    };\n    /**\n     * Return `true` if the attribution is collapsible, `false` otherwise.\n     * @return {boolean} True if the widget is collapsible.\n     * @api\n     */\n    Attribution.prototype.getCollapsible = function () {\n        return this.collapsible_;\n    };\n    /**\n     * Set whether the attribution should be collapsible.\n     * @param {boolean} collapsible True if the widget is collapsible.\n     * @api\n     */\n
     Attribution.prototype.setCollapsible = function (collapsible) {\n        if (this.collapsible_ === collapsible) {\n            return;\n        }\n        this.collapsible_ = collapsible;\n        this.element.classList.toggle('ol-uncollapsible');\n        if (!collapsible && this.collapsed_) {\n            this.handleToggle_();\n        }\n    };\n    /**\n     * Collapse or expand the attribution according to the passed parameter. Will\n     * not do anything if the attribution isn't collapsible or if the current\n     * collapsed state is already the one requested.\n     * @param {boolean} collapsed True if the widget is collapsed.\n     * @api\n     */\n    Attribution.prototype.setCollapsed = function (collapsed) {\n        if (!this.collapsible_ || this.collapsed_ === collapsed) {\n            return;\n        }\n        this.handleToggle_();\n    };\n    /**\n     * Return `true` when the attribution is currently collapsed or `false`\n     * otherwise.\n     * @return {bo
 olean} True if the widget is collapsed.\n     * @api\n     */\n    Attribution.prototype.getCollapsed = function () {\n        return this.collapsed_;\n    };\n    /**\n     * Update the attribution element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    Attribution.prototype.render = function (mapEvent) {\n        this.updateElement_(mapEvent.frameState);\n    };\n    return Attribution;\n}(Control));\nexport default Attribution;\n//# sourceMappingURL=Attribution.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() 
 { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Rotate\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE } from '../css.js';\nimport { easeOut } from '../easing.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-rotate'] CSS class name.\n * @property {string|HTMLElement} [label='⇧'] Text label to use for the rotate button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {boolean} [autoHide=true] Hide the control when rotation is 0.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control should
 \n * be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {function():void} [resetNorth] Function called when the control is clicked.\n * This will override the default `resetNorth`.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A button control to reset rotation to 0.\n * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css\n * selector is added to the button when the rotation is 0.\n *\n * @api\n */\nvar Rotate = /** @class */ (function (_super) {\n    __extends(Rotate, _super);\n    /**\n     * @param {Options=} opt_options Rotate options.\n     */\n    function Rotate(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n            target: optio
 ns.target,\n        }) || this;\n        var className = options.className !== undefined ? options.className : 'ol-rotate';\n        var label = options.label !== undefined ? options.label : '\\u21E7';\n        /**\n         * @type {HTMLElement}\n         * @private\n         */\n        _this.label_ = null;\n        if (typeof label === 'string') {\n            _this.label_ = document.createElement('span');\n            _this.label_.className = 'ol-compass';\n            _this.label_.textContent = label;\n        }\n        else {\n            _this.label_ = label;\n            _this.label_.classList.add('ol-compass');\n        }\n        var tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n        var button = document.createElement('button');\n        button.className = className + '-reset';\n        button.setAttribute('type', 'button');\n        button.title = tipLabel;\n        button.appendChild(_this.label_);\n        button.addEventListener(EventType.CLI
 CK, _this.handleClick_.bind(_this), false);\n        var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(button);\n        _this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.rotation_ = undefined;\n        if (_this.autoHide_) {\n            _this.element.classList.add(CLASS_HIDDEN);\n        }\n        return _this;\n    }\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    R
 otate.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        if (this.callResetNorth_ !== undefined) {\n            this.callResetNorth_();\n        }\n        else {\n            this.resetNorth_();\n        }\n    };\n    /**\n     * @private\n     */\n    Rotate.prototype.resetNorth_ = function () {\n        var map = this.getMap();\n        var view = map.getView();\n        if (!view) {\n            // the map does not have a view, so we can't act\n            // upon it\n            return;\n        }\n        var rotation = view.getRotation();\n        if (rotation !== undefined) {\n            if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) {\n                view.animate({\n                    rotation: 0,\n                    duration: this.duration_,\n                    easing: easeOut,\n                });\n            }\n            else {\n                view.setRotation(0);\n            }\n        }\n    };\n    /**\n     * U
 pdate the rotate control element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    Rotate.prototype.render = function (mapEvent) {\n        var frameState = mapEvent.frameState;\n        if (!frameState) {\n            return;\n        }\n        var rotation = frameState.viewState.rotation;\n        if (rotation != this.rotation_) {\n            var transform = 'rotate(' + rotation + 'rad)';\n            if (this.autoHide_) {\n                var contains = this.element.classList.contains(CLASS_HIDDEN);\n                if (!contains && rotation === 0) {\n                    this.element.classList.add(CLASS_HIDDEN);\n                }\n                else if (contains && rotation !== 0) {\n                    this.element.classList.remove(CLASS_HIDDEN);\n                }\n            }\n            this.label_.style.transform = transform;\n        }\n        this.rotation_ = rotation;\n    };\n    return Rotate;\n}(Control));
 \nexport default Rotate;\n//# sourceMappingURL=Rotate.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Zoom\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { easeOut } from '../easing.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds
 .\n * @property {string} [className='ol-zoom'] CSS class name.\n * @property {string|HTMLElement} [zoomInLabel='+'] Text label to use for the zoom-in\n * button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [zoomOutLabel='-'] Text label to use for the zoom-out button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [zoomInTipLabel='Zoom in'] Text label to use for the button tip.\n * @property {string} [zoomOutTipLabel='Zoom out'] Text label to use for the button tip.\n * @property {number} [delta=1] The zoom delta applied on each click.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A control with 2 buttons, one for zoom in and one for zoom out.\n * This control is one of the default controls of a map. To style this control\n * use css selectors `.ol-zoom-in` a
 nd `.ol-zoom-out`.\n *\n * @api\n */\nvar Zoom = /** @class */ (function (_super) {\n    __extends(Zoom, _super);\n    /**\n     * @param {Options=} opt_options Zoom options.\n     */\n    function Zoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            target: options.target,\n        }) || this;\n        var className = options.className !== undefined ? options.className : 'ol-zoom';\n        var delta = options.delta !== undefined ? options.delta : 1;\n        var zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n        var zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2212';\n        var zoomInTipLabel = options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n        var zoomOutTipLabel = options.zoomOutTipLabel !== undefined\n            ? options.zoo
 mOutTipLabel\n            : 'Zoom out';\n        var inElement = document.createElement('button');\n        inElement.className = className + '-in';\n        inElement.setAttribute('type', 'button');\n        inElement.title = zoomInTipLabel;\n        inElement.appendChild(typeof zoomInLabel === 'string'\n            ? document.createTextNode(zoomInLabel)\n            : zoomInLabel);\n        inElement.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this, delta), false);\n        var outElement = document.createElement('button');\n        outElement.className = className + '-out';\n        outElement.setAttribute('type', 'button');\n        outElement.title = zoomOutTipLabel;\n        outElement.appendChild(typeof zoomOutLabel === 'string'\n            ? document.createTextNode(zoomOutLabel)\n            : zoomOutLabel);\n        outElement.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this, -delta), false);\n        var cssClasses = className + ' ' + CLASS_U
 NSELECTABLE + ' ' + CLASS_CONTROL;\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(inElement);\n        element.appendChild(outElement);\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n    }\n    /**\n     * @param {number} delta Zoom delta.\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    Zoom.prototype.handleClick_ = function (delta, event) {\n        event.preventDefault();\n        this.zoomByDelta_(delta);\n    };\n    /**\n     * @param {number} delta Zoom delta.\n     * @private\n     */\n    Zoom.prototype.zoomByDelta_ = function (delta) {\n        var map = this.getMap();\n        var view = map.getView();\n        if (!view) {\n            // the map does not have a view, so we can't act\n            // upon it\n            return;\n        }\n   
      var currentZoom = view.getZoom();\n        if (currentZoom !== undefined) {\n            var newZoom = view.getConstrainedZoom(currentZoom + delta);\n            if (this.duration_ > 0) {\n                if (view.getAnimating()) {\n                    view.cancelAnimations();\n                }\n                view.animate({\n                    zoom: newZoom,\n                    duration: this.duration_,\n                    easing: easeOut,\n                });\n            }\n            else {\n                view.setZoom(newZoom);\n            }\n        }\n    };\n    return Zoom;\n}(Control));\nexport default Zoom;\n//# sourceMappingURL=Zoom.js.map","/**\n * @module ol/control\n */\nimport Attribution from './control/Attribution.js';\nimport Collection from './Collection.js';\nimport Rotate from './control/Rotate.js';\nimport Zoom from './control/Zoom.js';\nexport { default as Attribution } from './control/Attribution.js';\nexport { default as Control } from './contr
 ol/Control.js';\nexport { default as FullScreen } from './control/FullScreen.js';\nexport { default as MousePosition } from './control/MousePosition.js';\nexport { default as OverviewMap } from './control/OverviewMap.js';\nexport { default as Rotate } from './control/Rotate.js';\nexport { default as ScaleLine } from './control/ScaleLine.js';\nexport { default as Zoom } from './control/Zoom.js';\nexport { default as ZoomSlider } from './control/ZoomSlider.js';\nexport { default as ZoomToExtent } from './control/ZoomToExtent.js';\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./control/Attribution.js\").Options} [attributionOptions]\n * Options for {@link module:ol/control/Attribution~Attribution}.\n * @property {boolean} [rotate=true] Include\n * {@link module:ol/control/Rotate~Rotate}.\n * @property {import(\"./control/Rotate.js\").Options} [rotateOptions] Op
 tions\n * for {@link module:ol/control/Rotate~Rotate}.\n * @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.\n * @property {import(\"./control/Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n * @api\n */\n/**\n * Set of controls included in maps by default. Unless configured otherwise,\n * this returns a collection containing an instance of each of the following\n * controls:\n * * {@link module:ol/control/Zoom~Zoom}\n * * {@link module:ol/control/Rotate~Rotate}\n * * {@link module:ol/control/Attribution~Attribution}\n *\n * @param {DefaultsOptions=} opt_options\n * Defaults options.\n * @return {Collection<import(\"./control/Control.js\").default>}\n * Controls.\n * @api\n */\nexport function defaults(opt_options) {\n    var options = opt_options ? opt_options : {};\n    var controls = new Collection();\n    var zoomControl = options.zoom !== undefined ? options.zoom : true;\n    if (zoomControl) {\n        controls.push
 (new Zoom(options.zoomOptions));\n    }\n    var rotateControl = options.rotate !== undefined ? options.rotate : true;\n    if (rotateControl) {\n        controls.push(new Rotate(options.rotateOptions));\n    }\n    var attributionControl = options.attribution !== undefined ? options.attribution : true;\n    if (attributionControl) {\n        controls.push(new Attribution(options.attributionOptions));\n    }\n    return controls;\n}\n//# sourceMappingURL=control.js.map","/**\n * @module ol/interaction/Property\n */\n/**\n * @enum {string}\n */\nexport default {\n    ACTIVE: 'active',\n};\n//# sourceMappingURL=Property.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatic
 s(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Interaction\n */\nimport BaseObject from '../Object.js';\nimport InteractionProperty from './Property.js';\nimport { easeOut, linear } from '../easing.js';\n/**\n * Object literal with config options for interactions.\n * @typedef {Object} InteractionOptions\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} handleEvent\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. If the function returns a falsy value, propagation of\n * the event to other interactions in the map's interactions chain will be\n * prevented (this includes functions with no explicit return). The interactions\n * are traversed in reverse order of the interactions collecti
 on of the map.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * User actions that change the state of the map. Some are similar to controls,\n * but are not associated with a DOM element.\n * For example, {@link module:ol/interaction/KeyboardZoom~KeyboardZoom} is\n * functionally the same as {@link module:ol/control/Zoom~Zoom}, but triggered\n * by a keyboard event not a button element event.\n * Although interactions do not have a DOM element, some of them do render\n * vectors and so are visible on the screen.\n * @api\n */\nvar Interaction = /** @class */ (function (_super) {\n    __extends(Interaction, _super);\n    /**\n     * @param {InteractionOptions=} opt_options Options.\n     */\n    function Interaction(opt_options) {\n        var _this = _super.call(this) || this;\n        if (opt_options && opt_options.handleEvent) {\n            _this.handleEvent = opt_options.handleEvent;\n        }\n  
       /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = null;\n        _this.setActive(true);\n        return _this;\n    }\n    /**\n     * Return whether the interaction is currently active.\n     * @return {boolean} `true` if the interaction is active, `false` otherwise.\n     * @observable\n     * @api\n     */\n    Interaction.prototype.getActive = function () {\n        return /** @type {boolean} */ (this.get(InteractionProperty.ACTIVE));\n    };\n    /**\n     * Get the map associated with this interaction.\n     * @return {import(\"../PluggableMap.js\").default} Map.\n     * @api\n     */\n    Interaction.prototype.getMap = function () {\n        return this.map_;\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event}.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n 
     * @api\n     */\n    Interaction.prototype.handleEvent = function (mapBrowserEvent) {\n        return true;\n    };\n    /**\n     * Activate or deactivate the interaction.\n     * @param {boolean} active Active.\n     * @observable\n     * @api\n     */\n    Interaction.prototype.setActive = function (active) {\n        this.set(InteractionProperty.ACTIVE, active);\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Interaction.prototype.setMap = function (map) {\n        this.map_ = map;\n    };\n    return Interaction;\n}(BaseObject));\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {import(\"../coordinate.js\").Coordinate} delta Delta.\n * @param {number=} opt_duration Duration.\n */\nexport function pan(view, delta, opt_duration)
  {\n    var currentCenter = view.getCenterInternal();\n    if (currentCenter) {\n        var center = [currentCenter[0] + delta[0], currentCenter[1] + delta[1]];\n        view.animateInternal({\n            duration: opt_duration !== undefined ? opt_duration : 250,\n            easing: linear,\n            center: view.getConstrainedCenter(center),\n        });\n    }\n}\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number} delta Delta from previous zoom level.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate in the user projection.\n * @param {number=} opt_duration Duration.\n */\nexport function zoomByDelta(view, delta, opt_anchor, opt_duration) {\n    var currentZoom = view.getZoom();\n    if (currentZoom === undefined) {\n        return;\n    }\n    var newZoom = view.getConstrainedZoom(currentZoom + delta);\n    var newResolution = view.getResolutionForZoom(newZoom);\n    if (view.getAnimating()) {\n        view.cancel
 Animations();\n    }\n    view.animate({\n        resolution: newResolution,\n        anchor: opt_anchor,\n        duration: opt_duration !== undefined ? opt_duration : 250,\n        easing: easeOut,\n    });\n}\nexport default Interaction;\n//# sourceMappingURL=Interaction.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DoubleClickZoom\n */\nimport Interaction, { zoomByDelta } from './Interaction.js';\
 nimport MapBrowserEventType from '../MapBrowserEventType.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [delta=1] The zoom delta applied on each double click.\n */\n/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nvar DoubleClickZoom = /** @class */ (function (_super) {\n    __extends(DoubleClickZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DoubleClickZoom(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.delta_ = options.delta ? options.delta : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n    }\n    /**\n     * 
 Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a\n     * doubleclick) and eventually zooms the map.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    DoubleClickZoom.prototype.handleEvent = function (mapBrowserEvent) {\n        var stopEvent = false;\n        if (mapBrowserEvent.type == MapBrowserEventType.DBLCLICK) {\n            var browserEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);\n            var map = mapBrowserEvent.map;\n            var anchor = mapBrowserEvent.coordinate;\n            var delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;\n            var view = map.getView();\n            zoomByDelta(view, delta, anchor, this.duration_);\n            mapBrowserEvent.preventDefault();\n            stopEvent = true;\n        }\n        return !stopEvent;\n    };\n    return DoubleClickZoom;\n}(Inter
 action));\nexport default DoubleClickZoom;\n//# sourceMappingURL=DoubleClickZoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Pointer\n */\nimport Interaction from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport { getValues } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handl
 eDownEvent]\n * Function handling \"down\" events. If the function returns `true` then a drag\n * sequence is started.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleDragEvent]\n * Function handling \"drag\" events. This function is called on \"move\" events\n * during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleEvent]\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. The function may return `false` to prevent the\n * propagation of the event to other interactions in the map's interactions\n * chain.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleMoveEvent]\n * Function handling \"move\" events. This function is called on \"move\" events.\n * This functions is also called during a drag sequence, so during a drag\n * sequence both the `handleDragEvent` function and this function are called.\n * If `handleDow
 nEvent` is defined and it returns true this function will not\n * be called during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleUpEvent]\n *  Function handling \"up\" events. If the function returns `false` then the\n * current drag sequence is stopped.\n * @property {function(boolean):boolean} [stopDown]\n * Should the down event be propagated to other interactions, or should be\n * stopped?\n */\n/**\n * @classdesc\n * Base class that calls user-defined functions on `down`, `move` and `up`\n * events. This class also manages \"drag sequences\".\n *\n * When the `handleDownEvent` user function returns `true` a drag sequence is\n * started. During a drag sequence the `handleDragEvent` user function is\n * called on `move` events. The drag sequence ends when the `handleUpEvent`\n * user function is called and returns `false`.\n * @api\n */\nvar PointerInteraction = /** @class */ (function (_super) {\n    __extends(PointerInteract
 ion, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function PointerInteraction(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, \n        /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)) || this;\n        if (options.handleDownEvent) {\n            _this.handleDownEvent = options.handleDownEvent;\n        }\n        if (options.handleDragEvent) {\n            _this.handleDragEvent = options.handleDragEvent;\n        }\n        if (options.handleMoveEvent) {\n            _this.handleMoveEvent = options.handleMoveEvent;\n        }\n        if (options.handleUpEvent) {\n            _this.handleUpEvent = options.handleUpEvent;\n        }\n        if (options.stopDown) {\n            _this.stopDown = options.stopDown;\n        }\n        /**\n         * @type {boolean}\n         * @protected\n         */\n        _this.handlingDownUpSequence = false
 ;\n        /**\n         * @type {!Object<string, PointerEvent>}\n         * @private\n         */\n        _this.trackedPointers_ = {};\n        /**\n         * @type {Array<PointerEvent>}\n         * @protected\n         */\n        _this.targetPointers = [];\n        return _this;\n    }\n    /**\n     * Returns the current number of pointers involved in the interaction,\n     * e.g. `2` when two fingers are used.\n     * @return {number} The number of pointers.\n     * @api\n     */\n    PointerInteraction.prototype.getPointerCount = function () {\n        return this.targetPointers.length;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     * @protected\n     */\n    PointerInteraction.prototype.handleDownEvent = function (mapBrowserEvent) {\n        return false;\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import
 (\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @protected\n     */\n    PointerInteraction.prototype.handleDragEvent = function (mapBrowserEvent) { };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may call into\n     * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are\n     * detected.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @api\n     */\n    PointerInteraction.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!mapBrowserEvent.originalEvent) {\n            return true;\n        }\n        var stopEvent = false;\n        this.updateTrackedPointers_(mapBrowserEvent);\n        if (this.handlingDownUpSequence) {\n            if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {\n                this.handleDragEvent(mapBrowserEvent);\n                // prev
 ent page scrolling during dragging\n                mapBrowserEvent.preventDefault();\n            }\n            else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n                var handledUp = this.handleUpEvent(mapBrowserEvent);\n                this.handlingDownUpSequence =\n                    handledUp && this.targetPointers.length > 0;\n            }\n        }\n        else {\n            if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n                var handled = this.handleDownEvent(mapBrowserEvent);\n                this.handlingDownUpSequence = handled;\n                stopEvent = this.stopDown(handled);\n            }\n            else if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE) {\n                this.handleMoveEvent(mapBrowserEvent);\n            }\n        }\n        return !stopEvent;\n    };\n    /**\n     * Handle pointer move events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Eve
 nt.\n     * @protected\n     */\n    PointerInteraction.prototype.handleMoveEvent = function (mapBrowserEvent) { };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     * @protected\n     */\n    PointerInteraction.prototype.handleUpEvent = function (mapBrowserEvent) {\n        return false;\n    };\n    /**\n     * This function is used to determine if \"down\" events should be propagated\n     * to other interactions or should be stopped.\n     * @param {boolean} handled Was the event handled by the interaction?\n     * @return {boolean} Should the `down` event be stopped?\n     */\n    PointerInteraction.prototype.stopDown = function (handled) {\n        return handled;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @private\n     */\n    PointerInteraction.prototype.updateTrackedPointers_ = 
 function (mapBrowserEvent) {\n        if (isPointerDraggingEvent(mapBrowserEvent)) {\n            var event_1 = mapBrowserEvent.originalEvent;\n            var id = event_1.pointerId.toString();\n            if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n                delete this.trackedPointers_[id];\n            }\n            else if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n                this.trackedPointers_[id] = event_1;\n            }\n            else if (id in this.trackedPointers_) {\n                // update only when there was a pointerdown event for this pointer\n                this.trackedPointers_[id] = event_1;\n            }\n            this.targetPointers = getValues(this.trackedPointers_);\n        }\n    };\n    return PointerInteraction;\n}(Interaction));\n/**\n * @param {Array<PointerEvent>} pointerEvents List of events.\n * @return {import(\"../pixel.js\").Pixel} Centroid pixel.\n */\nexport function centroid(pointerEv
 ents) {\n    var length = pointerEvents.length;\n    var clientX = 0;\n    var clientY = 0;\n    for (var i = 0; i < length; i++) {\n        clientX += pointerEvents[i].clientX;\n        clientY += pointerEvents[i].clientY;\n    }\n    return [clientX / length, clientY / length];\n}\n/**\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} Whether the event is a pointerdown, pointerdrag\n *     or pointerup event.\n */\nfunction isPointerDraggingEvent(mapBrowserEvent) {\n    var type = mapBrowserEvent.type;\n    return (type === MapBrowserEventType.POINTERDOWN ||\n        type === MapBrowserEventType.POINTERDRAG ||\n        type === MapBrowserEventType.POINTERUP);\n}\nexport default PointerInteraction;\n//# sourceMappingURL=Pointer.js.map","/**\n * @module ol/events/condition\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport { FALSE, TRUE } from '../functions.js';\nimport { MAC, WEBKIT } from '../has.js';\nimpor
 t { assert } from '../asserts.js';\n/**\n * A function that takes an {@link module:ol/MapBrowserEvent} and returns a\n * `{boolean}`. If the condition is met, true should be returned.\n *\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default): boolean} Condition\n */\n/**\n * Creates a condition function that passes when all provided conditions pass.\n * @param {...Condition} var_args Conditions to check.\n * @return {Condition} Condition function.\n */\nexport function all(var_args) {\n    var conditions = arguments;\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} All conditions passed.\n     */\n    return function (event) {\n        var pass = true;\n        for (var i = 0, ii = conditions.length; i < ii; ++i) {\n            pass = pass && conditions[i](event);\n            if (!pass) {\n                break;\n            }\n        }\n        return pass;\n    };\n}\n/**\n * Return `true` if only the
  alt-key is pressed, `false` otherwise (e.g. when\n * additionally the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt key is pressed.\n * @api\n */\nexport var altKeyOnly = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (originalEvent.altKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        !originalEvent.shiftKey);\n};\n/**\n * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise\n * (e.g. when additionally the platform-modifier-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt and shift keys are pressed.\n * @api\n */\nexport var altShiftKeysOnly = function (mapBrowserEvent) {\n    var originalEvent = /** @type {Keyboa
 rdEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (originalEvent.altKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        originalEvent.shiftKey);\n};\n/**\n * Return `true` if the map has the focus. This condition requires a map target\n * element with a `tabindex` attribute, e.g. `<div id=\"map\" tabindex=\"1\">`.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map has the focus.\n * @api\n */\nexport var focus = function (event) {\n    return event.target.getTargetElement().contains(document.activeElement);\n};\n/**\n * Return `true` if the map has the focus or no 'tabindex' attribute set.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map container has the focus or no 'tabindex' attribute.\n */\nexport var focusWithTabindex = function (event) {\n    return event.map.getTargetElement().hasAttribute('tabin
 dex')\n        ? focus(event)\n        : true;\n};\n/**\n * Return always true.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True.\n * @api\n */\nexport var always = TRUE;\n/**\n * Return `true` if the event is a `click` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `click` event.\n * @api\n */\nexport var click = function (mapBrowserEvent) {\n    return mapBrowserEvent.type == MapBrowserEventType.CLICK;\n};\n/**\n * Return `true` if the event has an \"action\"-producing mouse button.\n *\n * By definition, this includes left-click on windows/linux, and left-click\n * without the ctrl key on Macs.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} The result.\n */\nexport var mouseActionButton = function (mapBrowserEvent) {\n   
  var originalEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);\n    return originalEvent.button == 0 && !(WEBKIT && MAC && originalEvent.ctrlKey);\n};\n/**\n * Return always false.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} False.\n * @api\n */\nexport var never = FALSE;\n/**\n * Return `true` if the browser event is a `pointermove` event, `false`\n * otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the browser event is a `pointermove` event.\n * @api\n */\nexport var pointerMove = function (mapBrowserEvent) {\n    return mapBrowserEvent.type == 'pointermove';\n};\n/**\n * Return `true` if the event is a map `singleclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `singleclick` event.\n
  * @api\n */\nexport var singleClick = function (mapBrowserEvent) {\n    return mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK;\n};\n/**\n * Return `true` if the event is a map `dblclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `dblclick` event.\n * @api\n */\nexport var doubleClick = function (mapBrowserEvent) {\n    return mapBrowserEvent.type == MapBrowserEventType.DBLCLICK;\n};\n/**\n * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is\n * pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if there no modifier keys are pressed.\n * @api\n */\nexport var noModifierKeys = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (!originalEvent.al
 tKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        !originalEvent.shiftKey);\n};\n/**\n * Return `true` if only the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally\n * the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the platform modifier key is pressed.\n * @api\n */\nexport var platformModifierKeyOnly = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (!originalEvent.altKey &&\n        (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n        !originalEvent.shiftKey);\n};\n/**\n * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when\n * additionally the alt-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEve
 nt Map browser event.\n * @return {boolean} True if only the shift key is pressed.\n * @api\n */\nexport var shiftKeyOnly = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (!originalEvent.altKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        originalEvent.shiftKey);\n};\n/**\n * Return `true` if the target element is not editable, i.e. not a `<input>`-,\n * `<select>`- or `<textarea>`-element, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if the target element is not editable.\n * @api\n */\nexport var targetNotEditable = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    var tagName = /** @type {Element} */ (originalEvent.target).tagName;\n    return tagName !== 'INPU
 T' && tagName !== 'SELECT' && tagName !== 'TEXTAREA';\n};\n/**\n * Return `true` if the event originates from a mouse device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a mouse device.\n * @api\n */\nexport var mouseOnly = function (mapBrowserEvent) {\n    var pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent)\n        .originalEvent;\n    assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n    // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return pointerEvent.pointerType == 'mouse';\n};\n/**\n * Return `true` if the event originates from a touchable device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a touchable device.\n * @api\n */\nexport var touchOnly = functi
 on (mapBrowserEvent) {\n    var pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent)\n        .originalEvent;\n    assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n    // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return pointerEvt.pointerType === 'touch';\n};\n/**\n * Return `true` if the event originates from a digital pen.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a digital pen.\n * @api\n */\nexport var penOnly = function (mapBrowserEvent) {\n    var pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent)\n        .originalEvent;\n    assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n    // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return pointerEvt.pointerType 
 === 'pen';\n};\n/**\n * Return `true` if the event originates from a primary pointer in\n * contact with the surface or if the left mouse button is pressed.\n * See http://www.w3.org/TR/pointerevents/#button-states.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a primary pointer.\n * @api\n */\nexport var primaryAction = function (mapBrowserEvent) {\n    var pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent)\n        .originalEvent;\n    assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n    return pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n//# sourceMappingURL=condition.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && functi
 on (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragPan\n */\nimport PointerInteraction, { centroid as centroidFromPointers, } from './Pointer.js';\nimport { FALSE } from '../functions.js';\nimport { all, focusWithTabindex, noModifierKeys, primaryAction, } from '../events/condition.js';\nimport { easeOut } from '../easing.js';\nimport { rotate as rotateCoordinate, scale as scaleCoordinate, } from '../coordinate.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\
 n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~noModifierKeys} and {@link module:ol/events/condition~primaryAction}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {import(\"../Kinetic.js\").default} [kinetic] Kinetic inertia to apply to the pan.\n */\n/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nvar DragPan = /** @class */ (function (_super) {\n    __extends(DragPan, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragPan(opt_options) {\n        var _this = _super.call(this, {\n            stopDown: FALSE,\n        }) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {import(\"../Kinetic.js\").default|undefined}\n         */\n        _this.kine
 tic_ = options.kinetic;\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         */\n        _this.lastCentroid = null;\n        /**\n         * @type {number}\n         */\n        _this.lastPointersCount_;\n        /**\n         * @type {boolean}\n         */\n        _this.panning_ = false;\n        var condition = options.condition\n            ? options.condition\n            : all(noModifierKeys, primaryAction);\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.onFocusOnly\n            ? all(focusWithTabindex, condition)\n            : condition;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.noKinetic_ = false;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragPan.prototype.handleDragEvent = functio
 n (mapBrowserEvent) {\n        if (!this.panning_) {\n            this.panning_ = true;\n            this.getMap().getView().beginInteraction();\n        }\n        var targetPointers = this.targetPointers;\n        var centroid = centroidFromPointers(targetPointers);\n        if (targetPointers.length == this.lastPointersCount_) {\n            if (this.kinetic_) {\n                this.kinetic_.update(centroid[0], centroid[1]);\n            }\n            if (this.lastCentroid) {\n                var delta = [\n                    this.lastCentroid[0] - centroid[0],\n                    centroid[1] - this.lastCentroid[1],\n                ];\n                var map = mapBrowserEvent.map;\n                var view = map.getView();\n                scaleCoordinate(delta, view.getResolution());\n                rotateCoordinate(delta, view.getRotation());\n                view.adjustCenterInternal(delta);\n            }\n        }\n        else if (this.kinetic_) {\n            // re
 set so we don't overestimate the kinetic energy after\n            // after one finger down, tiny drag, second finger down\n            this.kinetic_.begin();\n        }\n        this.lastCentroid = centroid;\n        this.lastPointersCount_ = targetPointers.length;\n        mapBrowserEvent.originalEvent.preventDefault();\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragPan.prototype.handleUpEvent = function (mapBrowserEvent) {\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (this.targetPointers.length === 0) {\n            if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {\n                var distance = this.kinetic_.getDistance();\n                var angle = this.kinetic_.getAngle();\n                var center = view.getCenterInternal();\n                var centerpx = map.g
 etPixelFromCoordinateInternal(center);\n                var dest = map.getCoordinateFromPixelInternal([\n                    centerpx[0] - distance * Math.cos(angle),\n                    centerpx[1] - distance * Math.sin(angle),\n                ]);\n                view.animateInternal({\n                    center: view.getConstrainedCenter(dest),\n                    duration: 500,\n                    easing: easeOut,\n                });\n            }\n            if (this.panning_) {\n                this.panning_ = false;\n                view.endInteraction();\n            }\n            return false;\n        }\n        else {\n            if (this.kinetic_) {\n                // reset so we don't overestimate the kinetic energy after\n                // after one finger up, tiny drag, second finger up\n                this.kinetic_.begin();\n            }\n            this.lastCentroid = null;\n            return true;\n        }\n    };\n    /**\n     * Handle pointer d
 own events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragPan.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {\n            var map = mapBrowserEvent.map;\n            var view = map.getView();\n            this.lastCentroid = null;\n            // stop any current animation\n            if (view.getAnimating()) {\n                view.cancelAnimations();\n            }\n            if (this.kinetic_) {\n                this.kinetic_.begin();\n            }\n            // No kinetic as soon as more than one pointer on the screen is\n            // detected. This is to prevent nasty pans after pinch.\n            this.noKinetic_ = this.targetPointers.length > 1;\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return DragPan;\n}(Point
 erInteraction));\nexport default DragPan;\n//# sourceMappingURL=DragPan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragRotate\n */\nimport PointerInteraction from './Pointer.js';\nimport { FALSE } from '../functions.js';\nimport { altShiftKeysOnly, mouseActionButton, mouseOnly, } from '../events/condition.js';\nimport { disable } from '../rotationconstraint.js';\n/**\n * @typedef {Object} Options\n
  * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an\n * {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~altShiftKeysOnly}.\n * @property {number} [duration=250] Animation duration in milliseconds.\n */\n/**\n * @classdesc\n * Allows the user to rotate the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the alt and shift keys are held down.\n *\n * This interaction is only supported for mouse devices.\n * @api\n */\nvar DragRotate = /** @class */ (function (_super) {\n    __extends(DragRotate, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragRotate(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n        
     stopDown: FALSE,\n        }) || this;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : altShiftKeysOnly;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastAngle_ = undefined;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragRotate.prototype.handleDragEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return;\n        }\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (view.getConstraints().rotation === disable) {\n            return;\n     
    }\n        var size = map.getSize();\n        var offset = mapBrowserEvent.pixel;\n        var theta = Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n        if (this.lastAngle_ !== undefined) {\n            var delta = theta - this.lastAngle_;\n            view.adjustRotationInternal(-delta);\n        }\n        this.lastAngle_ = theta;\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragRotate.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return true;\n        }\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        view.endInteraction(this.duration_);\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @ret
 urn {boolean} If the event was consumed.\n     */\n    DragRotate.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return false;\n        }\n        if (mouseActionButton(mapBrowserEvent) &&\n            this.condition_(mapBrowserEvent)) {\n            var map = mapBrowserEvent.map;\n            map.getView().beginInteraction();\n            this.lastAngle_ = undefined;\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return DragRotate;\n}(PointerInteraction));\nexport default DragRotate;\n//# sourceMappingURL=DragRotate.js.map","/**\n * @module ol/render/Box\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwn
 Property(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Disposable from '../Disposable.js';\nimport Polygon from '../geom/Polygon.js';\nvar RenderBox = /** @class */ (function (_super) {\n    __extends(RenderBox, _super);\n    /**\n     * @param {string} className CSS class name.\n     */\n    function RenderBox(className) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {import(\"../geom/Polygon.js\").default}\n         * @private\n         */\n        _this.geometry_ = null;\n        /**\n         * @type {HTMLDivElement}\n         * @private\n         */\n        _this.element_ = document.createElement('div');\n        _this.element_.style.position = 'absolute';\n        _this.element_.style.pointerEvents = 
 'auto';\n        _this.element_.className = 'ol-box ' + className;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = null;\n        /**\n         * @private\n         * @type {import(\"../pixel.js\").Pixel}\n         */\n        _this.startPixel_ = null;\n        /**\n         * @private\n         * @type {import(\"../pixel.js\").Pixel}\n         */\n        _this.endPixel_ = null;\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    RenderBox.prototype.disposeInternal = function () {\n        this.setMap(null);\n    };\n    /**\n     * @private\n     */\n    RenderBox.prototype.render_ = function () {\n        var startPixel = this.startPixel_;\n        var endPixel = this.endPixel_;\n        var px = 'px';\n        var style = this.element_.style;\n        style.left = Math.min(startPixel[0], endPixel[0]) + px;\n        style.top = Math.min(startPixel[1], endPixel[1]) + px;\n        sty
 le.width = Math.abs(endPixel[0] - startPixel[0]) + px;\n        style.height = Math.abs(endPixel[1] - startPixel[1]) + px;\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    RenderBox.prototype.setMap = function (map) {\n        if (this.map_) {\n            this.map_.getOverlayContainer().removeChild(this.element_);\n            var style = this.element_.style;\n            style.left = 'inherit';\n            style.top = 'inherit';\n            style.width = 'inherit';\n            style.height = 'inherit';\n        }\n        this.map_ = map;\n        if (this.map_) {\n            this.map_.getOverlayContainer().appendChild(this.element_);\n        }\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} startPixel Start pixel.\n     * @param {import(\"../pixel.js\").Pixel} endPixel End pixel.\n     */\n    RenderBox.prototype.setPixels = function (startPixel, endPixel) {\n        this.startPixel_ = startPixel;\n        this.e
 ndPixel_ = endPixel;\n        this.createOrUpdateGeometry();\n        this.render_();\n    };\n    /**\n     * Creates or updates the cached geometry.\n     */\n    RenderBox.prototype.createOrUpdateGeometry = function () {\n        var startPixel = this.startPixel_;\n        var endPixel = this.endPixel_;\n        var pixels = [\n            startPixel,\n            [startPixel[0], endPixel[1]],\n            endPixel,\n            [endPixel[0], startPixel[1]],\n        ];\n        var coordinates = pixels.map(this.map_.getCoordinateFromPixelInternal, this.map_);\n        // close the polygon\n        coordinates[4] = coordinates[0].slice();\n        if (!this.geometry_) {\n            this.geometry_ = new Polygon([coordinates]);\n        }\n        else {\n            this.geometry_.setCoordinates([coordinates]);\n        }\n    };\n    /**\n     * @return {import(\"../geom/Polygon.js\").default} Geometry.\n     */\n    RenderBox.prototype.getGeometry = function () {\n        retur
 n this.geometry_;\n    };\n    return RenderBox;\n}(Disposable));\nexport default RenderBox;\n//# sourceMappingURL=Box.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragBox\n */\n// FIXME draw drag box\nimport Event from '../events/Event.js';\nimport PointerInteraction from './Pointer.js';\nimport RenderBox from '../render/Box.js';\nimport { mouseActionButton } from '../events/condition.js';\n/**\n * 
 A function that takes a {@link module:ol/MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s and returns a `{boolean}`. If the condition is met,\n * true should be returned.\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default, import(\"../pixel.js\").Pixel, import(\"../pixel.js\").Pixel):boolean} EndCondition\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragbox'] CSS class name for styling the box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link ol/events/condition~mouseActionButton}.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default\n * `boxEndCondition` function.\n * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~Ma
 pBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired.\n * Default is `true` if the area of the box is bigger than the `minArea` option.\n * @property {function(this:DragBox, import(\"../MapBrowserEvent.js\").default):void} [onBoxEnd] Code to execute just\n * before `boxend` is fired.\n */\n/**\n * @enum {string}\n */\nvar DragBoxEventType = {\n    /**\n     * Triggered upon drag box start.\n     * @event DragBoxEvent#boxstart\n     * @api\n     */\n    BOXSTART: 'boxstart',\n    /**\n     * Triggered on drag when box is active.\n     * @event DragBoxEvent#boxdrag\n     * @api\n     */\n    BOXDRAG: 'boxdrag',\n    /**\n     * Triggered upon drag box end.\n     * @event DragBoxEvent#boxend\n     * @api\n     */\n    BOXEND: 'boxend',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nvar DragBoxEvent = /** @class */ (function (_super) {\n 
    __extends(DragBoxEvent, _super);\n    /**\n     * @param {string} type The event type.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Originating event.\n     */\n    function DragBoxEvent(type, coordinate, mapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The coordinate of the drag event.\n         * @const\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @api\n         */\n        _this.coordinate = coordinate;\n        /**\n         * @const\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n         */\n        _this.mapBrowserEvent = mapBrowserEvent;\n        return _this;\n    }\n    return DragBoxEvent;\n}(Event));\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map,\n * normally combined with an {@link module:ol/e
 vents/condition} that limits\n * it to when the shift or other key is held down. This is used, for example,\n * for zooming to a specific area of the map\n * (see {@link module:ol/interaction/DragZoom~DragZoom} and\n * {@link module:ol/interaction/DragRotateAndZoom}).\n *\n * @fires DragBoxEvent\n * @api\n */\nvar DragBox = /** @class */ (function (_super) {\n    __extends(DragBox, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragBox(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"../render/Box.js\").default}\n         * @private\n         */\n        _this.box_ = new RenderBox(options.className || 'ol-dragbox');\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minArea_ = options.minArea !== undefined ? options.minArea : 64;\n        if (options.onBoxEnd) {\n            _this.onBoxEnd = optio
 ns.onBoxEnd;\n        }\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         * @private\n         */\n        _this.startPixel_ = null;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : mouseActionButton;\n        /**\n         * @private\n         * @type {EndCondition}\n         */\n        _this.boxEndCondition_ = options.boxEndCondition\n            ? options.boxEndCondition\n            : _this.defaultBoxEndCondition;\n        return _this;\n    }\n    /**\n     * The default condition for determining whether the boxend event\n     * should fire.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent The originating MapBrowserEvent\n     *     leading to the box end.\n     * @param {import(\"../pixel.js\").Pixel} startPixel The starting pixel of the box.\n     * @param {import(\"../pixel.js\").Pixel} endPixel T
 he end pixel of the box.\n     * @return {boolean} Whether or not the boxend condition should be fired.\n     */\n    DragBox.prototype.defaultBoxEndCondition = function (mapBrowserEvent, startPixel, endPixel) {\n        var width = endPixel[0] - startPixel[0];\n        var height = endPixel[1] - startPixel[1];\n        return width * width + height * height >= this.minArea_;\n    };\n    /**\n     * Returns geometry of last drawn box.\n     * @return {import(\"../geom/Polygon.js\").default} Geometry.\n     * @api\n     */\n    DragBox.prototype.getGeometry = function () {\n        return this.box_.getGeometry();\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragBox.prototype.handleDragEvent = function (mapBrowserEvent) {\n        this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n        this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXDRAG, mapBrowserEvent.coor
 dinate, mapBrowserEvent));\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragBox.prototype.handleUpEvent = function (mapBrowserEvent) {\n        this.box_.setMap(null);\n        if (this.boxEndCondition_(mapBrowserEvent, this.startPixel_, mapBrowserEvent.pixel)) {\n            this.onBoxEnd(mapBrowserEvent);\n            this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXEND, mapBrowserEvent.coordinate, mapBrowserEvent));\n        }\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragBox.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.condition_(mapBrowserEvent)) {\n            this.startPixel_ = mapBrowserEvent.pixel;\n      
       this.box_.setMap(mapBrowserEvent.map);\n            this.box_.setPixels(this.startPixel_, this.startPixel_);\n            this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXSTART, mapBrowserEvent.coordinate, mapBrowserEvent));\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    /**\n     * Function to execute just before `onboxend` is fired\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    DragBox.prototype.onBoxEnd = function (event) { };\n    return DragBox;\n}(PointerInteraction));\nexport default DragBox;\n//# sourceMappingURL=DragBox.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        r
 eturn extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragZoom\n */\nimport DragBox from './DragBox.js';\nimport { createOrUpdateFromCoordinates, getBottomLeft, getCenter, getTopRight, scaleFromCenter, } from '../extent.js';\nimport { easeOut } from '../easing.js';\nimport { shiftKeyOnly } from '../events/condition.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragzoom'] CSS class name for styling the\n * box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~shiftKeyOnly}.\n * @property {number} [dur
 ation=200] Animation duration in milliseconds.\n * @property {boolean} [out=false] Use interaction for zooming out.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the parent default\n * `boxEndCondition` function.\n */\n/**\n * @classdesc\n * Allows the user to zoom the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when a key, shift by default, is held down.\n *\n * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or\n * your custom one configured with `className`.\n * @api\n */\nvar DragZoom = /** @class */ (function (_super) {\n    __extends(DragZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var condition = options.condition ? options.condition : shiftKeyOnly;\n        
 _this = _super.call(this, {\n            condition: condition,\n            className: options.className || 'ol-dragzoom',\n            minArea: options.minArea,\n        }) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 200;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.out_ = options.out !== undefined ? options.out : false;\n        return _this;\n    }\n    /**\n     * Function to execute just before `onboxend` is fired\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    DragZoom.prototype.onBoxEnd = function (event) {\n        var map = this.getMap();\n        var view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n        var size = /** @type {!import(\"../size.js\").Size} */ (map.getSize());\n        var extent = this.getGeometry().getExtent();\n        if (this.out_)
  {\n            var mapExtent = view.calculateExtentInternal(size);\n            var boxPixelExtent = createOrUpdateFromCoordinates([\n                map.getPixelFromCoordinateInternal(getBottomLeft(extent)),\n                map.getPixelFromCoordinateInternal(getTopRight(extent)),\n            ]);\n            var factor = view.getResolutionForExtentInternal(boxPixelExtent, size);\n            scaleFromCenter(mapExtent, 1 / factor);\n            extent = mapExtent;\n        }\n        var resolution = view.getConstrainedResolution(view.getResolutionForExtentInternal(extent, size));\n        var center = view.getConstrainedCenter(getCenter(extent), resolution);\n        view.animateInternal({\n            resolution: resolution,\n            center: center,\n            duration: this.duration_,\n            easing: easeOut,\n        });\n    };\n    return DragZoom;\n}(DragBox));\nexport default DragZoom;\n//# sourceMappingURL=DragZoom.js.map","/**\n * @module ol/events/KeyCode\n 
 */\n/**\n * @enum {number}\n * @const\n */\nexport default {\n    LEFT: 37,\n    UP: 38,\n    RIGHT: 39,\n    DOWN: 40,\n};\n//# sourceMappingURL=KeyCode.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/KeyboardPan\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, { pan } from './Interaction.js';\nimport KeyCode from '../events/KeyCode.js';\nimport { noModifierKeys, targetNotEdit
 able } from '../events/condition.js';\nimport { rotate as rotateCoordinate } from '../coordinate.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~noModifierKeys} and\n * {@link module:ol/events/condition~targetNotEditable}.\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {number} [pixelDelta=128] The amount of pixels to pan on each key\n * press.\n */\n/**\n * @classdesc\n * Allows the user to pan the map using keyboard arrows.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with t
 he `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}.\n * @api\n */\nvar KeyboardPan = /** @class */ (function (_super) {\n    __extends(KeyboardPan, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function KeyboardPan(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options || {};\n        /**\n         * @private\n         * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n         * @return {boolean} Combined condition result.\n         */\n        _this.defaultCondition_ = function (mapBrowserEvent) {\n            return (noModifierKeys(mapBrowserEvent) && targetNotEditable(mapBrowserEvent));\n        };\n        /**\n         * @private\n         * @typ
 e {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ =\n            options.condition !== undefined\n                ? options.condition\n                : _this.defaultCondition_;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 100;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelDelta_ =\n            options.pixelDelta !== undefined ? options.pixelDelta : 128;\n        return _this;\n    }\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} if it was a\n     * `KeyEvent`, and decides the direction to pan to (if an arrow key was\n     * pressed).\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @this {KeyboardPan}\n     */\n    KeyboardPan.prototype.handleEve
 nt = function (mapBrowserEvent) {\n        var stopEvent = false;\n        if (mapBrowserEvent.type == EventType.KEYDOWN) {\n            var keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n            var keyCode = keyEvent.keyCode;\n            if (this.condition_(mapBrowserEvent) &&\n                (keyCode == KeyCode.DOWN ||\n                    keyCode == KeyCode.LEFT ||\n                    keyCode == KeyCode.RIGHT ||\n                    keyCode == KeyCode.UP)) {\n                var map = mapBrowserEvent.map;\n                var view = map.getView();\n                var mapUnitsDelta = view.getResolution() * this.pixelDelta_;\n                var deltaX = 0, deltaY = 0;\n                if (keyCode == KeyCode.DOWN) {\n                    deltaY = -mapUnitsDelta;\n                }\n                else if (keyCode == KeyCode.LEFT) {\n                    deltaX = -mapUnitsDelta;\n                }\n                else if (keyCode == KeyCode.RIGHT)
  {\n                    deltaX = mapUnitsDelta;\n                }\n                else {\n                    deltaY = mapUnitsDelta;\n                }\n                var delta = [deltaX, deltaY];\n                rotateCoordinate(delta, view.getRotation());\n                pan(view, delta, this.duration_);\n                mapBrowserEvent.preventDefault();\n                stopEvent = true;\n            }\n        }\n        return !stopEvent;\n    };\n    return KeyboardPan;\n}(Interaction));\nexport default KeyboardPan;\n//# sourceMappingURL=KeyboardPan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        e
 xtendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/KeyboardZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, { zoomByDelta } from './Interaction.js';\nimport { targetNotEditable } from '../events/condition.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~targetNotEditable}.\n * @property {number} [delta=1] The zoom level delta on each key press.\n */\n/**\n * @classdesc\n * Allows the user to zoom the map using keyboard + and -.\n * Note that, although this int
 eraction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardPan~KeyboardPan}.\n * @api\n */\nvar KeyboardZoom = /** @class */ (function (_super) {\n    __extends(KeyboardZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function KeyboardZoom(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition 
 : targetNotEditable;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.delta_ = options.delta ? options.delta : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 100;\n        return _this;\n    }\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} if it was a\n     * `KeyEvent`, and decides whether to zoom in or out (depending on whether the\n     * key pressed was '+' or '-').\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @this {KeyboardZoom}\n     */\n    KeyboardZoom.prototype.handleEvent = function (mapBrowserEvent) {\n        var stopEvent = false;\n        if (mapBrowserEvent.type == EventType.KEYDOWN ||\n            mapBrowserEvent.type == EventType.KEYPRESS) {\n            var keyEvent = 
 /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n            var charCode = keyEvent.charCode;\n            if (this.condition_(mapBrowserEvent) &&\n                (charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0))) {\n                var map = mapBrowserEvent.map;\n                var delta = charCode == '+'.charCodeAt(0) ? this.delta_ : -this.delta_;\n                var view = map.getView();\n                zoomByDelta(view, delta, undefined, this.duration_);\n                mapBrowserEvent.preventDefault();\n                stopEvent = true;\n            }\n        }\n        return !stopEvent;\n    };\n    return KeyboardZoom;\n}(Interaction));\nexport default KeyboardZoom;\n//# sourceMappingURL=KeyboardZoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ 
 = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/MouseWheelZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, { zoomByDelta } from './Interaction.js';\nimport { DEVICE_PIXEL_RATIO, FIREFOX } from '../has.js';\nimport { all, always, focusWithTabindex } from '../events/condition.js';\nimport { clamp } from '../math.js';\n/**\n * @enum {string}\n */\nexport var Mode = {\n    TRACKPAD: 'trackpad',\n    WHEEL: 'wheel',\n};\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns 
 a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~always}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {number} [maxDelta=1] Maximum mouse wheel delta.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [timeout=80] Mouse wheel timeout duration in milliseconds.\n * @property {boolean} [useAnchor=true] Enable zooming using the mouse's\n * location as the anchor. When set to `false`, zooming in and out will zoom to\n * the center of the screen instead of zooming on the mouse's location.\n * @property {boolean} [constrainResolution=false] If true, the mouse wheel zoom\n * event will always animate to the closest zoom level after an interaction;\n * false means intermediary zoom levels are allowed.\n */\n/**\n * @classdesc\n * Allows the user
  to zoom the map by scrolling the mouse wheel.\n * @api\n */\nvar MouseWheelZoom = /** @class */ (function (_super) {\n    __extends(MouseWheelZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function MouseWheelZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, \n        /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.totalDelta_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.lastDelta_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = options.maxDelta !== undefined ? options.maxDelta : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 
 250;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.useAnchor_ =\n            options.useAnchor !== undefined ? options.useAnchor : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.constrainResolution_ =\n            options.constrainResolution !== undefined\n                ? options.constrainResolution\n                : false;\n        var condition = options.condition ? options.condition : always;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.onFocusOnly\n            ? all(focusWithTabindex, condition)\n            : condition;\n        /**\n         * @private\n         * @type {?import(\"../coordinate.js\").Coordinate}\n         */\n    
     _this.lastAnchor_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.startTime_ = undefined;\n        /**\n         * @private\n         * @type {?}\n         */\n        _this.timeoutId_;\n        /**\n         * @private\n         * @type {Mode|undefined}\n         */\n        _this.mode_ = undefined;\n        /**\n         * Trackpad events separated by this delay will be considered separate\n         * interactions.\n         * @type {number}\n         */\n        _this.trackpadEventGap_ = 400;\n        /**\n         * @type {?}\n         */\n        _this.trackpadTimeoutId_;\n        /**\n         * The number of delta values per zoom level\n         * @private\n         * @type {number}\n         */\n        _this.deltaPerZoom_ = 300;\n        return _this;\n    }\n    /**\n     * @private\n     */\n    MouseWheelZoom.prototype.endInteraction_ = function () {\n        this.trackpadTimeoutId_ = undefined;\n        var 
 view = this.getMap().getView();\n        view.endInteraction(undefined, this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0, this.lastAnchor_);\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually\n     * zooms the map.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    MouseWheelZoom.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!this.condition_(mapBrowserEvent)) {\n            return true;\n        }\n        var type = mapBrowserEvent.type;\n        if (type !== EventType.WHEEL) {\n            return true;\n        }\n        mapBrowserEvent.preventDefault();\n        var map = mapBrowserEvent.map;\n        var wheelEvent = /** @type {WheelEvent} */ (mapBrowserEvent.originalEvent);\n        if (this.useAnchor_) {\n            this.lastAnchor_ = mapBrowserEvent.co
 ordinate;\n        }\n        // Delta normalisation inspired by\n        // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js\n        var delta;\n        if (mapBrowserEvent.type == EventType.WHEEL) {\n            delta = wheelEvent.deltaY;\n            if (FIREFOX && wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {\n                delta /= DEVICE_PIXEL_RATIO;\n            }\n            if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_LINE) {\n                delta *= 40;\n            }\n        }\n        if (delta === 0) {\n            return false;\n        }\n        else {\n            this.lastDelta_ = delta;\n        }\n        var now = Date.now();\n        if (this.startTime_ === undefined) {\n            this.startTime_ = now;\n        }\n        if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {\n            this.mode_ = Math.abs(delta) < 4 ? Mode.TRACKPAD : Mode.WHEEL;\n        }\n        var view = map.getView(
 );\n        if (this.mode_ === Mode.TRACKPAD &&\n            !(view.getConstrainResolution() || this.constrainResolution_)) {\n            if (this.trackpadTimeoutId_) {\n                clearTimeout(this.trackpadTimeoutId_);\n            }\n            else {\n                if (view.getAnimating()) {\n                    view.cancelAnimations();\n                }\n                view.beginInteraction();\n            }\n            this.trackpadTimeoutId_ = setTimeout(this.endInteraction_.bind(this), this.timeout_);\n            view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_);\n            this.startTime_ = now;\n            return false;\n        }\n        this.totalDelta_ += delta;\n        var timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n        clearTimeout(this.timeoutId_);\n        this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, map), timeLeft);\n        return false;\n    };\n    /**\n     * @private\n     * @param {impor
 t(\"../PluggableMap.js\").default} map Map.\n     */\n    MouseWheelZoom.prototype.handleWheelZoom_ = function (map) {\n        var view = map.getView();\n        if (view.getAnimating()) {\n            view.cancelAnimations();\n        }\n        var delta = -clamp(this.totalDelta_, -this.maxDelta_ * this.deltaPerZoom_, this.maxDelta_ * this.deltaPerZoom_) / this.deltaPerZoom_;\n        if (view.getConstrainResolution() || this.constrainResolution_) {\n            // view has a zoom constraint, zoom by 1\n            delta = delta ? (delta > 0 ? 1 : -1) : 0;\n        }\n        zoomByDelta(view, delta, this.lastAnchor_, this.duration_);\n        this.mode_ = undefined;\n        this.totalDelta_ = 0;\n        this.lastAnchor_ = null;\n        this.startTime_ = undefined;\n        this.timeoutId_ = undefined;\n    };\n    /**\n     * Enable or disable using the mouse's location as an anchor when zooming\n     * @param {boolean} useAnchor true to zoom to the mouse's location, false\n 
     * to zoom to the center of the map\n     * @api\n     */\n    MouseWheelZoom.prototype.setMouseAnchor = function (useAnchor) {\n        this.useAnchor_ = useAnchor;\n        if (!useAnchor) {\n            this.lastAnchor_ = null;\n        }\n    };\n    return MouseWheelZoom;\n}(Interaction));\nexport default MouseWheelZoom;\n//# sourceMappingURL=MouseWheelZoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/in
 teraction/PinchRotate\n */\nimport PointerInteraction, { centroid as centroidFromPointers, } from './Pointer.js';\nimport { FALSE } from '../functions.js';\nimport { disable } from '../rotationconstraint.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] The duration of the animation in\n * milliseconds.\n * @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.\n */\n/**\n * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */\nvar PinchRotate = /** @class */ (function (_super) {\n    __extends(PinchRotate, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function PinchRotate(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FA
 LSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        _this.anchor_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastAngle_ = undefined;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.rotating_ = false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.rotationDelta_ = 0.0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js
 \").default} mapBrowserEvent Event.\n     */\n    PinchRotate.prototype.handleDragEvent = function (mapBrowserEvent) {\n        var rotationDelta = 0.0;\n        var touch0 = this.targetPointers[0];\n        var touch1 = this.targetPointers[1];\n        // angle between touches\n        var angle = Math.atan2(touch1.clientY - touch0.clientY, touch1.clientX - touch0.clientX);\n        if (this.lastAngle_ !== undefined) {\n            var delta = angle - this.lastAngle_;\n            this.rotationDelta_ += delta;\n            if (!this.rotating_ && Math.abs(this.rotationDelta_) > this.threshold_) {\n                this.rotating_ = true;\n            }\n            rotationDelta = delta;\n        }\n        this.lastAngle_ = angle;\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (view.getConstraints().rotation === disable) {\n            return;\n        }\n        // rotate anchor point.\n        // FIXME: should be the intersection point betwee
 n the lines:\n        //     touch0,touch1 and previousTouch0,previousTouch1\n        var viewportPosition = map.getViewport().getBoundingClientRect();\n        var centroid = centroidFromPointers(this.targetPointers);\n        centroid[0] -= viewportPosition.left;\n        centroid[1] -= viewportPosition.top;\n        this.anchor_ = map.getCoordinateFromPixelInternal(centroid);\n        // rotate\n        if (this.rotating_) {\n            map.render();\n            view.adjustRotationInternal(rotationDelta, this.anchor_);\n        }\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    PinchRotate.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length < 2) {\n            var map = mapBrowserEvent.map;\n            var view = map.getView();\n            view.endInteraction(this.duration_);\n        
     return false;\n        }\n        else {\n            return true;\n        }\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    PinchRotate.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length >= 2) {\n            var map = mapBrowserEvent.map;\n            this.anchor_ = null;\n            this.lastAngle_ = undefined;\n            this.rotating_ = false;\n            this.rotationDelta_ = 0.0;\n            if (!this.handlingDownUpSequence) {\n                map.getView().beginInteraction();\n            }\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return PinchRotate;\n}(PointerInteraction));\nexport default PinchRotate;\n//# sourceMappingURL=PinchRotate.js.map","var __extends = (this && this.__extends) || (function () {\n   
  var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/PinchZoom\n */\nimport PointerInteraction, { centroid as centroidFromPointers, } from './Pointer.js';\nimport { FALSE } from '../functions.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n/**\n * @classdesc\n * Allows the user to zoom the map by pinching with two fingers\n * on a touch screen.\n * @api\n */\nvar PinchZoom = /** @class */ (function (_super) 
 {\n    __extends(PinchZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function PinchZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FALSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        _this.anchor_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 400;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastDistance_ = undefined;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.lastScaleDelta_ 
 = 1;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    PinchZoom.prototype.handleDragEvent = function (mapBrowserEvent) {\n        var scaleDelta = 1.0;\n        var touch0 = this.targetPointers[0];\n        var touch1 = this.targetPointers[1];\n        var dx = touch0.clientX - touch1.clientX;\n        var dy = touch0.clientY - touch1.clientY;\n        // distance between touches\n        var distance = Math.sqrt(dx * dx + dy * dy);\n        if (this.lastDistance_ !== undefined) {\n            scaleDelta = this.lastDistance_ / distance;\n        }\n        this.lastDistance_ = distance;\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (scaleDelta != 1.0) {\n            this.lastScaleDelta_ = scaleDelta;\n        }\n        // scale anchor point.\n        var viewportPosition = map.getViewport().getBoundingClientRect();\n     
    var centroid = centroidFromPointers(this.targetPointers);\n        centroid[0] -= viewportPosition.left;\n        centroid[1] -= viewportPosition.top;\n        this.anchor_ = map.getCoordinateFromPixelInternal(centroid);\n        // scale, bypass the resolution constraint\n        map.render();\n        view.adjustResolutionInternal(scaleDelta, this.anchor_);\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    PinchZoom.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length < 2) {\n            var map = mapBrowserEvent.map;\n            var view = map.getView();\n            var direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n            view.endInteraction(this.duration_, direction);\n            return false;\n        }\n        else {\n            return true;\n        }\n    };\n    /**\n   
   * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    PinchZoom.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length >= 2) {\n            var map = mapBrowserEvent.map;\n            this.anchor_ = null;\n            this.lastDistance_ = undefined;\n            this.lastScaleDelta_ = 1;\n            if (!this.handlingDownUpSequence) {\n                map.getView().beginInteraction();\n            }\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return PinchZoom;\n}(PointerInteraction));\nexport default PinchZoom;\n//# sourceMappingURL=PinchZoom.js.map","/**\n * @module ol/interaction\n */\nimport Collection from './Collection.js';\nimport DoubleClickZoom from './interaction/DoubleClickZoom.js';\nimport DragPan from './interaction/DragPan.js';\nimport DragRota
 te from './interaction/DragRotate.js';\nimport DragZoom from './interaction/DragZoom.js';\nimport KeyboardPan from './interaction/KeyboardPan.js';\nimport KeyboardZoom from './interaction/KeyboardZoom.js';\nimport Kinetic from './Kinetic.js';\nimport MouseWheelZoom from './interaction/MouseWheelZoom.js';\nimport PinchRotate from './interaction/PinchRotate.js';\nimport PinchZoom from './interaction/PinchZoom.js';\nexport { default as DoubleClickZoom } from './interaction/DoubleClickZoom.js';\nexport { default as DragAndDrop } from './interaction/DragAndDrop.js';\nexport { default as DragBox } from './interaction/DragBox.js';\nexport { default as DragPan } from './interaction/DragPan.js';\nexport { default as DragRotate } from './interaction/DragRotate.js';\nexport { default as DragRotateAndZoom } from './interaction/DragRotateAndZoom.js';\nexport { default as DragZoom } from './interaction/DragZoom.js';\nexport { default as Draw } from './interaction/Draw.js';\nexport { default as Ex
 tent } from './interaction/Extent.js';\nexport { default as Interaction } from './interaction/Interaction.js';\nexport { default as KeyboardPan } from './interaction/KeyboardPan.js';\nexport { default as KeyboardZoom } from './interaction/KeyboardZoom.js';\nexport { default as Modify } from './interaction/Modify.js';\nexport { default as MouseWheelZoom } from './interaction/MouseWheelZoom.js';\nexport { default as PinchRotate } from './interaction/PinchRotate.js';\nexport { default as PinchZoom } from './interaction/PinchZoom.js';\nexport { default as Pointer } from './interaction/Pointer.js';\nexport { default as Select } from './interaction/Select.js';\nexport { default as Snap } from './interaction/Snap.js';\nexport { default as Translate } from './interaction/Translate.js';\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is\n * desired.\n * @property {boolean} [onFocusOnly=false] Interact only when the ma
 p has the\n * focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is\n * useful when page scroll is desired for maps that do not have the browser's\n * focus.\n * @property {boolean} [doubleClickZoom=true] Whether double click zoom is\n * desired.\n * @property {boolean} [keyboard=true] Whether keyboard interaction is desired.\n * @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.\n * @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.\n * @property {boolean} [dragPan=true] Whether drag pan is desired.\n * @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.\n * @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.\n * @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.\n * @property {number} [zoomDuration] Duration of the zoom animation in\n * milliseconds.\n */\n/**\n * Set of interactions included in maps by default. Specific interactions 
 can be\n * excluded by setting the appropriate option to false in the constructor\n * options, but the order of the interactions is fixed.  If you want to specify\n * a different order for interactions, you will need to create your own\n * {@link module:ol/interaction/Interaction} instances and insert\n * them into a {@link module:ol/Collection} in the order you want\n * before creating your {@link module:ol/Map~Map} instance. Changing the order can\n * be of interest if the event propagation needs to be stopped at a point.\n * The default set of interactions, in sequence, is:\n * * {@link module:ol/interaction/DragRotate~DragRotate}\n * * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}\n * * {@link module:ol/interaction/DragPan~DragPan}\n * * {@link module:ol/interaction/PinchRotate~PinchRotate}\n * * {@link module:ol/interaction/PinchZoom~PinchZoom}\n * * {@link module:ol/interaction/KeyboardPan~KeyboardPan}\n * * {@link module:ol/interaction/KeyboardZoom~KeyboardZoo
 m}\n * * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}\n * * {@link module:ol/interaction/DragZoom~DragZoom}\n *\n * @param {DefaultsOptions=} opt_options Defaults options.\n * @return {import(\"./Collection.js\").default<import(\"./interaction/Interaction.js\").default>}\n * A collection of interactions to be used with the {@link module:ol/Map~Map}\n * constructor's `interactions` option.\n * @api\n */\nexport function defaults(opt_options) {\n    var options = opt_options ? opt_options : {};\n    var interactions = new Collection();\n    var kinetic = new Kinetic(-0.005, 0.05, 100);\n    var altShiftDragRotate = options.altShiftDragRotate !== undefined\n        ? options.altShiftDragRotate\n        : true;\n    if (altShiftDragRotate) {\n        interactions.push(new DragRotate());\n    }\n    var doubleClickZoom = options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;\n    if (doubleClickZoom) {\n        interactions.push(new DoubleClickZoom({\n    
         delta: options.zoomDelta,\n            duration: options.zoomDuration,\n        }));\n    }\n    var dragPan = options.dragPan !== undefined ? options.dragPan : true;\n    if (dragPan) {\n        interactions.push(new DragPan({\n            onFocusOnly: options.onFocusOnly,\n            kinetic: kinetic,\n        }));\n    }\n    var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate : true;\n    if (pinchRotate) {\n        interactions.push(new PinchRotate());\n    }\n    var pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n    if (pinchZoom) {\n        interactions.push(new PinchZoom({\n            duration: options.zoomDuration,\n        }));\n    }\n    var keyboard = options.keyboard !== undefined ? options.keyboard : true;\n    if (keyboard) {\n        interactions.push(new KeyboardPan());\n        interactions.push(new KeyboardZoom({\n            delta: options.zoomDelta,\n            duration: options.zoomDuration,\n        
 }));\n    }\n    var mouseWheelZoom = options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;\n    if (mouseWheelZoom) {\n        interactions.push(new MouseWheelZoom({\n            onFocusOnly: options.onFocusOnly,\n            duration: options.zoomDuration,\n        }));\n    }\n    var shiftDragZoom = options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;\n    if (shiftDragZoom) {\n        interactions.push(new DragZoom({\n            duration: options.zoomDuration,\n        }));\n    }\n    return interactions;\n}\n//# sourceMappingURL=interaction.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d
 , b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Map\n */\nimport CompositeMapRenderer from './renderer/Composite.js';\nimport PluggableMap from './PluggableMap.js';\nimport { assign } from './obj.js';\nimport { defaults as defaultControls } from './control.js';\nimport { defaults as defaultInteractions } from './interaction.js';\n/**\n * @classdesc\n * The map is the core component of OpenLayers. For a map to render, a view,\n * one or more layers, and a target container are needed:\n *\n *     import Map from 'ol/Map';\n *     import View from 'ol/View';\n *     import TileLayer from 'ol/layer/Tile';\n *     import OSM from 'ol/source/OSM';\n *\n *     var map = new Map({\n *       view: new View({\n *         center: [0, 0],\n *         zoom: 1\n *       }),\n *       layers: [\n *         new TileLayer({\n *       
     source: new OSM()\n *         })\n *       ],\n *       target: 'map'\n *     });\n *\n * The above snippet creates a map using a {@link module:ol/layer/Tile} to\n * display {@link module:ol/source/OSM~OSM} OSM data and render it to a DOM\n * element with the id `map`.\n *\n * The constructor places a viewport container (with CSS class name\n * `ol-viewport`) in the target element (see `getViewport()`), and then two\n * further elements within the viewport: one with CSS class name\n * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with\n * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`\n * option of {@link module:ol/Overlay~Overlay} for the difference). The map\n * itself is placed in a further element within the viewport.\n *\n * Layers are stored as a {@link module:ol/Collection~Collection} in\n * layerGroups. A top-level group is provided by the library. This is what is\n * accessed by `getLayerGroup` and `setLayerGroup`.
  Layers entered in the\n * options are added to this group, and `addLayer` and `removeLayer` change the\n * layer collection in the group. `getLayers` is a convenience function for\n * `getLayerGroup().getLayers()`. Note that {@link module:ol/layer/Group~Group}\n * is a subclass of {@link module:ol/layer/Base}, so layers entered in the\n * options or added with `addLayer` can be groups, which can contain further\n * groups, and so on.\n *\n * @api\n */\nvar Map = /** @class */ (function (_super) {\n    __extends(Map, _super);\n    /**\n     * @param {import(\"./PluggableMap.js\").MapOptions} options Map options.\n     */\n    function Map(options) {\n        var _this = this;\n        options = assign({}, options);\n        if (!options.controls) {\n            options.controls = defaultControls();\n        }\n        if (!options.interactions) {\n            options.interactions = defaultInteractions({\n                onFocusOnly: true,\n            });\n        }\n        _this =
  _super.call(this, options) || this;\n        return _this;\n    }\n    Map.prototype.createRenderer = function () {\n        return new CompositeMapRenderer(this);\n    };\n    return Map;\n}(PluggableMap));\nexport default Map;\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/OverlayPositioning\n */\n/**\n * Overlay position: `'bottom-left'`, `'bottom-center'`,  `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, `'top-right'`\n * @enum {string}\n */\nexport default {\n    BOTTOM_LEFT: 'bottom-left',\n    BOTTOM_CENTER: 'bottom-center',\n    BOTTOM_RIGHT: 'bottom-right',\n    CENTER_LEFT: 'center-left',\n    CENTER_CENTER: 'center-center',\n    CENTER_RIGHT: 'center-right',\n    TOP_LEFT: 'top-left',\n    TOP_CENTER: 'top-center',\n    TOP_RIGHT: 'top-right',\n};\n//# sourceMappingURL=OverlayPositioning.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n     
    extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Overlay\n */\nimport BaseObject, { getChangeEventType } from './Object.js';\nimport MapEventType from './MapEventType.js';\nimport OverlayPositioning from './OverlayPositioning.js';\nimport { CLASS_SELECTABLE } from './css.js';\nimport { containsExtent } from './extent.js';\nimport { listen, unlistenByKey } from './events.js';\nimport { outerHeight, outerWidth, removeChildren, removeNode } from './dom.js';\n/**\n * @typedef {Object} Options\n * @property {number|string} [id] Set the
  overlay id. The overlay id can be used\n * with the {@link module:ol/Map~Map#getOverlayById} method.\n * @property {HTMLElement} [element] The overlay element.\n * @property {Array<number>} [offset=[0, 0]] Offsets in pixels used when positioning\n * the overlay. The first element in the\n * array is the horizontal offset. A positive value shifts the overlay right.\n * The second element in the array is the vertical offset. A positive value\n * shifts the overlay down.\n * @property {import(\"./coordinate.js\").Coordinate} [position] The overlay position\n * in map projection.\n * @property {import(\"./OverlayPositioning.js\").default} [positioning='top-left'] Defines how\n * the overlay is actually positioned with respect to its `position` property.\n * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, and `'top-right'`.\n * @property {boolean} [stopEvent=true] Whethe
 r event propagation to the map\n * viewport should be stopped. If `true` the overlay is placed in the same\n * container as that of the controls (CSS class name\n * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container\n * with CSS class name specified by the `className` property.\n * @property {boolean} [insertFirst=true] Whether the overlay is inserted first\n * in the overlay container, or appended. If the overlay is placed in the same\n * container as that of the controls (see the `stopEvent` option) you will\n * probably set `insertFirst` to `true` so the overlay is displayed below the\n * controls.\n * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling\n * `setPosition`, so that the overlay is entirely visible in the current viewport?\n * If `true` (deprecated), then `autoPanAnimation` and `autoPanMargin` will be\n * used to determine the panning parameters; if an object is supplied then other\n * parameters are ignored.\n * @p
 roperty {PanOptions} [autoPanAnimation] The animation options used to pan\n * the overlay into view. This animation is only used when `autoPan` is enabled.\n * A `duration` and `easing` may be provided to customize the animation.\n * Deprecated and ignored if `autoPan` is supplied as an object.\n * @property {number} [autoPanMargin=20] The margin (in pixels) between the\n * overlay and the borders of the map when autopanning. Deprecated and ignored\n * if `autoPan` is supplied as an object.\n * @property {PanIntoViewOptions} [autoPanOptions] The options to use for the\n * autoPan. This is only used when `autoPan` is enabled and has preference over\n * the individual `autoPanMargin` and `autoPanOptions`.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\n/**\n * @typedef {Object} PanOptions\n * @property {number} [duration=1000] The duration of the animation in\n * milliseconds.\n * @property {function(number):number} [easing] The easing
  function to use. Can\n * be one from {@link module:ol/easing} or a custom function.\n * Default is {@link module:ol/easing~inAndOut}.\n */\n/**\n * @typedef {Object} PanIntoViewOptions\n * @property {PanOptions} [animation={}] The animation parameters for the pan\n * @property {number} [margin=20] The margin (in pixels) between the\n * overlay and the borders of the map when panning into view.\n */\n/**\n * @enum {string}\n * @protected\n */\nvar Property = {\n    ELEMENT: 'element',\n    MAP: 'map',\n    OFFSET: 'offset',\n    POSITION: 'position',\n    POSITIONING: 'positioning',\n};\n/**\n * @classdesc\n * An element to be displayed over the map and attached to a single map\n * location.  Like {@link module:ol/control/Control~Control}, Overlays are\n * visible widgets. Unlike Controls, they are not in a fixed position on the\n * screen, but are tied to a geographical coordinate, so panning the map will\n * move an Overlay but not a Control.\n *\n * Example:\n *\n *     import Ov
 erlay from 'ol/Overlay';\n *\n *     var popup = new Overlay({\n *       element: document.getElementById('popup')\n *     });\n *     popup.setPosition(coordinate);\n *     map.addOverlay(popup);\n *\n * @api\n */\nvar Overlay = /** @class */ (function (_super) {\n    __extends(Overlay, _super);\n    /**\n     * @param {Options} options Overlay options.\n     */\n    function Overlay(options) {\n        var _this = _super.call(this) || this;\n        /**\n         * @protected\n         * @type {Options}\n         */\n        _this.options = options;\n        /**\n         * @protected\n         * @type {number|string|undefined}\n         */\n        _this.id = options.id;\n        /**\n         * @protected\n         * @type {boolean}\n         */\n        _this.insertFirst =\n            options.insertFirst !== undefined ? options.insertFirst : true;\n        /**\n         * @protected\n         * @type {boolean}\n         */\n        _this.stopEvent = options.stopEvent !== undef
 ined ? options.stopEvent : true;\n        /**\n         * @protected\n         * @type {HTMLElement}\n         */\n        _this.element = document.createElement('div');\n        _this.element.className =\n            options.className !== undefined\n                ? options.className\n                : 'ol-overlay-container ' + CLASS_SELECTABLE;\n        _this.element.style.position = 'absolute';\n        _this.element.style.pointerEvents = 'auto';\n        var autoPan = options.autoPan;\n        if (autoPan && 'object' !== typeof autoPan) {\n            autoPan = {\n                animation: options.autoPanAnimation,\n                margin: options.autoPanMargin,\n            };\n        }\n        /**\n         * @protected\n         * @type {PanIntoViewOptions|false}\n         */\n        _this.autoPan = /** @type {PanIntoViewOptions} */ (autoPan) || false;\n        /**\n         * @protected\n         * @type {{transform_: string,\n         *         visible: boolean}}\n    
      */\n        _this.rendered = {\n            transform_: '',\n            visible: true,\n        };\n        /**\n         * @protected\n         * @type {?import(\"./events.js\").EventsKey}\n         */\n        _this.mapPostrenderListenerKey = null;\n        _this.addEventListener(getChangeEventType(Property.ELEMENT), _this.handleElementChanged);\n        _this.addEventListener(getChangeEventType(Property.MAP), _this.handleMapChanged);\n        _this.addEventListener(getChangeEventType(Property.OFFSET), _this.handleOffsetChanged);\n        _this.addEventListener(getChangeEventType(Property.POSITION), _this.handlePositionChanged);\n        _this.addEventListener(getChangeEventType(Property.POSITIONING), _this.handlePositioningChanged);\n        if (options.element !== undefined) {\n            _this.setElement(options.element);\n        }\n        _this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);\n        _this.setPositioning(options.positioning !== unde
 fined\n            ? /** @type {import(\"./OverlayPositioning.js\").default} */ (options.positioning)\n            : OverlayPositioning.TOP_LEFT);\n        if (options.position !== undefined) {\n            _this.setPosition(options.position);\n        }\n        return _this;\n    }\n    /**\n     * Get the DOM element of this overlay.\n     * @return {HTMLElement|undefined} The Element containing the overlay.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getElement = function () {\n        return /** @type {HTMLElement|undefined} */ (this.get(Property.ELEMENT));\n    };\n    /**\n     * Get the overlay identifier which is set on constructor.\n     * @return {number|string|undefined} Id.\n     * @api\n     */\n    Overlay.prototype.getId = function () {\n        return this.id;\n    };\n    /**\n     * Get the map associated with this overlay.\n     * @return {import(\"./PluggableMap.js\").default|undefined} The map that the\n     * overlay is part of.\n     * @o
 bservable\n     * @api\n     */\n    Overlay.prototype.getMap = function () {\n        return /** @type {import(\"./PluggableMap.js\").default|undefined} */ (this.get(Property.MAP));\n    };\n    /**\n     * Get the offset of this overlay.\n     * @return {Array<number>} The offset.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getOffset = function () {\n        return /** @type {Array<number>} */ (this.get(Property.OFFSET));\n    };\n    /**\n     * Get the current position of this overlay.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} The spatial point that the overlay is\n     *     anchored at.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getPosition = function () {\n        return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(Property.POSITION));\n    };\n    /**\n     * Get the current positioning of this overlay.\n     * @return {import(\"./OverlayPositioning.js\").default} How the overlay
  is positioned\n     *     relative to its point on the map.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getPositioning = function () {\n        return /** @type {import(\"./OverlayPositioning.js\").default} */ (this.get(Property.POSITIONING));\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handleElementChanged = function () {\n        removeChildren(this.element);\n        var element = this.getElement();\n        if (element) {\n            this.element.appendChild(element);\n        }\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handleMapChanged = function () {\n        if (this.mapPostrenderListenerKey) {\n            removeNode(this.element);\n            unlistenByKey(this.mapPostrenderListenerKey);\n            this.mapPostrenderListenerKey = null;\n        }\n        var map = this.getMap();\n        if (map) {\n            this.mapPostrenderListenerKey = listen(map, MapEventType.POSTRENDER, this.render, this);
 \n            this.updatePixelPosition();\n            var container = this.stopEvent\n                ? map.getOverlayContainerStopEvent()\n                : map.getOverlayContainer();\n            if (this.insertFirst) {\n                container.insertBefore(this.element, container.childNodes[0] || null);\n            }\n            else {\n                container.appendChild(this.element);\n            }\n            this.performAutoPan();\n        }\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.render = function () {\n        this.updatePixelPosition();\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handleOffsetChanged = function () {\n        this.updatePixelPosition();\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handlePositionChanged = function () {\n        this.updatePixelPosition();\n        this.performAutoPan();\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handlePositioningChange
 d = function () {\n        this.updatePixelPosition();\n    };\n    /**\n     * Set the DOM element to be associated with this overlay.\n     * @param {HTMLElement|undefined} element The Element containing the overlay.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setElement = function (element) {\n        this.set(Property.ELEMENT, element);\n    };\n    /**\n     * Set the map to be associated with this overlay.\n     * @param {import(\"./PluggableMap.js\").default|undefined} map The map that the\n     * overlay is part of.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setMap = function (map) {\n        this.set(Property.MAP, map);\n    };\n    /**\n     * Set the offset for this overlay.\n     * @param {Array<number>} offset Offset.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setOffset = function (offset) {\n        this.set(Property.OFFSET, offset);\n    };\n    /**\n     * Set the position for this overlay. If the posit
 ion is `undefined` the\n     * overlay is hidden.\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} position The spatial point that the overlay\n     *     is anchored at.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setPosition = function (position) {\n        this.set(Property.POSITION, position);\n    };\n    /**\n     * Pan the map so that the overlay is entirely visisble in the current viewport\n     * (if necessary) using the configured autoPan parameters\n     * @protected\n     */\n    Overlay.prototype.performAutoPan = function () {\n        if (this.autoPan) {\n            this.panIntoView(this.autoPan);\n        }\n    };\n    /**\n     * Pan the map so that the overlay is entirely visible in the current viewport\n     * (if necessary).\n     * @param {PanIntoViewOptions=} opt_panIntoViewOptions Options for the pan action\n     * @api\n     */\n    Overlay.prototype.panIntoView = function (opt_panIntoViewOptions) {\n        var map = th
 is.getMap();\n        if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {\n            return;\n        }\n        var mapRect = this.getRect(map.getTargetElement(), map.getSize());\n        var element = this.getElement();\n        var overlayRect = this.getRect(element, [\n            outerWidth(element),\n            outerHeight(element),\n        ]);\n        var panIntoViewOptions = opt_panIntoViewOptions || {};\n        var myMargin = panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin;\n        if (!containsExtent(mapRect, overlayRect)) {\n            // the overlay is not completely inside the viewport, so pan the map\n            var offsetLeft = overlayRect[0] - mapRect[0];\n            var offsetRight = mapRect[2] - overlayRect[2];\n            var offsetTop = overlayRect[1] - mapRect[1];\n            var offsetBottom = mapRect[3] - overlayRect[3];\n            var delta = [0, 0];\n            if (offsetLeft < 0) {\n                
 // move map to the left\n                delta[0] = offsetLeft - myMargin;\n            }\n            else if (offsetRight < 0) {\n                // move map to the right\n                delta[0] = Math.abs(offsetRight) + myMargin;\n            }\n            if (offsetTop < 0) {\n                // move map up\n                delta[1] = offsetTop - myMargin;\n            }\n            else if (offsetBottom < 0) {\n                // move map down\n                delta[1] = Math.abs(offsetBottom) + myMargin;\n            }\n            if (delta[0] !== 0 || delta[1] !== 0) {\n                var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (map\n                    .getView()\n                    .getCenterInternal());\n                var centerPx = map.getPixelFromCoordinateInternal(center);\n                var newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];\n                var panOptions = panIntoViewOptions.animation || {};\n            
     map.getView().animateInternal({\n                    center: map.getCoordinateFromPixelInternal(newCenterPx),\n                    duration: panOptions.duration,\n                    easing: panOptions.easing,\n                });\n            }\n        }\n    };\n    /**\n     * Get the extent of an element relative to the document\n     * @param {HTMLElement} element The element.\n     * @param {import(\"./size.js\").Size} size The size of the element.\n     * @return {import(\"./extent.js\").Extent} The extent.\n     * @protected\n     */\n    Overlay.prototype.getRect = function (element, size) {\n        var box = element.getBoundingClientRect();\n        var offsetX = box.left + window.pageXOffset;\n        var offsetY = box.top + window.pageYOffset;\n        return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]];\n    };\n    /**\n     * Set the positioning for this overlay.\n     * @param {import(\"./OverlayPositioning.js\").default} positioning how the overlay
  is\n     *     positioned relative to its point on the map.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setPositioning = function (positioning) {\n        this.set(Property.POSITIONING, positioning);\n    };\n    /**\n     * Modify the visibility of the element.\n     * @param {boolean} visible Element visibility.\n     * @protected\n     */\n    Overlay.prototype.setVisible = function (visible) {\n        if (this.rendered.visible !== visible) {\n            this.element.style.display = visible ? '' : 'none';\n            this.rendered.visible = visible;\n        }\n    };\n    /**\n     * Update pixel position.\n     * @protected\n     */\n    Overlay.prototype.updatePixelPosition = function () {\n        var map = this.getMap();\n        var position = this.getPosition();\n        if (!map || !map.isRendered() || !position) {\n            this.setVisible(false);\n            return;\n        }\n        var pixel = map.getPixelFromCoordinate(position);\n     
    var mapSize = map.getSize();\n        this.updateRenderedPosition(pixel, mapSize);\n    };\n    /**\n     * @param {import(\"./pixel.js\").Pixel} pixel The pixel location.\n     * @param {import(\"./size.js\").Size|undefined} mapSize The map size.\n     * @protected\n     */\n    Overlay.prototype.updateRenderedPosition = function (pixel, mapSize) {\n        var style = this.element.style;\n        var offset = this.getOffset();\n        var positioning = this.getPositioning();\n        this.setVisible(true);\n        var x = Math.round(pixel[0] + offset[0]) + 'px';\n        var y = Math.round(pixel[1] + offset[1]) + 'px';\n        var posX = '0%';\n        var posY = '0%';\n        if (positioning == OverlayPositioning.BOTTOM_RIGHT ||\n            positioning == OverlayPositioning.CENTER_RIGHT ||\n            positioning == OverlayPositioning.TOP_RIGHT) {\n            posX = '-100%';\n        }\n        else if (positioning == OverlayPositioning.BOTTOM_CENTER ||\n            pos
 itioning == OverlayPositioning.CENTER_CENTER ||\n            positioning == OverlayPositioning.TOP_CENTER) {\n            posX = '-50%';\n        }\n        if (positioning == OverlayPositioning.BOTTOM_LEFT ||\n            positioning == OverlayPositioning.BOTTOM_CENTER ||\n            positioning == OverlayPositioning.BOTTOM_RIGHT) {\n            posY = '-100%';\n        }\n        else if (positioning == OverlayPositioning.CENTER_LEFT ||\n            positioning == OverlayPositioning.CENTER_CENTER ||\n            positioning == OverlayPositioning.CENTER_RIGHT) {\n            posY = '-50%';\n        }\n        var transform = \"translate(\" + posX + \", \" + posY + \") translate(\" + x + \", \" + y + \")\";\n        if (this.rendered.transform_ != transform) {\n            this.rendered.transform_ = transform;\n            style.transform = transform;\n            // @ts-ignore IE9\n            style.msTransform = transform;\n        }\n    };\n    /**\n     * returns the options t
 his Overlay has been created with\n     * @return {Options} overlay options\n     */\n    Overlay.prototype.getOptions = function () {\n        return this.options;\n    };\n    return Overlay;\n}(BaseObject));\nexport default Overlay;\n//# sourceMappingURL=Overlay.js.map","/**\n * @module ol/format/FormatType\n */\n/**\n * @enum {string}\n */\nexport default {\n    ARRAY_BUFFER: 'arraybuffer',\n    JSON: 'json',\n    TEXT: 'text',\n    XML: 'xml',\n};\n//# sourceMappingURL=FormatType.js.map","/**\n * @module ol/featureloader\n */\nimport FormatType from './format/FormatType.js';\nimport { VOID } from './functions.js';\n/**\n *\n * @type {boolean}\n * @private\n */\nvar withCredentials = false;\n/**\n * {@link module:ol/source/Vector} sources use a function of this type to\n * load features.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area to be loaded,\n * a `{number}` representing the resolution (map units per pixel) and an\n * {@link module:ol/
 proj/Projection} for the projection  as\n * arguments. `this` within the function is bound to the\n * {@link module:ol/source/Vector} it's called from.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n * @typedef {function(this:(import(\"./source/Vector\").default|import(\"./VectorTile.js\").default), import(\"./extent.js\").Extent, number,\n *                    import(\"./proj/Projection.js\").default): void} FeatureLoader\n * @api\n */\n/**\n * {@link module:ol/source/Vector} sources use a function of this type to\n * get the url to load features from.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area\n * to be loaded, a `{number}` representing the resolution (map units per pixel)\n * and an {@link module:ol/proj/Projection} for the projection  as\n * arguments and returns a `{string}` representing the URL.\n * @typedef {function(import(\"./extent.js\").Extent, number, import(\"./proj/Projection.js
 \").default): string} FeatureUrlFunction\n * @api\n */\n/**\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {function(this:import(\"./VectorTile.js\").default, Array<import(\"./Feature.js\").default>, import(\"./proj/Projection.js\").default, import(\"./extent.js\").Extent): void|function(this:import(\"./source/Vector\").default, Array<import(\"./Feature.js\").default>): void} success\n *     Function called with the loaded features and optionally with the data\n *     projection. Called with the vector tile or source as `this`.\n * @param {function(this:import(\"./VectorTile.js\").default): void|function(this:import(\"./source/Vector\").default): void} failure\n *     Function called when loading failed. Called with the vector tile or\n *     source as `this`.\n * @return {FeatureLoader} The feature loader.\n */\nexport function loadFeaturesXhr(url, format, success, failure) {\n  
   return (\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @this {import(\"./source/Vector\").default|import(\"./VectorTile.js\").default}\n     */\n    function (extent, resolution, projection) {\n        var xhr = new XMLHttpRequest();\n        xhr.open('GET', typeof url === 'function' ? url(extent, resolution, projection) : url, true);\n        if (format.getType() == FormatType.ARRAY_BUFFER) {\n            xhr.responseType = 'arraybuffer';\n        }\n        xhr.withCredentials = withCredentials;\n        /**\n         * @param {Event} event Event.\n         * @private\n         */\n        xhr.onload = function (event) {\n            // status will be 0 for file:// urls\n            if (!xhr.status || (xhr.status >= 200 && xhr.status < 300)) {\n                var type = format.getType();\n                /** @type {Doc
 ument|Node|Object|string|undefined} */\n                var source = void 0;\n                if (type == FormatType.JSON || type == FormatType.TEXT) {\n                    source = xhr.responseText;\n                }\n                else if (type == FormatType.XML) {\n                    source = xhr.responseXML;\n                    if (!source) {\n                        source = new DOMParser().parseFromString(xhr.responseText, 'application/xml');\n                    }\n                }\n                else if (type == FormatType.ARRAY_BUFFER) {\n                    source = /** @type {ArrayBuffer} */ (xhr.response);\n                }\n                if (source) {\n                    success.call(this, format.readFeatures(source, {\n                        extent: extent,\n                        featureProjection: projection,\n                    }), format.readProjection(source));\n                }\n                else {\n                    failure.call(this);\n    
             }\n            }\n            else {\n                failure.call(this);\n            }\n        }.bind(this);\n        /**\n         * @private\n         */\n        xhr.onerror = function () {\n            failure.call(this);\n        }.bind(this);\n        xhr.send();\n    });\n}\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @return {FeatureLoader} The feature loader.\n * @api\n */\nexport function xhr(url, format) {\n    return loadFeaturesXhr(url, format, \n    /**\n     * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n     * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n     * projection.\n     * @this {import(\"./source/Vector\").default|
 import(\"./VectorTile.js\").default}\n     */\n    function (features, dataProjection) {\n        var sourceOrTile = /** @type {?} */ (this);\n        if (typeof sourceOrTile.addFeatures === 'function') {\n            /** @type {import(\"./source/Vector\").default} */ (sourceOrTile).addFeatures(features);\n        }\n    }, \n    /* FIXME handle error */ VOID);\n}\n/**\n * Setter for the withCredentials configuration for the XHR.\n *\n * @param {boolean} xhrWithCredentials The value of withCredentials to set.\n * Compare https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/\n * @api\n */\nexport function setWithCredentials(xhrWithCredentials) {\n    withCredentials = xhrWithCredentials;\n}\n//# sourceMappingURL=featureloader.js.map","/**\n * @module ol/loadingstrategy\n */\n/**\n * Strategy function for loading all features with a single request.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import
 (\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function all(extent, resolution) {\n    return [[-Infinity, -Infinity, Infinity, Infinity]];\n}\n/**\n * Strategy function for loading features based on the view's extent and\n * resolution.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function bbox(extent, resolution) {\n    return [extent];\n}\n/**\n * Creates a strategy function for loading features based on a tile grid.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {function(import(\"./extent.js\").Extent, number): Array<import(\"./extent.js\").Extent>} Loading strategy.\n * @api\n */\nexport function tile(tileGrid) {\n    return (\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @return {Array<import(\"./extent.js\"
 ).Extent>} Extents.\n     */\n    function (extent, resolution) {\n        var z = tileGrid.getZForResolution(resolution);\n        var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n        /** @type {Array<import(\"./extent.js\").Extent>} */\n        var extents = [];\n        /** @type {import(\"./tilecoord.js\").TileCoord} */\n        var tileCoord = [z, 0, 0];\n        for (tileCoord[1] = tileRange.minX; tileCoord[1] <= tileRange.maxX; ++tileCoord[1]) {\n            for (tileCoord[2] = tileRange.minY; tileCoord[2] <= tileRange.maxY; ++tileCoord[2]) {\n                extents.push(tileGrid.getTileCoordExtent(tileCoord));\n            }\n        }\n        return extents;\n    });\n}\n//# sourceMappingURL=loadingstrategy.js.map","/**\n * @module ol/TileRange\n */\n/**\n * A representation of a contiguous block of tiles.  A tile range is specified\n * by its min/max tile coordinates and is inclusive of coordinates.\n */\nvar TileRange = /** @class */ (function () {\n 
    /**\n     * @param {number} minX Minimum X.\n     * @param {number} maxX Maximum X.\n     * @param {number} minY Minimum Y.\n     * @param {number} maxY Maximum Y.\n     */\n    function TileRange(minX, maxX, minY, maxY) {\n        /**\n         * @type {number}\n         */\n        this.minX = minX;\n        /**\n         * @type {number}\n         */\n        this.maxX = maxX;\n        /**\n         * @type {number}\n         */\n        this.minY = minY;\n        /**\n         * @type {number}\n         */\n        this.maxY = maxY;\n    }\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @return {boolean} Contains tile coordinate.\n     */\n    TileRange.prototype.contains = function (tileCoord) {\n        return this.containsXY(tileCoord[1], tileCoord[2]);\n    };\n    /**\n     * @param {TileRange} tileRange Tile range.\n     * @return {boolean} Contains.\n     */\n    TileRange.prototype.containsTileRange = function (tileRan
 ge) {\n        return (this.minX <= tileRange.minX &&\n            tileRange.maxX <= this.maxX &&\n            this.minY <= tileRange.minY &&\n            tileRange.maxY <= this.maxY);\n    };\n    /**\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @return {boolean} Contains coordinate.\n     */\n    TileRange.prototype.containsXY = function (x, y) {\n        return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n    };\n    /**\n     * @param {TileRange} tileRange Tile range.\n     * @return {boolean} Equals.\n     */\n    TileRange.prototype.equals = function (tileRange) {\n        return (this.minX == tileRange.minX &&\n            this.minY == tileRange.minY &&\n            this.maxX == tileRange.maxX &&\n            this.maxY == tileRange.maxY);\n    };\n    /**\n     * @param {TileRange} tileRange Tile range.\n     */\n    TileRange.prototype.extend = function (tileRange) {\n        if (tileRange.minX < 
 this.minX) {\n            this.minX = tileRange.minX;\n        }\n        if (tileRange.maxX > this.maxX) {\n            this.maxX = tileRange.maxX;\n        }\n        if (tileRange.minY < this.minY) {\n            this.minY = tileRange.minY;\n        }\n        if (tileRange.maxY > this.maxY) {\n            this.maxY = tileRange.maxY;\n        }\n    };\n    /**\n     * @return {number} Height.\n     */\n    TileRange.prototype.getHeight = function () {\n        return this.maxY - this.minY + 1;\n    };\n    /**\n     * @return {import(\"./size.js\").Size} Size.\n     */\n    TileRange.prototype.getSize = function () {\n        return [this.getWidth(), this.getHeight()];\n    };\n    /**\n     * @return {number} Width.\n     */\n    TileRange.prototype.getWidth = function () {\n        return this.maxX - this.minX + 1;\n    };\n    /**\n     * @param {TileRange} tileRange Tile range.\n     * @return {boolean} Intersects.\n     */\n    TileRange.prototype.intersects = function (til
 eRange) {\n        return (this.minX <= tileRange.maxX &&\n            this.maxX >= tileRange.minX &&\n            this.minY <= tileRange.maxY &&\n            this.maxY >= tileRange.minY);\n    };\n    return TileRange;\n}());\n/**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n * @param {TileRange=} tileRange TileRange.\n * @return {TileRange} Tile range.\n */\nexport function createOrUpdate(minX, maxX, minY, maxY, tileRange) {\n    if (tileRange !== undefined) {\n        tileRange.minX = minX;\n        tileRange.maxX = maxX;\n        tileRange.minY = minY;\n        tileRange.maxY = maxY;\n        return tileRange;\n    }\n    else {\n        return new TileRange(minX, maxX, minY, maxY);\n    }\n}\nexport default TileRange;\n//# sourceMappingURL=TileRange.js.map","/**\n * @module ol/tilecoord\n */\n/**\n * An array of three numbers representing the location of a tile in a tile\n * grid
 . The order is `z` (zoom level), `x` (column), and `y` (row).\n * @typedef {Array<number>} TileCoord\n * @api\n */\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {TileCoord=} opt_tileCoord Tile coordinate.\n * @return {TileCoord} Tile coordinate.\n */\nexport function createOrUpdate(z, x, y, opt_tileCoord) {\n    if (opt_tileCoord !== undefined) {\n        opt_tileCoord[0] = z;\n        opt_tileCoord[1] = x;\n        opt_tileCoord[2] = y;\n        return opt_tileCoord;\n    }\n    else {\n        return [z, x, y];\n    }\n}\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {string} Key.\n */\nexport function getKeyZXY(z, x, y) {\n    return z + '/' + x + '/' + y;\n}\n/**\n * Get the key for a tile coord.\n * @param {TileCoord} tileCoord The tile coord.\n * @return {string} Key.\n */\nexport function getKey(tileCoord) {\n    return getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\n/**\n * Get
  a tile coord given a key.\n * @param {string} key The tile coord key.\n * @return {TileCoord} The tile coord.\n */\nexport function fromKey(key) {\n    return key.split('/').map(Number);\n}\n/**\n * @param {TileCoord} tileCoord Tile coord.\n * @return {number} Hash.\n */\nexport function hash(tileCoord) {\n    return (tileCoord[1] << tileCoord[0]) + tileCoord[2];\n}\n/**\n * @param {TileCoord} tileCoord Tile coordinate.\n * @param {!import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {boolean} Tile coordinate is within extent and zoom level range.\n */\nexport function withinExtentAndZ(tileCoord, tileGrid) {\n    var z = tileCoord[0];\n    var x = tileCoord[1];\n    var y = tileCoord[2];\n    if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {\n        return false;\n    }\n    var extent = tileGrid.getExtent();\n    var tileRange;\n    if (!extent) {\n        tileRange = tileGrid.getFullTileRange(z);\n    }\n    else {\n        tileRange = tileGri
 d.getTileRangeForExtentAndZ(extent, z);\n    }\n    if (!tileRange) {\n        return true;\n    }\n    else {\n        return tileRange.containsXY(x, y);\n    }\n}\n//# sourceMappingURL=tilecoord.js.map","/**\n * @module ol/tilegrid/TileGrid\n */\nimport TileRange, { createOrUpdate as createOrUpdateTileRange, } from '../TileRange.js';\nimport { DEFAULT_TILE_SIZE } from './common.js';\nimport { assert } from '../asserts.js';\nimport { clamp } from '../math.js';\nimport { createOrUpdate, getTopLeft } from '../extent.js';\nimport { createOrUpdate as createOrUpdateTileCoord } from '../tilecoord.js';\nimport { isSorted, linearFindNearest } from '../array.js';\nimport { toSize } from '../size.js';\n/**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\nvar tmpTileCoord = [0, 0, 0];\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles outside this\n * extent will be requested by {@link module:ol/so
 urce/Tile} sources. When no `origin` or\n * `origins` are configured, the `origin` will be set to the top-left corner of the extent.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e. where the `x`\n * and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and downwards. If not\n * specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins, i.e. where\n * the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * origin. Tile coordinates increase left to right and downwards. If not specified, `extent` or\n * `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each resolution needs\n * to match the zoom level. This me
 ans that even if a `minZoom` is configured, the resolutions\n * array will have a length of `maxZoom + 1`.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. If specified the values\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent\n * for which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Default is `[256, 256]`.\n * @property {Array<import(\"../size.js\").Size>} [tileSizes] Tile sizes. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * tile size.\n */\n/**\n * @classdesc\
 n * Base class for setting the grid pattern for sources accessing tiled-image\n * servers.\n * @api\n */\nvar TileGrid = /** @class */ (function () {\n    /**\n     * @param {Options} options Tile grid options.\n     */\n    function TileGrid(options) {\n        /**\n         * @protected\n         * @type {number}\n         */\n        this.minZoom = options.minZoom !== undefined ? options.minZoom : 0;\n        /**\n         * @private\n         * @type {!Array<number>}\n         */\n        this.resolutions_ = options.resolutions;\n        assert(isSorted(this.resolutions_, function (a, b) {\n            return b - a;\n        }, true), 17); // `resolutions` must be sorted in descending order\n        // check if we've got a consistent zoom factor and origin\n        var zoomFactor;\n        if (!options.origins) {\n            for (var i = 0, ii = this.resolutions_.length - 1; i < ii; ++i) {\n                if (!zoomFactor) {\n                    zoomFactor = this.resolutions_[i
 ] / this.resolutions_[i + 1];\n                }\n                else {\n                    if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {\n                        zoomFactor = undefined;\n                        break;\n                    }\n                }\n            }\n        }\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.zoomFactor_ = zoomFactor;\n        /**\n         * @protected\n         * @type {number}\n         */\n        this.maxZoom = this.resolutions_.length - 1;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        this.origin_ = options.origin !== undefined ? options.origin : null;\n        /**\n         * @private\n         * @type {Array<import(\"../coordinate.js\").Coordinate>}\n         */\n        this.origins_ = null;\n        if (options.origins !== undefined) {\n            this.origins_ = options.origins;\n       
      assert(this.origins_.length == this.resolutions_.length, 20); // Number of `origins` and `resolutions` must be equal\n        }\n        var extent = options.extent;\n        if (extent !== undefined && !this.origin_ && !this.origins_) {\n            this.origin_ = getTopLeft(extent);\n        }\n        assert((!this.origin_ && this.origins_) || (this.origin_ && !this.origins_), 18); // Either `origin` or `origins` must be configured, never both\n        /**\n         * @private\n         * @type {Array<number|import(\"../size.js\").Size>}\n         */\n        this.tileSizes_ = null;\n        if (options.tileSizes !== undefined) {\n            this.tileSizes_ = options.tileSizes;\n            assert(this.tileSizes_.length == this.resolutions_.length, 19); // Number of `tileSizes` and `resolutions` must be equal\n        }\n        /**\n         * @private\n         * @type {number|import(\"../size.js\").Size}\n         */\n        this.tileSize_ =\n            options.tileSiz
 e !== undefined\n                ? options.tileSize\n                : !this.tileSizes_\n                    ? DEFAULT_TILE_SIZE\n                    : null;\n        assert((!this.tileSize_ && this.tileSizes_) ||\n            (this.tileSize_ && !this.tileSizes_), 22); // Either `tileSize` or `tileSizes` must be configured, never both\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        this.extent_ = extent !== undefined ? extent : null;\n        /**\n         * @private\n         * @type {Array<import(\"../TileRange.js\").default>}\n         */\n        this.fullTileRanges_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        this.tmpSize_ = [0, 0];\n        if (options.sizes !== undefined) {\n            this.fullTileRanges_ = options.sizes.map(function (size, z) {\n                var tileRange = new TileRange(Math.min(0, size[0]), Math.max(size[0] - 1, -1), Math.min
 (0, size[1]), Math.max(size[1] - 1, -1));\n                return tileRange;\n            }, this);\n        }\n        else if (extent) {\n            this.calculateTileRanges_(extent);\n        }\n    }\n    /**\n     * Call a function with each tile coordinate for a given extent and zoom level.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} zoom Integer zoom level.\n     * @param {function(import(\"../tilecoord.js\").TileCoord): void} callback Function called with each tile coordinate.\n     * @api\n     */\n    TileGrid.prototype.forEachTileCoord = function (extent, zoom, callback) {\n        var tileRange = this.getTileRangeForExtentAndZ(extent, zoom);\n        for (var i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {\n            for (var j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {\n                callback([zoom, i, j]);\n            }\n        }\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").
 TileCoord} tileCoord Tile coordinate.\n     * @param {function(number, import(\"../TileRange.js\").default): boolean} callback Callback.\n     * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary import(\"../TileRange.js\").default object.\n     * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n     * @return {boolean} Callback succeeded.\n     */\n    TileGrid.prototype.forEachTileCoordParentTileRange = function (tileCoord, callback, opt_tileRange, opt_extent) {\n        var tileRange, x, y;\n        var tileCoordExtent = null;\n        var z = tileCoord[0] - 1;\n        if (this.zoomFactor_ === 2) {\n            x = tileCoord[1];\n            y = tileCoord[2];\n        }\n        else {\n            tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);\n        }\n        while (z >= this.minZoom) {\n            if (this.zoomFactor_ === 2) {\n                x = Math.floor(x / 2);\n             
    y = Math.floor(y / 2);\n                tileRange = createOrUpdateTileRange(x, x, y, y, opt_tileRange);\n            }\n            else {\n                tileRange = this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange);\n            }\n            if (callback(z, tileRange)) {\n                return true;\n            }\n            --z;\n        }\n        return false;\n    };\n    /**\n     * Get the extent for this tile grid, if it was configured.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    TileGrid.prototype.getExtent = function () {\n        return this.extent_;\n    };\n    /**\n     * Get the maximum zoom level for the grid.\n     * @return {number} Max zoom.\n     * @api\n     */\n    TileGrid.prototype.getMaxZoom = function () {\n        return this.maxZoom;\n    };\n    /**\n     * Get the minimum zoom level for the grid.\n     * @return {number} Min zoom.\n     * @api\n     */\n    TileGrid.prototype.getMinZoom 
 = function () {\n        return this.minZoom;\n    };\n    /**\n     * Get the origin for the grid at the given zoom level.\n     * @param {number} z Integer zoom level.\n     * @return {import(\"../coordinate.js\").Coordinate} Origin.\n     * @api\n     */\n    TileGrid.prototype.getOrigin = function (z) {\n        if (this.origin_) {\n            return this.origin_;\n        }\n        else {\n            return this.origins_[z];\n        }\n    };\n    /**\n     * Get the resolution for the given zoom level.\n     * @param {number} z Integer zoom level.\n     * @return {number} Resolution.\n     * @api\n     */\n    TileGrid.prototype.getResolution = function (z) {\n        return this.resolutions_[z];\n    };\n    /**\n     * Get the list of resolutions for the tile grid.\n     * @return {Array<number>} Resolutions.\n     * @api\n     */\n    TileGrid.prototype.getResolutions = function () {\n        return this.resolutions_;\n    };\n    /**\n     * @param {import(\"../tilecoo
 rd.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary import(\"../TileRange.js\").default object.\n     * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n     * @return {import(\"../TileRange.js\").default} Tile range.\n     */\n    TileGrid.prototype.getTileCoordChildTileRange = function (tileCoord, opt_tileRange, opt_extent) {\n        if (tileCoord[0] < this.maxZoom) {\n            if (this.zoomFactor_ === 2) {\n                var minX = tileCoord[1] * 2;\n                var minY = tileCoord[2] * 2;\n                return createOrUpdateTileRange(minX, minX + 1, minY, minY + 1, opt_tileRange);\n            }\n            var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);\n            return this.getTileRangeForExtentAndZ(tileCoordExtent, tileCoord[0] + 1, opt_tileRange);\n        }\n        return null;\n    };\n    /**\n     * Get th
 e extent for a tile range.\n     * @param {number} z Integer zoom level.\n     * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n     * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     */\n    TileGrid.prototype.getTileRangeExtent = function (z, tileRange, opt_extent) {\n        var origin = this.getOrigin(z);\n        var resolution = this.getResolution(z);\n        var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n        var minX = origin[0] + tileRange.minX * tileSize[0] * resolution;\n        var maxX = origin[0] + (tileRange.maxX + 1) * tileSize[0] * resolution;\n        var minY = origin[1] + tileRange.minY * tileSize[1] * resolution;\n        var maxY = origin[1] + (tileRange.maxY + 1) * tileSize[1] * resolution;\n        return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n    };\n    /**\n     * Get a tile range for the 
 given extent and integer zoom level.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} z Integer zoom level.\n     * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary tile range object.\n     * @return {import(\"../TileRange.js\").default} Tile range.\n     */\n    TileGrid.prototype.getTileRangeForExtentAndZ = function (extent, z, opt_tileRange) {\n        var tileCoord = tmpTileCoord;\n        this.getTileCoordForXYAndZ_(extent[0], extent[3], z, false, tileCoord);\n        var minX = tileCoord[1];\n        var minY = tileCoord[2];\n        this.getTileCoordForXYAndZ_(extent[2], extent[1], z, true, tileCoord);\n        return createOrUpdateTileRange(minX, tileCoord[1], minY, tileCoord[2], opt_tileRange);\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @return {import(\"../coordinate.js\").Coordinate} Tile center.\n     */\n    TileGrid.prototype.getTileCoordCenter = 
 function (tileCoord) {\n        var origin = this.getOrigin(tileCoord[0]);\n        var resolution = this.getResolution(tileCoord[0]);\n        var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n        return [\n            origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,\n            origin[1] - (tileCoord[2] + 0.5) * tileSize[1] * resolution,\n        ];\n    };\n    /**\n     * Get the extent of a tile coordinate.\n     *\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../extent.js\").Extent=} opt_extent Temporary extent object.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    TileGrid.prototype.getTileCoordExtent = function (tileCoord, opt_extent) {\n        var origin = this.getOrigin(tileCoord[0]);\n        var resolution = this.getResolution(tileCoord[0]);\n        var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n        var min
 X = origin[0] + tileCoord[1] * tileSize[0] * resolution;\n        var minY = origin[1] - (tileCoord[2] + 1) * tileSize[1] * resolution;\n        var maxX = minX + tileSize[0] * resolution;\n        var maxY = minY + tileSize[1] * resolution;\n        return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n    };\n    /**\n     * Get the tile coordinate for the given map coordinate and resolution.  This\n     * method considers that coordinates that intersect tile boundaries should be\n     * assigned the higher tile coordinate.\n     *\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Destination import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @api\n     */\n    TileGrid.prototype.getTileCoordForCoordAndResolution = function (coordinate, resolution, opt_til
 eCoord) {\n        return this.getTileCoordForXYAndResolution_(coordinate[0], coordinate[1], resolution, false, opt_tileCoord);\n    };\n    /**\n     * Note that this method should not be called for resolutions that correspond\n     * to an integer zoom level.  Instead call the `getTileCoordForXYAndZ_` method.\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {number} resolution Resolution (for a non-integer zoom level).\n     * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n     *     intersections go to the higher tile coordinate, let edge intersections\n     *     go to the lower tile coordinate.\n     * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Temporary import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @private\n     */\n    TileGrid.prototype.getTileCoordForXYAndResolution_ = function (x, y, resolution, reverseIntersectionPolicy, opt_til
 eCoord) {\n        var z = this.getZForResolution(resolution);\n        var scale = resolution / this.getResolution(z);\n        var origin = this.getOrigin(z);\n        var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n        var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n        var adjustY = reverseIntersectionPolicy ? 0.5 : 0;\n        var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n        var yFromOrigin = Math.floor((origin[1] - y) / resolution + adjustY);\n        var tileCoordX = (scale * xFromOrigin) / tileSize[0];\n        var tileCoordY = (scale * yFromOrigin) / tileSize[1];\n        if (reverseIntersectionPolicy) {\n            tileCoordX = Math.ceil(tileCoordX) - 1;\n            tileCoordY = Math.ceil(tileCoordY) - 1;\n        }\n        else {\n            tileCoordX = Math.floor(tileCoordX);\n            tileCoordY = Math.floor(tileCoordY);\n        }\n        return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoo
 rd);\n    };\n    /**\n     * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,\n     * they should have separate implementations.  This method is for integer zoom\n     * levels.  The other method should only be called for resolutions corresponding\n     * to non-integer zoom levels.\n     * @param {number} x Map x coordinate.\n     * @param {number} y Map y coordinate.\n     * @param {number} z Integer zoom level.\n     * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n     *     intersections go to the higher tile coordinate, let edge intersections\n     *     go to the lower tile coordinate.\n     * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Temporary import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @private\n     */\n    TileGrid.prototype.getTileCoordForXYAndZ_ = function (x, y, z, reverseIntersectionPolicy, opt_tileCoord) {
 \n        var origin = this.getOrigin(z);\n        var resolution = this.getResolution(z);\n        var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n        var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n        var adjustY = reverseIntersectionPolicy ? 0.5 : 0;\n        var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n        var yFromOrigin = Math.floor((origin[1] - y) / resolution + adjustY);\n        var tileCoordX = xFromOrigin / tileSize[0];\n        var tileCoordY = yFromOrigin / tileSize[1];\n        if (reverseIntersectionPolicy) {\n            tileCoordX = Math.ceil(tileCoordX) - 1;\n            tileCoordY = Math.ceil(tileCoordY) - 1;\n        }\n        else {\n            tileCoordX = Math.floor(tileCoordX);\n            tileCoordY = Math.floor(tileCoordY);\n        }\n        return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n    };\n    /**\n     * Get a tile coordinate given a map coordinate and zoom level.
 \n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} z Zoom level.\n     * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Destination import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @api\n     */\n    TileGrid.prototype.getTileCoordForCoordAndZ = function (coordinate, z, opt_tileCoord) {\n        return this.getTileCoordForXYAndZ_(coordinate[0], coordinate[1], z, false, opt_tileCoord);\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @return {number} Tile resolution.\n     */\n    TileGrid.prototype.getTileCoordResolution = function (tileCoord) {\n        return this.resolutions_[tileCoord[0]];\n    };\n    /**\n     * Get the tile size for a zoom level. The type of the return value matches the\n     * `tileSize` or `tileSizes` that the tile grid was configured with. To always\n    
  * get an `import(\"../size.js\").Size`, run the result through `import(\"../size.js\").Size.toSize()`.\n     * @param {number} z Z.\n     * @return {number|import(\"../size.js\").Size} Tile size.\n     * @api\n     */\n    TileGrid.prototype.getTileSize = function (z) {\n        if (this.tileSize_) {\n            return this.tileSize_;\n        }\n        else {\n            return this.tileSizes_[z];\n        }\n    };\n    /**\n     * @param {number} z Zoom level.\n     * @return {import(\"../TileRange.js\").default} Extent tile range for the specified zoom level.\n     */\n    TileGrid.prototype.getFullTileRange = function (z) {\n        if (!this.fullTileRanges_) {\n            return null;\n        }\n        else {\n            return this.fullTileRanges_[z];\n        }\n    };\n    /**\n     * @param {number} resolution Resolution.\n     * @param {number=} opt_direction If 0, the nearest resolution will be used.\n     *     If 1, the nearest lower resolution will be used. If
  -1, the nearest\n     *     higher resolution will be used. Default is 0.\n     * @return {number} Z.\n     * @api\n     */\n    TileGrid.prototype.getZForResolution = function (resolution, opt_direction) {\n        var z = linearFindNearest(this.resolutions_, resolution, opt_direction || 0);\n        return clamp(z, this.minZoom, this.maxZoom);\n    };\n    /**\n     * @param {!import(\"../extent.js\").Extent} extent Extent for this tile grid.\n     * @private\n     */\n    TileGrid.prototype.calculateTileRanges_ = function (extent) {\n        var length = this.resolutions_.length;\n        var fullTileRanges = new Array(length);\n        for (var z = this.minZoom; z < length; ++z) {\n            fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);\n        }\n        this.fullTileRanges_ = fullTileRanges;\n    };\n    return TileGrid;\n}());\nexport default TileGrid;\n//# sourceMappingURL=TileGrid.js.map","/**\n * @module ol/tilegrid\n */\nimport Corner from './extent/C
 orner.js';\nimport TileGrid from './tilegrid/TileGrid.js';\nimport Units from './proj/Units.js';\nimport { DEFAULT_MAX_ZOOM, DEFAULT_TILE_SIZE } from './tilegrid/common.js';\nimport { METERS_PER_UNIT, get as getProjection } from './proj.js';\nimport { containsCoordinate, createOrUpdate, getCorner, getHeight, getWidth, } from './extent.js';\nimport { toSize } from './size.js';\n/**\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {!TileGrid} Default tile grid for the\n * passed projection.\n */\nexport function getForProjection(projection) {\n    var tileGrid = projection.getDefaultTileGrid();\n    if (!tileGrid) {\n        tileGrid = createForProjection(projection);\n        projection.setDefaultTileGrid(tileGrid);\n    }\n    return tileGrid;\n}\n/**\n * @param {TileGrid} tileGrid Tile grid.\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.
 \n * @return {import(\"./tilecoord.js\").TileCoord} Tile coordinate.\n */\nexport function wrapX(tileGrid, tileCoord, projection) {\n    var z = tileCoord[0];\n    var center = tileGrid.getTileCoordCenter(tileCoord);\n    var projectionExtent = extentFromProjection(projection);\n    if (!containsCoordinate(projectionExtent, center)) {\n        var worldWidth = getWidth(projectionExtent);\n        var worldsAway = Math.ceil((projectionExtent[0] - center[0]) / worldWidth);\n        center[0] += worldWidth * worldsAway;\n        return tileGrid.getTileCoordForCoordAndZ(center, z);\n    }\n    else {\n        return tileCoord;\n    }\n}\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {import(\"./extent/Corner.js\").default=} opt_corner Extent corner (default i
 s `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {\n    var corner = opt_corner !== undefined ? opt_corner : Corner.TOP_LEFT;\n    var resolutions = resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize);\n    return new TileGrid({\n        extent: extent,\n        origin: getCorner(extent, corner),\n        resolutions: resolutions,\n        tileSize: opt_tileSize,\n    });\n}\n/**\n * @typedef {Object} XYZOptions\n * @property {import(\"./extent.js\").Extent} [extent] Extent for the tile grid. The origin for an XYZ tile grid is the\n * top-left corner of the extent. If `maxResolution` is not provided the zero level of the grid is defined by the resolution\n * at which one tile fits in the provided extent. If not provided, the extent of the EPSG:3857 projection is used.\n * @property {number} [maxResolution] Resolution at level zero.\n * @property {number} [maxZoom] Maximum zoom. The d
 efault is `42`. This determines the number of levels\n * in the grid set. For example, a `maxZoom` of 21 means there are 22 levels in the grid set.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {number|import(\"./size.js\").Size} [tileSize=[256, 256]] Tile size in pixels.\n */\n/**\n * Creates a tile grid with a standard XYZ tiling scheme.\n * @param {XYZOptions=} opt_options Tile grid options.\n * @return {!TileGrid} Tile grid instance.\n * @api\n */\nexport function createXYZ(opt_options) {\n    var xyzOptions = opt_options || {};\n    var extent = xyzOptions.extent || getProjection('EPSG:3857').getExtent();\n    var gridOptions = {\n        extent: extent,\n        minZoom: xyzOptions.minZoom,\n        tileSize: xyzOptions.tileSize,\n        resolutions: resolutionsFromExtent(extent, xyzOptions.maxZoom, xyzOptions.tileSize, xyzOptions.maxResolution),\n    };\n    return new TileGrid(gridOptions);\n}\n/**\n * Create a resolutions array from an extent.  A zoom fact
 or of 2 is assumed.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {number=} opt_maxResolution Resolution at level zero.\n * @return {!Array<number>} Resolutions array.\n */\nfunction resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize, opt_maxResolution) {\n    var maxZoom = opt_maxZoom !== undefined ? opt_maxZoom : DEFAULT_MAX_ZOOM;\n    var height = getHeight(extent);\n    var width = getWidth(extent);\n    var tileSize = toSize(opt_tileSize !== undefined ? opt_tileSize : DEFAULT_TILE_SIZE);\n    var maxResolution = opt_maxResolution > 0\n        ? opt_maxResolution\n        : Math.max(width / tileSize[0], height / tileSize[1]);\n    var length = maxZoom + 1;\n    var resolutions = new Array(length);\n    for (var z = 0; z < length; ++z) {\n        reso
 lutions[z] = maxResolution / Math.pow(2, z);\n    }\n    return resolutions;\n}\n/**\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {import(\"./extent/Corner.js\").default=} opt_corner Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForProjection(projection, opt_maxZoom, opt_tileSize, opt_corner) {\n    var extent = extentFromProjection(projection);\n    return createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner);\n}\n/**\n * Generate a tile grid extent from a projection.  If the projection has an\n * extent, it is used.  If not, a global extent is assumed.\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @return {import(\"./extent.js\").Extent} 
 Extent.\n */\nexport function extentFromProjection(projection) {\n    projection = getProjection(projection);\n    var extent = projection.getExtent();\n    if (!extent) {\n        var half = (180 * METERS_PER_UNIT[Units.DEGREES]) / projection.getMetersPerUnit();\n        extent = createOrUpdate(-half, -half, half, half);\n    }\n    return extent;\n}\n//# sourceMappingURL=tilegrid.js.map","/**\n * @module ol/webgl\n */\n/**\n * Constants taken from goog.webgl\n */\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing vertices data, such as\n * position, color, texture coordinate, etc. These vertices are then referenced by an index buffer\n * to be drawn on screen (see {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER}).\n * @const\n * @type {number}\n * @api\n */\nexport var ARRAY_BUFFER = 0x8892;\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing indices data.\n * Index buffers are essentially lists of references to vertices d
 efined in a vertex buffer\n * (see {@link module:ol/webgl.ARRAY_BUFFER}), and define the primitives (triangles) to be drawn.\n * @const\n * @type {number}\n * @api\n */\nexport var ELEMENT_ARRAY_BUFFER = 0x8893;\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport var STREAM_DRAW = 0x88e0;\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport var STATIC_DRAW = 0x88e4;\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport var DYNAMIC_DRAW = 0x88e8;\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_BYTE = 0x1401;\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_SHORT = 0x1403;\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_INT = 0x1405;\n/**\n * @const\n * @type {number}\n */\nexport var FLOAT = 0x1406;\n/** end of goog.webgl constants\n */\n/**\n * @const\n * @
 type {Array<string>}\n */\nvar CONTEXT_IDS = ['experimental-webgl', 'webgl', 'webkit-3d', 'moz-webgl'];\n/**\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Object=} opt_attributes Attributes.\n * @return {WebGLRenderingContext} WebGL rendering context.\n */\nexport function getContext(canvas, opt_attributes) {\n    var ii = CONTEXT_IDS.length;\n    for (var i = 0; i < ii; ++i) {\n        try {\n            var context = canvas.getContext(CONTEXT_IDS[i], opt_attributes);\n            if (context) {\n                return /** @type {!WebGLRenderingContext} */ (context);\n            }\n        }\n        catch (e) {\n            // pass\n        }\n    }\n    return null;\n}\n/**\n * @type {Array<string>}\n */\nvar supportedExtensions;\n/**\n * @return {Array<string>} List of supported WebGL extensions.\n */\nexport function getSupportedExtensions() {\n    if (!supportedExtensions) {\n        var canvas = document.createElement('canvas');\n        var gl = getContext(canva
 s);\n        if (gl) {\n            supportedExtensions = gl.getSupportedExtensions();\n        }\n    }\n    return supportedExtensions;\n}\n//# sourceMappingURL=webgl.js.map","/**\n * @module ol/xml\n */\nimport { extend } from './array.js';\n/**\n * When using {@link module:ol/xml~makeChildAppender} or\n * {@link module:ol/xml~makeSimpleNodeFactory}, the top `objectStack` item needs\n * to have this structure.\n * @typedef {Object} NodeStackItem\n * @property {Node} node\n */\n/**\n * @typedef {function(Element, Array<*>): void} Parser\n */\n/**\n * @typedef {function(Element, *, Array<*>): void} Serializer\n */\n/**\n * @type {string}\n */\nexport var XML_SCHEMA_INSTANCE_URI = 'http://www.w3.org/2001/XMLSchema-instance';\n/**\n * @param {string} namespaceURI Namespace URI.\n * @param {string} qualifiedName Qualified name.\n * @return {Element} Node.\n */\nexport function createElementNS(namespaceURI, qualifiedName) {\n    return getDocument().createElementNS(namespaceURI, qualif
 iedName);\n}\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line\n * breaks.\n * @return {string} All text content.\n * @api\n */\nexport function getAllTextContent(node, normalizeWhitespace) {\n    return getAllTextContent_(node, normalizeWhitespace, []).join('');\n}\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line\n * breaks.\n * @param {Array<string>} accumulator Accumulator.\n * @private\n * @return {Array<string>} Accumulator.\n */\nexport function getAllTextContent_(node, normalizeWhitespace, accumulator) {\n    if (node.nodeType == Node.CDATA_SECTION_NODE ||\n        node.nodeType == Node.TEXT_NODE) {\n        if (normalizeWhitespace) {\n            accumulator.push(String(node.nodeValue).replace(/(\\r\\n|
 \\r|\\n)/g, ''));\n        }\n        else {\n            accumulator.push(node.nodeValue);\n        }\n    }\n    else {\n        var n = void 0;\n        for (n = node.firstChild; n; n = n.nextSibling) {\n            getAllTextContent_(n, normalizeWhitespace, accumulator);\n        }\n    }\n    return accumulator;\n}\n/**\n * @param {Object} object Object.\n * @return {boolean} Is a document.\n */\nexport function isDocument(object) {\n    return 'documentElement' in object;\n}\n/**\n * @param {Element} node Node.\n * @param {?string} namespaceURI Namespace URI.\n * @param {string} name Attribute name.\n * @return {string} Value\n */\nexport function getAttributeNS(node, namespaceURI, name) {\n    return node.getAttributeNS(namespaceURI, name) || '';\n}\n/**\n * Parse an XML string to an XML Document.\n * @param {string} xml XML.\n * @return {Document} Document.\n * @api\n */\nexport function parse(xml) {\n    return new DOMParser().parseFromString(xml, 'application/xml');\n}\n/*
 *\n * Make an array extender function for extending the array at the top of the\n * object stack.\n * @param {function(this: T, Node, Array<*>): (Array<*>|undefined)} valueReader Value reader.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayExtender(valueReader, opt_this) {\n    return (\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            var array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]);\n            extend(array, value);\n        }\n    });\n}\n/**\n * Make an array pusher function for pushing to the array at the top of the\n * object stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @para
 m {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayPusher(valueReader, opt_this) {\n    return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            var array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]);\n            array.push(value);\n        }\n    });\n}\n/**\n * Make an object stack replacer function for replacing the object at the\n * top of the stack.\n * @param {function(this: T, Node, Array<*>): *} valueReader Value reader.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeReplacer(valueReader, opt_this) {\n    return (\n    /**\n     * @param 
 {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            objectStack[objectStack.length - 1] = value;\n        }\n    });\n}\n/**\n * Make an object property pusher function for adding a property to the\n * object at the top of the stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string=} opt_property Property.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertyPusher(valueReader, opt_property, opt_this) {\n    return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_thi
 s : this, node, objectStack);\n        if (value !== undefined) {\n            var object = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n            var property = opt_property !== undefined ? opt_property : node.localName;\n            var array = void 0;\n            if (property in object) {\n                array = object[property];\n            }\n            else {\n                array = [];\n                object[property] = array;\n            }\n            array.push(value);\n        }\n    });\n}\n/**\n * Make an object property setter function.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string=} opt_property Property.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertySetter(valueReader, opt_property, opt_this) {\n    return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} obj
 ectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            var object = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n            var property = opt_property !== undefined ? opt_property : node.localName;\n            object[property] = value;\n        }\n    });\n}\n/**\n * Create a serializer that appends nodes written by its `nodeWriter` to its\n * designated parent. The parent is the `node` of the\n * {@link module:ol/xml~NodeStackItem} at the top of the `objectStack`.\n * @param {function(this: T, Node, V, Array<*>): void} nodeWriter Node writer.\n * @param {T=} opt_this The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeChildAppender(nodeWriter, opt_this) {\n    return function (node, value, objectStack) {\n        nodeWriter.call
 (opt_this !== undefined ? opt_this : this, node, value, objectStack);\n        var parent = /** @type {NodeStackItem} */ (objectStack[objectStack.length - 1]);\n        var parentNode = parent.node;\n        parentNode.appendChild(node);\n    };\n}\n/**\n * Create a serializer that calls the provided `nodeWriter` from\n * {@link module:ol/xml~serialize}. This can be used by the parent writer to have the\n * 'nodeWriter' called with an array of values when the `nodeWriter` was\n * designed to serialize a single item. An example would be a LineString\n * geometry writer, which could be reused for writing MultiLineString\n * geometries.\n * @param {function(this: T, Element, V, Array<*>): void} nodeWriter Node writer.\n * @param {T=} opt_this The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeArraySerializer(nodeWriter, opt_this) {\n    var serializersNS, nodeFactory;\n    return function (node, value, objectSt
 ack) {\n        if (serializersNS === undefined) {\n            serializersNS = {};\n            var serializers = {};\n            serializers[node.localName] = nodeWriter;\n            serializersNS[node.namespaceURI] = serializers;\n            nodeFactory = makeSimpleNodeFactory(node.localName);\n        }\n        serialize(serializersNS, nodeFactory, value, objectStack);\n    };\n}\n/**\n * Create a node factory which can use the `opt_keys` passed to\n * {@link module:ol/xml~serialize} or {@link module:ol/xml~pushSerializeAndPop} as node names,\n * or a fixed node name. The namespace of the created nodes can either be fixed,\n * or the parent namespace will be used.\n * @param {string=} opt_nodeName Fixed node name which will be used for all\n *     created nodes. If not provided, the 3rd argument to the resulting node\n *     factory needs to be provided and will be the nodeName.\n * @param {string=} opt_namespaceURI Fixed namespace URI which will be used for\n *     all crea
 ted nodes. If not provided, the namespace of the parent node will\n *     be used.\n * @return {function(*, Array<*>, string=): (Node|undefined)} Node factory.\n */\nexport function makeSimpleNodeFactory(opt_nodeName, opt_namespaceURI) {\n    var fixedNodeName = opt_nodeName;\n    return (\n    /**\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Node} Node.\n     */\n    function (value, objectStack, opt_nodeName) {\n        var context = /** @type {NodeStackItem} */ (objectStack[objectStack.length - 1]);\n        var node = context.node;\n        var nodeName = fixedNodeName;\n        if (nodeName === undefined) {\n            nodeName = opt_nodeName;\n        }\n        var namespaceURI = opt_namespaceURI !== undefined ? opt_namespaceURI : node.namespaceURI;\n        return createElementNS(namespaceURI, /** @type {string} */ (nodeName));\n    });\n}\n/**\n * A node factory that cr
 eates a node using the parent's `namespaceURI` and the\n * `nodeName` passed by {@link module:ol/xml~serialize} or\n * {@link module:ol/xml~pushSerializeAndPop} to the node factory.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nexport var OBJECT_PROPERTY_NODE_FACTORY = makeSimpleNodeFactory();\n/**\n * Create an array of `values` to be used with {@link module:ol/xml~serialize} or\n * {@link module:ol/xml~pushSerializeAndPop}, where `orderedKeys` has to be provided as\n * `opt_key` argument.\n * @param {Object<string, *>} object Key-value pairs for the sequence. Keys can\n *     be a subset of the `orderedKeys`.\n * @param {Array<string>} orderedKeys Keys in the order of the sequence.\n * @return {Array<*>} Values in the order of the sequence. The resulting array\n *     has the same length as the `orderedKeys` array. Values that are not\n *     present in `object` will be `undefined` in the resulting array.\n */\nexport function makeSequence(object, o
 rderedKeys) {\n    var length = orderedKeys.length;\n    var sequence = new Array(length);\n    for (var i = 0; i < length; ++i) {\n        sequence[i] = object[orderedKeys[i]];\n    }\n    return sequence;\n}\n/**\n * Create a namespaced structure, using the same values for each namespace.\n * This can be used as a starting point for versioned parsers, when only a few\n * values are version specific.\n * @param {Array<string>} namespaceURIs Namespace URIs.\n * @param {T} structure Structure.\n * @param {Object<string, T>=} opt_structureNS Namespaced structure to add to.\n * @return {Object<string, T>} Namespaced structure.\n * @template T\n */\nexport function makeStructureNS(namespaceURIs, structure, opt_structureNS) {\n    /**\n     * @type {Object<string, T>}\n     */\n    var structureNS = opt_structureNS !== undefined ? opt_structureNS : {};\n    var i, ii;\n    for (i = 0, ii = namespaceURIs.length; i < ii; ++i) {\n        structureNS[namespaceURIs[i]] = structure;\n    }\n  
   return structureNS;\n}\n/**\n * Parse a node using the parsers and object stack.\n * @param {Object<string, Object<string, Parser>>} parsersNS\n *     Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @param {*=} opt_this The object to use as `this`.\n */\nexport function parseNode(parsersNS, node, objectStack, opt_this) {\n    var n;\n    for (n = node.firstElementChild; n; n = n.nextElementSibling) {\n        var parsers = parsersNS[n.namespaceURI];\n        if (parsers !== undefined) {\n            var parser = parsers[n.localName];\n            if (parser !== undefined) {\n                parser.call(opt_this, n, objectStack);\n            }\n        }\n    }\n}\n/**\n * Push an object on top of the stack, parse and return the popped object.\n * @param {T} object Object.\n * @param {Object<string, Object<string, Parser>>} parsersNS\n *     Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectS
 tack Object stack.\n * @param {*=} opt_this The object to use as `this`.\n * @return {T} Object.\n * @template T\n */\nexport function pushParseAndPop(object, parsersNS, node, objectStack, opt_this) {\n    objectStack.push(object);\n    parseNode(parsersNS, node, objectStack, opt_this);\n    return /** @type {T} */ (objectStack.pop());\n}\n/**\n * Walk through an array of `values` and call a serializer for each value.\n * @param {Object<string, Object<string, Serializer>>} serializersNS\n *     Namespaced serializers.\n * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n *     Node factory. The `nodeFactory` creates the node whose namespace and name\n *     will be used to choose a node writer from `serializersNS`. This\n *     separation allows us to decide what kind of node to create, depending on\n *     the value we want to serialize. An example for this would be different\n *     geometry writers based on the geometry type.\n * @param {
 Array<*>} values Values to serialize. An example would be an array\n *     of {@link module:ol/Feature~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array<string>=} opt_keys Keys of the `values`. Will be passed to the\n *     `nodeFactory`. This is used for serializing object literals where the\n *     node name relates to the property key. The array length of `opt_keys` has\n *     to match the length of `values`. For serializing a sequence, `opt_keys`\n *     determines the order of the sequence.\n * @param {T=} opt_this The object to use as `this` for the node factory and\n *     serializers.\n * @template T\n */\nexport function serialize(serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {\n    var length = (opt_keys !== undefined ? opt_keys : values).length;\n    var value, node;\n    for (var i = 0; i < length; ++i) {\n        value = values[i];\n        if (value !== undefined) {\n            node = nodeFactory.call(opt_this 
 !== undefined ? opt_this : this, value, objectStack, opt_keys !== undefined ? opt_keys[i] : undefined);\n            if (node !== undefined) {\n                serializersNS[node.namespaceURI][node.localName].call(opt_this, node, value, objectStack);\n            }\n        }\n    }\n}\n/**\n * @param {O} object Object.\n * @param {Object<string, Object<string, Serializer>>} serializersNS\n *     Namespaced serializers.\n * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n *     Node factory. The `nodeFactory` creates the node whose namespace and name\n *     will be used to choose a node writer from `serializersNS`. This\n *     separation allows us to decide what kind of node to create, depending on\n *     the value we want to serialize. An example for this would be different\n *     geometry writers based on the geometry type.\n * @param {Array<*>} values Values to serialize. An example would be an array\n *     of {@link module:ol/Featu
 re~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array<string>=} opt_keys Keys of the `values`. Will be passed to the\n *     `nodeFactory`. This is used for serializing object literals where the\n *     node name relates to the property key. The array length of `opt_keys` has\n *     to match the length of `values`. For serializing a sequence, `opt_keys`\n *     determines the order of the sequence.\n * @param {T=} opt_this The object to use as `this` for the node factory and\n *     serializers.\n * @return {O|undefined} Object.\n * @template O, T\n */\nexport function pushSerializeAndPop(object, serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {\n    objectStack.push(object);\n    serialize(serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this);\n    return /** @type {O|undefined} */ (objectStack.pop());\n}\nvar xmlSerializer_ = undefined;\n/**\n * Register a XMLSerializer. Can be used  to inject a XMLSerializer\n 
 * where there is no globally available implementation.\n *\n * @param {XMLSerializer} xmlSerializer A XMLSerializer.\n * @api\n */\nexport function registerXMLSerializer(xmlSerializer) {\n    xmlSerializer_ = xmlSerializer;\n}\n/**\n * @return {XMLSerializer} The XMLSerializer.\n */\nexport function getXMLSerializer() {\n    if (xmlSerializer_ === undefined && typeof XMLSerializer !== 'undefined') {\n        xmlSerializer_ = new XMLSerializer();\n    }\n    return xmlSerializer_;\n}\nvar document_ = undefined;\n/**\n * Register a Document to use when creating nodes for XML serializations. Can be used\n * to inject a Document where there is no globally available implementation.\n *\n * @param {Document} document A Document.\n * @api\n */\nexport function registerDocument(document) {\n    document_ = document;\n}\n/**\n * Get a document that should be used when creating nodes for XML serializations.\n * @return {Document} The document.\n */\nexport function getDocument() {\n    if (do
 cument_ === undefined && typeof document !== 'undefined') {\n        document_ = document.implementation.createDocument('', '', null);\n    }\n    return document_;\n}\n//# sourceMappingURL=xml.js.map","/**\n * @module ol/webgl/Buffer\n */\nimport { ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER } from '../webgl.js';\nimport { DYNAMIC_DRAW, STATIC_DRAW, STREAM_DRAW } from '../webgl.js';\nimport { assert } from '../asserts.js';\n/**\n * Used to describe the intended usage for the data: `STATIC_DRAW`, `STREAM_DRAW`\n * or `DYNAMIC_DRAW`.\n * @enum {number}\n */\nexport var BufferUsage = {\n    STATIC_DRAW: STATIC_DRAW,\n    STREAM_DRAW: STREAM_DRAW,\n    DYNAMIC_DRAW: DYNAMIC_DRAW,\n};\n/**\n * @classdesc\n * Object used to store an array of data as well as usage information for that data.\n * Stores typed arrays internally, either Float32Array or Uint16/32Array depending on\n * the buffer type (ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER) and available extensions.\n *\n * To populate the array, you can
  either use:\n * * A size using `#ofSize(buffer)`\n * * An `ArrayBuffer` object using `#fromArrayBuffer(buffer)`\n * * A plain array using `#fromArray(array)`\n *\n * Note:\n * See the documentation of [WebGLRenderingContext.bufferData](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData)\n * for more info on buffer usage.\n * @api\n */\nvar WebGLArrayBuffer = /** @class */ (function () {\n    /**\n     * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n     * @param {number=} opt_usage Intended usage, either `STATIC_DRAW`, `STREAM_DRAW` or `DYNAMIC_DRAW`.\n     * Default is `DYNAMIC_DRAW`.\n     */\n    function WebGLArrayBuffer(type, opt_usage) {\n        /**\n         * @private\n         * @type {Float32Array|Uint32Array}\n         */\n        this.array = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.type = type;\n        assert(type === ARRAY_BUFFER || type === ELEMENT_
 ARRAY_BUFFER, 62);\n        /**\n         * @private\n         * @type {number}\n         */\n        this.usage = opt_usage !== undefined ? opt_usage : BufferUsage.STATIC_DRAW;\n    }\n    /**\n     * Populates the buffer with an array of the given size (all values will be zeroes).\n     * @param {number} size Array size\n     */\n    WebGLArrayBuffer.prototype.ofSize = function (size) {\n        this.array = new (getArrayClassForType(this.type))(size);\n    };\n    /**\n     * Populates the buffer with an array of the given size (all values will be zeroes).\n     * @param {Array<number>} array Numerical array\n     */\n    WebGLArrayBuffer.prototype.fromArray = function (array) {\n        this.array = getArrayClassForType(this.type).from(array);\n    };\n    /**\n     * Populates the buffer with a raw binary array buffer.\n     * @param {ArrayBuffer} buffer Raw binary buffer to populate the array with. Note that this buffer must have been\n     * initialized for the same typed arr
 ay class.\n     */\n    WebGLArrayBuffer.prototype.fromArrayBuffer = function (buffer) {\n        this.array = new (getArrayClassForType(this.type))(buffer);\n    };\n    /**\n     * @return {number} Buffer type.\n     */\n    WebGLArrayBuffer.prototype.getType = function () {\n        return this.type;\n    };\n    /**\n     * Will return null if the buffer was not initialized\n     * @return {Float32Array|Uint32Array} Array.\n     */\n    WebGLArrayBuffer.prototype.getArray = function () {\n        return this.array;\n    };\n    /**\n     * @return {number} Usage.\n     */\n    WebGLArrayBuffer.prototype.getUsage = function () {\n        return this.usage;\n    };\n    /**\n     * Will return 0 if the buffer is not initialized\n     * @return {number} Array size\n     */\n    WebGLArrayBuffer.prototype.getSize = function () {\n        return this.array ? this.array.length : 0;\n    };\n    return WebGLArrayBuffer;\n}());\n/**\n * Returns a typed array constructor based on the giv
 en buffer type\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @returns {Float32ArrayConstructor|Uint32ArrayConstructor} The typed array class to use for this buffer.\n */\nexport function getArrayClassForType(type) {\n    switch (type) {\n        case ARRAY_BUFFER:\n            return Float32Array;\n        case ELEMENT_ARRAY_BUFFER:\n            return Uint32Array;\n        default:\n            return Float32Array;\n    }\n}\nexport default WebGLArrayBuffer;\n//# sourceMappingURL=Buffer.js.map","/**\n * @module ol/webgl/ContextEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    LOST: 'webglcontextlost',\n    RESTORED: 'webglcontextrestored',\n};\n//# sourceMappingURL=ContextEventType.js.map","/**\n * @module ol/webgl/PostProcessingPass\n */\nvar DEFAULT_VERTEX_SHADER = \"\\n  precision mediump float;\\n  \\n  attribute vec2 a_position;\\n  varying vec2 v_texCoord;\\n  varying vec2 v_screenCoord;\\n  \\n  uniform vec2 u_screenS
 ize;\\n   \\n  void main() {\\n    v_texCoord = a_position * 0.5 + 0.5;\\n    v_screenCoord = v_texCoord * u_screenSize;\\n    gl_Position = vec4(a_position, 0.0, 1.0);\\n  }\\n\";\nvar DEFAULT_FRAGMENT_SHADER = \"\\n  precision mediump float;\\n   \\n  uniform sampler2D u_image;\\n   \\n  varying vec2 v_texCoord;\\n   \\n  void main() {\\n    gl_FragColor = texture2D(u_image, v_texCoord);\\n  }\\n\";\n/**\n * @typedef {Object} Options\n * @property {WebGLRenderingContext} webGlContext WebGL context; mandatory.\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object.<string,import(\"./Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n/**\n * @typedef {Object
 } UniformInternalDescription\n * @property {import(\"./Helper\").UniformValue} value Value\n * @property {number} location Location\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n/**\n * @classdesc\n * This class is used to define Post Processing passes with custom shaders and uniforms.\n * This is used internally by {@link module:ol/webgl/Helper~WebGLHelper}.\n *\n * Please note that the final output on the DOM canvas is expected to have premultiplied alpha, which means that\n * a pixel which is 100% red with an opacity of 50% must have a color of (r=0.5, g=0, b=0, a=0.5).\n * Failing to provide pixel colors with premultiplied alpha will result in render anomalies.\n *\n * The default post-processing pass does *not* multiply color values with alpha value, it expects color values to be\n * premultiplied.\n *\n * Default shaders are shown hereafter:\n *\n * * Vertex shader:\n *\n *   ```\n *   precision mediump float;\n *\n *   attribute vec2 a_position;\n *   vary
 ing vec2 v_texCoord;\n *   varying vec2 v_screenCoord;\n *\n *   uniform vec2 u_screenSize;\n *\n *   void main() {\n *     v_texCoord = a_position * 0.5 + 0.5;\n *     v_screenCoord = v_texCoord * u_screenSize;\n *     gl_Position = vec4(a_position, 0.0, 1.0);\n *   }\n *   ```\n *\n * * Fragment shader:\n *\n *   ```\n *   precision mediump float;\n *\n *   uniform sampler2D u_image;\n *\n *   varying vec2 v_texCoord;\n *\n *   void main() {\n *     gl_FragColor = texture2D(u_image, v_texCoord);\n *   }\n *   ```\n *\n * @api\n */\nvar WebGLPostProcessingPass = /** @class */ (function () {\n    /**\n     * @param {Options} options Options.\n     */\n    function WebGLPostProcessingPass(options) {\n        this.gl_ = options.webGlContext;\n        var gl = this.gl_;\n        this.scaleRatio_ = options.scaleRatio || 1;\n        this.renderTargetTexture_ = gl.createTexture();\n        this.renderTargetTextureSize_ = null;\n        this.frameBuffer_ = gl.createFramebuffer();\n        
 // compile the program for the frame buffer\n        // TODO: make compilation errors show up\n        var vertexShader = gl.createShader(gl.VERTEX_SHADER);\n        gl.shaderSource(vertexShader, options.vertexShader || DEFAULT_VERTEX_SHADER);\n        gl.compileShader(vertexShader);\n        var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n        gl.shaderSource(fragmentShader, options.fragmentShader || DEFAULT_FRAGMENT_SHADER);\n        gl.compileShader(fragmentShader);\n        this.renderTargetProgram_ = gl.createProgram();\n        gl.attachShader(this.renderTargetProgram_, vertexShader);\n        gl.attachShader(this.renderTargetProgram_, fragmentShader);\n        gl.linkProgram(this.renderTargetProgram_);\n        // bind the vertices buffer for the frame buffer\n        this.renderTargetVerticesBuffer_ = gl.createBuffer();\n        var verticesArray = [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1];\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffe
 r_);\n        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(verticesArray), gl.STATIC_DRAW);\n        this.renderTargetAttribLocation_ = gl.getAttribLocation(this.renderTargetProgram_, 'a_position');\n        this.renderTargetUniformLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_screenSize');\n        this.renderTargetTextureLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_image');\n        /**\n         * Holds info about custom uniforms used in the post processing pass\n         * @type {Array<UniformInternalDescription>}\n         * @private\n         */\n        this.uniforms_ = [];\n        options.uniforms &&\n            Object.keys(options.uniforms).forEach(function (name) {\n                this.uniforms_.push({\n                    value: options.uniforms[name],\n                    location: gl.getUniformLocation(this.renderTargetProgram_, name),\n                });\n            }.bind(this));\n    }\n    /**\n     * Get the WebGL render
 ing context\n     * @return {WebGLRenderingContext} The rendering context.\n     * @api\n     */\n    WebGLPostProcessingPass.prototype.getGL = function () {\n        return this.gl_;\n    };\n    /**\n     * Initialize the render target texture of the post process, make sure it is at the\n     * right size and bind it as a render target for the next draw calls.\n     * The last step to be initialized will be the one where the primitives are rendered.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @api\n     */\n    WebGLPostProcessingPass.prototype.init = function (frameState) {\n        var gl = this.getGL();\n        var textureSize = [\n            gl.drawingBufferWidth * this.scaleRatio_,\n            gl.drawingBufferHeight * this.scaleRatio_,\n        ];\n        // rendering goes to my buffer\n        gl.bindFramebuffer(gl.FRAMEBUFFER, this.getFrameBuffer());\n        gl.viewport(0, 0, textureSize[0], textureSize[1]);\n      
   // if size has changed: adjust canvas & render target texture\n        if (!this.renderTargetTextureSize_ ||\n            this.renderTargetTextureSize_[0] !== textureSize[0] ||\n            this.renderTargetTextureSize_[1] !== textureSize[1]) {\n            this.renderTargetTextureSize_ = textureSize;\n            // create a new texture\n            var level = 0;\n            var internalFormat = gl.RGBA;\n            var border = 0;\n            var format = gl.RGBA;\n            var type = gl.UNSIGNED_BYTE;\n            var data = null;\n            gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n            gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, textureSize[0], textureSize[1], border, format, type, data);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n    
         // bind the texture to the framebuffer\n            gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.renderTargetTexture_, 0);\n        }\n    };\n    /**\n     * Render to the next postprocessing pass (or to the canvas if final pass).\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @param {WebGLPostProcessingPass} [nextPass] Next pass, optional\n     * @api\n     */\n    WebGLPostProcessingPass.prototype.apply = function (frameState, nextPass) {\n        var gl = this.getGL();\n        var size = frameState.size;\n        gl.bindFramebuffer(gl.FRAMEBUFFER, nextPass ? nextPass.getFrameBuffer() : null);\n        gl.activeTexture(gl.TEXTURE0);\n        gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n        // render the frame buffer to the canvas\n        gl.clearColor(0.0, 0.0, 0.0, 0.0);\n        gl.clear(gl.COLOR_BUFFER_BIT);\n        gl.enable(gl.BLEND);\n        gl.blendFunc(gl.
 ONE, gl.ONE_MINUS_SRC_ALPHA);\n        gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n        gl.useProgram(this.renderTargetProgram_);\n        gl.enableVertexAttribArray(this.renderTargetAttribLocation_);\n        gl.vertexAttribPointer(this.renderTargetAttribLocation_, 2, gl.FLOAT, false, 0, 0);\n        gl.uniform2f(this.renderTargetUniformLocation_, size[0], size[1]);\n        gl.uniform1i(this.renderTargetTextureLocation_, 0);\n        this.applyUniforms(frameState);\n        gl.drawArrays(gl.TRIANGLES, 0, 6);\n    };\n    /**\n     * @returns {WebGLFramebuffer} Frame buffer\n     * @api\n     */\n    WebGLPostProcessingPass.prototype.getFrameBuffer = function () {\n        return this.frameBuffer_;\n    };\n    /**\n     * Sets the custom uniforms based on what was given in the constructor.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @p
 rivate\n     */\n    WebGLPostProcessingPass.prototype.applyUniforms = function (frameState) {\n        var gl = this.getGL();\n        var value;\n        var textureSlot = 1;\n        this.uniforms_.forEach(function (uniform) {\n            value =\n                typeof uniform.value === 'function'\n                    ? uniform.value(frameState)\n                    : uniform.value;\n            // apply value based on type\n            if (value instanceof HTMLCanvasElement || value instanceof ImageData) {\n                // create a texture & put data\n                if (!uniform.texture) {\n                    uniform.texture = gl.createTexture();\n                }\n                gl.activeTexture(gl[\"TEXTURE\" + textureSlot]);\n                gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n         
        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n                if (value instanceof ImageData) {\n                    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, value.width, value.height, 0, gl.UNSIGNED_BYTE, new Uint8Array(value.data));\n                }\n                else {\n                    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, value);\n                }\n                // fill texture slots\n                gl.uniform1i(uniform.location, textureSlot++);\n            }\n            else if (Array.isArray(value)) {\n                switch (value.length) {\n                    case 2:\n                        gl.uniform2f(uniform.location, value[0], value[1]);\n                        return;\n                    case 3:\n                        gl.uniform3f(uniform.location, value[0], value[1], value[2]);\n                        return;\n                    case 4:\n                        gl.uniform4f(un
 iform.location, value[0], value[1], value[2], value[3]);\n                        return;\n                    default:\n                        return;\n                }\n            }\n            else if (typeof value === 'number') {\n                gl.uniform1f(uniform.location, value);\n            }\n        });\n    };\n    return WebGLPostProcessingPass;\n}());\nexport default WebGLPostProcessingPass;\n//# sourceMappingURL=PostProcessingPass.js.map","/**\n * @module ol/vec/mat4\n */\n/**\n * @return {Array<number>} \"4x4 matrix representing a 3D identity transform.\"\n */\nexport function create() {\n    return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n/**\n * @param {Array<number>} mat4 Flattened 4x4 matrix receiving the result.\n * @param {import(\"../transform.js\").Transform} transform Transformation matrix.\n * @return {Array<number>} \"2D transformation matrix as flattened 4x4 matrix.\"\n */\nexport function fromTransform(mat4, transform) {\n    mat4[0] =
  transform[0];\n    mat4[1] = transform[1];\n    mat4[4] = transform[2];\n    mat4[5] = transform[3];\n    mat4[12] = transform[4];\n    mat4[13] = transform[5];\n    return mat4;\n}\n//# sourceMappingURL=mat4.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/webgl/Helper\n */\nimport ContextEventType from '../webgl/ContextEventType.js';\nimport Disposable from '../Disposable.js';\nimport WebGLPostProcessingPass from
  './PostProcessingPass.js';\nimport { FLOAT, UNSIGNED_BYTE, UNSIGNED_INT, UNSIGNED_SHORT, getContext, getSupportedExtensions, } from '../webgl.js';\nimport { assert } from '../asserts.js';\nimport { clear } from '../obj.js';\nimport { compose as composeTransform, create as createTransform, reset as resetTransform, rotate as rotateTransform, scale as scaleTransform, } from '../transform.js';\nimport { create, fromTransform } from '../vec/mat4.js';\nimport { getUid } from '../util.js';\nimport { includes } from '../array.js';\n/**\n * @typedef {Object} BufferCacheEntry\n * @property {import(\"./Buffer.js\").default} buffer\n * @property {WebGLBuffer} webGlBuffer\n */\n/**\n * Shader types, either `FRAGMENT_SHADER` or `VERTEX_SHADER`.\n * @enum {number}\n */\nexport var ShaderType = {\n    FRAGMENT_SHADER: 0x8b30,\n    VERTEX_SHADER: 0x8b31,\n};\n/**\n * Uniform names used in the default shaders: `PROJECTION_MATRIX`, `OFFSET_SCALE_MATRIX`.\n * and `OFFSET_ROTATION_MATRIX`.\n * @enum {s
 tring}\n */\nexport var DefaultUniform = {\n    PROJECTION_MATRIX: 'u_projectionMatrix',\n    OFFSET_SCALE_MATRIX: 'u_offsetScaleMatrix',\n    OFFSET_ROTATION_MATRIX: 'u_offsetRotateMatrix',\n    TIME: 'u_time',\n    ZOOM: 'u_zoom',\n    RESOLUTION: 'u_resolution',\n};\n/**\n * Attribute types, either `UNSIGNED_BYTE`, `UNSIGNED_SHORT`, `UNSIGNED_INT` or `FLOAT`\n * Note: an attribute stored in a `Float32Array` should be of type `FLOAT`.\n * @enum {number}\n */\nexport var AttributeType = {\n    UNSIGNED_BYTE: UNSIGNED_BYTE,\n    UNSIGNED_SHORT: UNSIGNED_SHORT,\n    UNSIGNED_INT: UNSIGNED_INT,\n    FLOAT: FLOAT,\n};\n/**\n * Description of an attribute in a buffer\n * @typedef {Object} AttributeDescription\n * @property {string} name Attribute name to use in shaders\n * @property {number} size Number of components per attributes\n * @property {AttributeType} [type] Attribute type, i.e. number of bytes used to store the value. This is\n * determined by the class of typed array which t
 he buffer uses (eg. `Float32Array` for a `FLOAT` attribute).\n * Default is `FLOAT`.\n */\n/**\n * @typedef {number|Array<number>|HTMLCanvasElement|HTMLImageElement|ImageData|import(\"../transform\").Transform} UniformLiteralValue\n */\n/**\n * Uniform value can be a number, array of numbers (2 to 4), canvas element or a callback returning\n * one of the previous types.\n * @typedef {UniformLiteralValue|function(import(\"../PluggableMap.js\").FrameState):UniformLiteralValue} UniformValue\n */\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas which will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object.<string,UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n/**\n * @typede
 f {Object} Options\n * @property {Object.<string,UniformValue>} [uniforms] Uniform definitions; property names must match the uniform\n * names in the provided or default shaders.\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {string} name Name\n * @property {UniformValue=} value Value\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n/**\n * @classdesc\n * This class is intended to provide low-level functions related to WebGL rendering, so that accessing\n * directly the WebGL API should not be required anymore.\n *\n * Several operations are handled by the `WebGLHelper` class:\n *\n * ### Define custom shaders and uniforms\n *\n *   *Shaders* are low-level programs executed on the GPU and written in GLSL. There are two types of shaders:\n *\n *   Vertex shaders are used to manipulate the position and attribute of *vertices* of rendered primitives (ie. c
 orners of a square).\n *   Outputs are:\n *\n *   * `gl_Position`: position of the vertex in screen space\n *\n *   * Varyings usually prefixed with `v_` are passed on to the fragment shader\n *\n *   Fragment shaders are used to control the actual color of the pixels drawn on screen. Their only output is `gl_FragColor`.\n *\n *   Both shaders can take *uniforms* or *attributes* as input. Attributes are explained later. Uniforms are common, read-only values that\n *   can be changed at every frame and can be of type float, arrays of float or images.\n *\n *   Shaders must be compiled and assembled into a program like so:\n *   ```js\n *   // here we simply create two shaders and assemble them in a program which is then used\n *   // for subsequent rendering calls\n *   const vertexShader = new WebGLVertex(VERTEX_SHADER);\n *   const fragmentShader = new WebGLFragment(FRAGMENT_SHADER);\n *   const program = this.context.getProgram(fragmentShader, vertexShader);\n *   helper.useProgra
 m(this.program);\n *   ```\n *\n *   Uniforms are defined using the `uniforms` option and can either be explicit values or callbacks taking the frame state as argument.\n *   You can also change their value along the way like so:\n *   ```js\n *   helper.setUniformFloatValue('u_value', valueAsNumber);\n *   ```\n *\n * ### Defining post processing passes\n *\n *   *Post processing* describes the act of rendering primitives to a texture, and then rendering this texture to the final canvas\n *   while applying special effects in screen space.\n *   Typical uses are: blurring, color manipulation, depth of field, filtering...\n *\n *   The `WebGLHelper` class offers the possibility to define post processes at creation time using the `postProcesses` option.\n *   A post process step accepts the following options:\n *\n *   * `fragmentShader` and `vertexShader`: text literals in GLSL language that will be compiled and used in the post processing step.\n *   * `uniforms`: uniforms can be d
 efined for the post processing steps just like for the main render.\n *   * `scaleRatio`: allows using an intermediate texture smaller or higher than the final canvas in the post processing step.\n *     This is typically used in blur steps to reduce the performance overhead by using an already downsampled texture as input.\n *\n *   The {@link module:ol/webgl/PostProcessingPass~WebGLPostProcessingPass} class is used internally, refer to its documentation for more info.\n *\n * ### Binding WebGL buffers and flushing data into them\n *\n *   Data that must be passed to the GPU has to be transferred using {@link module:ol/webgl/Buffer~WebGLArrayBuffer} objects.\n *   A buffer has to be created only once, but must be bound every time the buffer content will be used for rendering.\n *   This is done using {@link bindBuffer}.\n *   When the buffer's array content has changed, the new data has to be flushed to the GPU memory; this is done using\n *   {@link flushBufferData}. Note: this op
 eration is expensive and should be done as infrequently as possible.\n *\n *   When binding an array buffer, a `target` parameter must be given: it should be either {@link module:ol/webgl.ARRAY_BUFFER}\n *   (if the buffer contains vertices data) or {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER} (if the buffer contains indices data).\n *\n *   Examples below:\n *   ```js\n *   // at initialization phase\n *   const verticesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *   const indicesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *\n *   // when array values have changed\n *   helper.flushBufferData(ARRAY_BUFFER, this.verticesBuffer);\n *   helper.flushBufferData(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *\n *   // at rendering phase\n *   helper.bindBuffer(ARRAY_BUFFER, this.verticesBuffer);\n *   helper.bindBuffer(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *   ```\n *\n * ### Specifying attributes\n *\n *   The GPU only receives the data as arrays of numbers. These nu
 mbers must be handled differently depending on what it describes (position, texture coordinate...).\n *   Attributes are used to specify these uses. Use {@link enableAttributeArray_} and either\n *   the default attribute names in {@link module:ol/webgl/Helper.DefaultAttrib} or custom ones.\n *\n *   Please note that you will have to specify the type and offset of the attributes in the data array. You can refer to the documentation of [WebGLRenderingContext.vertexAttribPointer](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) for more explanation.\n *   ```js\n *   // here we indicate that the data array has the following structure:\n *   // [posX, posY, offsetX, offsetY, texCoordU, texCoordV, posX, posY, ...]\n *   helper.enableAttributes([\n *     {\n *        name: 'a_position',\n *        size: 2\n *     },\n *     {\n *       name: 'a_offset',\n *       size: 2\n *     },\n *     {\n *       name: 'a_texCoord',\n *       size: 2\n *   
   }\n *   ])\n *   ```\n *\n * ### Rendering primitives\n *\n *   Once all the steps above have been achieved, rendering primitives to the screen is done using {@link prepareDraw}, {@link drawElements} and {@link finalizeDraw}.\n *   ```js\n *   // frame preparation step\n *   helper.prepareDraw(frameState);\n *\n *   // call this for every data array that has to be rendered on screen\n *   helper.drawElements(0, this.indicesBuffer.getArray().length);\n *\n *   // finalize the rendering by applying post processes\n *   helper.finalizeDraw(frameState);\n *   ```\n *\n * For an example usage of this class, refer to {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n *\n *\n * @api\n */\nvar WebGLHelper = /** @class */ (function (_super) {\n    __extends(WebGLHelper, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function WebGLHelper(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options || 
 {};\n        /** @private */\n        _this.boundHandleWebGLContextLost_ = _this.handleWebGLContextLost.bind(_this);\n        /** @private */\n        _this.boundHandleWebGLContextRestored_ = _this.handleWebGLContextRestored.bind(_this);\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = document.createElement('canvas');\n        _this.canvas_.style.position = 'absolute';\n        _this.canvas_.style.left = '0';\n        /**\n         * @private\n         * @type {WebGLRenderingContext}\n         */\n        _this.gl_ = getContext(_this.canvas_);\n        var gl = _this.getGL();\n        /**\n         * @private\n         * @type {!Object<string, BufferCacheEntry>}\n         */\n        _this.bufferCache_ = {};\n        /**\n         * @private\n         * @type {WebGLProgram}\n         */\n        _this.currentProgram_ = null;\n        assert(includes(getSupportedExtensions(), 'OES_element_index_uint'), 63);\n        gl.get
 Extension('OES_element_index_uint');\n        _this.canvas_.addEventListener(ContextEventType.LOST, _this.boundHandleWebGLContextLost_);\n        _this.canvas_.addEventListener(ContextEventType.RESTORED, _this.boundHandleWebGLContextRestored_);\n        /**\n         * @private\n         * @type {import(\"../transform.js\").Transform}\n         */\n        _this.offsetRotateMatrix_ = createTransform();\n        /**\n         * @private\n         * @type {import(\"../transform.js\").Transform}\n         */\n        _this.offsetScaleMatrix_ = createTransform();\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.tmpMat4_ = create();\n        /**\n         * @private\n         * @type {Object.<string, WebGLUniformLocation>}\n         */\n        _this.uniformLocations_ = {};\n        /**\n         * @private\n         * @type {Object.<string, number>}\n         */\n        _this.attribLocations_ = {};\n        /**\n         * Holds info about
  custom uniforms used in the post processing pass.\n         * If the uniform is a texture, the WebGL Texture object will be stored here.\n         * @type {Array<UniformInternalDescription>}\n         * @private\n         */\n        _this.uniforms_ = [];\n        if (options.uniforms) {\n            for (var name_1 in options.uniforms) {\n                _this.uniforms_.push({\n                    name: name_1,\n                    value: options.uniforms[name_1],\n                });\n            }\n        }\n        /**\n         * An array of PostProcessingPass objects is kept in this variable, built from the steps provided in the\n         * options. If no post process was given, a default one is used (so as not to have to make an exception to\n         * the frame buffer logic).\n         * @type {Array<WebGLPostProcessingPass>}\n         * @private\n         */\n        _this.postProcessPasses_ = options.postProcesses\n            ? options.postProcesses.map(function (optio
 ns) {\n                return new WebGLPostProcessingPass({\n                    webGlContext: gl,\n                    scaleRatio: options.scaleRatio,\n                    vertexShader: options.vertexShader,\n                    fragmentShader: options.fragmentShader,\n                    uniforms: options.uniforms,\n                });\n            })\n            : [new WebGLPostProcessingPass({ webGlContext: gl })];\n        /**\n         * @type {string|null}\n         * @private\n         */\n        _this.shaderCompileErrors_ = null;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.startTime_ = Date.now();\n        return _this;\n    }\n    /**\n     * Just bind the buffer if it's in the cache. Otherwise create\n     * the WebGL buffer, bind it, populate it, and add an entry to\n     * the cache.\n     * @param {import(\"./Buffer\").default} buffer Buffer.\n     * @api\n     */\n    WebGLHelper.prototype.bindBuffer = function (buffer) {
 \n        var gl = this.getGL();\n        var bufferKey = getUid(buffer);\n        var bufferCache = this.bufferCache_[bufferKey];\n        if (!bufferCache) {\n            var webGlBuffer = gl.createBuffer();\n            bufferCache = {\n                buffer: buffer,\n                webGlBuffer: webGlBuffer,\n            };\n            this.bufferCache_[bufferKey] = bufferCache;\n        }\n        gl.bindBuffer(buffer.getType(), bufferCache.webGlBuffer);\n    };\n    /**\n     * Update the data contained in the buffer array; this is required for the\n     * new data to be rendered\n     * @param {import(\"./Buffer\").default} buffer Buffer.\n     * @api\n     */\n    WebGLHelper.prototype.flushBufferData = function (buffer) {\n        var gl = this.getGL();\n        this.bindBuffer(buffer);\n        gl.bufferData(buffer.getType(), buffer.getArray(), buffer.getUsage());\n    };\n    /**\n     * @param {import(\"./Buffer.js\").default} buf Buffer.\n     */\n    WebGLHelper.prot
 otype.deleteBuffer = function (buf) {\n        var gl = this.getGL();\n        var bufferKey = getUid(buf);\n        var bufferCacheEntry = this.bufferCache_[bufferKey];\n        if (!gl.isContextLost()) {\n            gl.deleteBuffer(bufferCacheEntry.buffer);\n        }\n        delete this.bufferCache_[bufferKey];\n    };\n    /**\n     * Clean up.\n     */\n    WebGLHelper.prototype.disposeInternal = function () {\n        this.canvas_.removeEventListener(ContextEventType.LOST, this.boundHandleWebGLContextLost_);\n        this.canvas_.removeEventListener(ContextEventType.RESTORED, this.boundHandleWebGLContextRestored_);\n    };\n    /**\n     * Clear the buffer & set the viewport to draw.\n     * Post process passes will be initialized here, the first one being bound as a render target for\n     * subsequent draw calls.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @api\n     */\n    WebGLHelper.prototype.prepareDraw = function 
 (frameState) {\n        var gl = this.getGL();\n        var canvas = this.getCanvas();\n        var size = frameState.size;\n        var pixelRatio = frameState.pixelRatio;\n        canvas.width = size[0] * pixelRatio;\n        canvas.height = size[1] * pixelRatio;\n        canvas.style.width = size[0] + 'px';\n        canvas.style.height = size[1] + 'px';\n        gl.useProgram(this.currentProgram_);\n        // loop backwards in post processes list\n        for (var i = this.postProcessPasses_.length - 1; i >= 0; i--) {\n            this.postProcessPasses_[i].init(frameState);\n        }\n        gl.bindTexture(gl.TEXTURE_2D, null);\n        gl.clearColor(0.0, 0.0, 0.0, 0.0);\n        gl.clear(gl.COLOR_BUFFER_BIT);\n        gl.enable(gl.BLEND);\n        gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n        gl.useProgram(this.currentProgram_);\n        this.applyFrameState(frameState);\n        this.applyUniforms(frameState);\n    };\n    /**\n     * Clear the render target & bind
  it for future draw operations.\n     * This is similar to `prepareDraw`, only post processes will not be applied.\n     * Note: the whole viewport will be drawn to the render target, regardless of its size.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @param {import(\"./RenderTarget.js\").default} renderTarget Render target to draw to\n     * @param {boolean} [opt_disableAlphaBlend] If true, no alpha blending will happen.\n     */\n    WebGLHelper.prototype.prepareDrawToRenderTarget = function (frameState, renderTarget, opt_disableAlphaBlend) {\n        var gl = this.getGL();\n        var size = renderTarget.getSize();\n        gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());\n        gl.viewport(0, 0, size[0], size[1]);\n        gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());\n        gl.clearColor(0.0, 0.0, 0.0, 0.0);\n        gl.clear(gl.COLOR_BUFFER_BIT);\n        gl.enable(gl.BLEND);\n        gl.b
 lendFunc(gl.ONE, opt_disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n        gl.useProgram(this.currentProgram_);\n        this.applyFrameState(frameState);\n        this.applyUniforms(frameState);\n    };\n    /**\n     * Execute a draw call based on the currently bound program, texture, buffers, attributes.\n     * @param {number} start Start index.\n     * @param {number} end End index.\n     * @api\n     */\n    WebGLHelper.prototype.drawElements = function (start, end) {\n        var gl = this.getGL();\n        var elementType = gl.UNSIGNED_INT;\n        var elementSize = 4;\n        var numItems = end - start;\n        var offsetInBytes = start * elementSize;\n        gl.drawElements(gl.TRIANGLES, numItems, elementType, offsetInBytes);\n    };\n    /**\n     * Apply the successive post process passes which will eventually render to the actual canvas.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @api\n     */\n    Web
 GLHelper.prototype.finalizeDraw = function (frameState) {\n        // apply post processes using the next one as target\n        for (var i = 0; i < this.postProcessPasses_.length; i++) {\n            this.postProcessPasses_[i].apply(frameState, this.postProcessPasses_[i + 1] || null);\n        }\n    };\n    /**\n     * @return {HTMLCanvasElement} Canvas.\n     * @api\n     */\n    WebGLHelper.prototype.getCanvas = function () {\n        return this.canvas_;\n    };\n    /**\n     * Get the WebGL rendering context\n     * @return {WebGLRenderingContext} The rendering context.\n     * @api\n     */\n    WebGLHelper.prototype.getGL = function () {\n        return this.gl_;\n    };\n    /**\n     * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGLHelper.prototype.applyFrameState = function (frameState) {\n        va
 r size = frameState.size;\n        var rotation = frameState.viewState.rotation;\n        var offsetScaleMatrix = resetTransform(this.offsetScaleMatrix_);\n        scaleTransform(offsetScaleMatrix, 2 / size[0], 2 / size[1]);\n        var offsetRotateMatrix = resetTransform(this.offsetRotateMatrix_);\n        if (rotation !== 0) {\n            rotateTransform(offsetRotateMatrix, -rotation);\n        }\n        this.setUniformMatrixValue(DefaultUniform.OFFSET_SCALE_MATRIX, fromTransform(this.tmpMat4_, offsetScaleMatrix));\n        this.setUniformMatrixValue(DefaultUniform.OFFSET_ROTATION_MATRIX, fromTransform(this.tmpMat4_, offsetRotateMatrix));\n        this.setUniformFloatValue(DefaultUniform.TIME, (Date.now() - this.startTime_) * 0.001);\n        this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);\n        this.setUniformFloatValue(DefaultUniform.RESOLUTION, frameState.viewState.resolution);\n    };\n    /**\n     * Sets the custom uniforms based on what was 
 given in the constructor. This is called internally in `prepareDraw`.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGLHelper.prototype.applyUniforms = function (frameState) {\n        var gl = this.getGL();\n        var value;\n        var textureSlot = 0;\n        this.uniforms_.forEach(function (uniform) {\n            value =\n                typeof uniform.value === 'function'\n                    ? uniform.value(frameState)\n                    : uniform.value;\n            // apply value based on type\n            if (value instanceof HTMLCanvasElement ||\n                value instanceof HTMLImageElement ||\n                value instanceof ImageData) {\n                // create a texture & put data\n                if (!uniform.texture) {\n                    uniform.prevValue = undefined;\n                    uniform.texture = gl.createTexture();\n                }\n                gl.activeTexture(gl[\
 "TEXTURE\" + textureSlot]);\n                gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n                var imageReady = !(value instanceof HTMLImageElement) ||\n                    /** @type {HTMLImageElement} */ (value).complete;\n                if (imageReady && uniform.prevValue !== value) {\n                    uniform.prevValue = value;\n                    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, value);\n                }\n                // fill texture slots by increasing index\n                gl.uniform1i(this.getUniformLocation(uniform.name), textureSlot++);\n            }\n            else if (Array.isArray(value) && value.length === 6) {\n                this.setUniformMatrixValue(
 uniform.name, fromTransform(this.tmpMat4_, value));\n            }\n            else if (Array.isArray(value) && value.length <= 4) {\n                switch (value.length) {\n                    case 2:\n                        gl.uniform2f(this.getUniformLocation(uniform.name), value[0], value[1]);\n                        return;\n                    case 3:\n                        gl.uniform3f(this.getUniformLocation(uniform.name), value[0], value[1], value[2]);\n                        return;\n                    case 4:\n                        gl.uniform4f(this.getUniformLocation(uniform.name), value[0], value[1], value[2], value[3]);\n                        return;\n                    default:\n                        return;\n                }\n            }\n            else if (typeof value === 'number') {\n                gl.uniform1f(this.getUniformLocation(uniform.name), value);\n            }\n        }.bind(this));\n    };\n    /**\n     * Use a program.  If the 
 program is already in use, this will return `false`.\n     * @param {WebGLProgram} program Program.\n     * @return {boolean} Changed.\n     * @api\n     */\n    WebGLHelper.prototype.useProgram = function (program) {\n        if (program == this.currentProgram_) {\n            return false;\n        }\n        else {\n            var gl = this.getGL();\n            gl.useProgram(program);\n            this.currentProgram_ = program;\n            this.uniformLocations_ = {};\n            this.attribLocations_ = {};\n            return true;\n        }\n    };\n    /**\n     * Will attempt to compile a vertex or fragment shader based on source\n     * On error, the shader will be returned but\n     * `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` will return `true`\n     * Use `gl.getShaderInfoLog(shader)` to have details\n     * @param {string} source Shader source\n     * @param {ShaderType} type VERTEX_SHADER or FRAGMENT_SHADER\n     * @return {WebGLShader} Shader object\n    
  */\n    WebGLHelper.prototype.compileShader = function (source, type) {\n        var gl = this.getGL();\n        var shader = gl.createShader(type);\n        gl.shaderSource(shader, source);\n        gl.compileShader(shader);\n        return shader;\n    };\n    /**\n     * Create a program for a vertex and fragment shader. The shaders compilation may have failed:\n     * use `WebGLHelper.getShaderCompileErrors()`to have details if any.\n     * @param {string} fragmentShaderSource Fragment shader source.\n     * @param {string} vertexShaderSource Vertex shader source.\n     * @return {WebGLProgram} Program\n     * @api\n     */\n    WebGLHelper.prototype.getProgram = function (fragmentShaderSource, vertexShaderSource) {\n        var gl = this.getGL();\n        var fragmentShader = this.compileShader(fragmentShaderSource, gl.FRAGMENT_SHADER);\n        var vertexShader = this.compileShader(vertexShaderSource, gl.VERTEX_SHADER);\n        this.shaderCompileErrors_ = null;\n        if (
 gl.getShaderInfoLog(fragmentShader)) {\n            this.shaderCompileErrors_ = \"Fragment shader compilation failed:\\n\" + gl.getShaderInfoLog(fragmentShader);\n        }\n        if (gl.getShaderInfoLog(vertexShader)) {\n            this.shaderCompileErrors_ =\n                (this.shaderCompileErrors_ || '') +\n                    (\"Vertex shader compilation failed:\\n\" + gl.getShaderInfoLog(vertexShader));\n        }\n        var program = gl.createProgram();\n        gl.attachShader(program, fragmentShader);\n        gl.attachShader(program, vertexShader);\n        gl.linkProgram(program);\n        return program;\n    };\n    /**\n     * Will return the last shader compilation errors. If no error happened, will return null;\n     * @return {string|null} Errors description, or null if last compilation was successful\n     * @api\n     */\n    WebGLHelper.prototype.getShaderCompileErrors = function () {\n        return this.shaderCompileErrors_;\n    };\n    /**\n     * Will
  get the location from the shader or the cache\n     * @param {string} name Uniform name\n     * @return {WebGLUniformLocation} uniformLocation\n     * @api\n     */\n    WebGLHelper.prototype.getUniformLocation = function (name) {\n        if (this.uniformLocations_[name] === undefined) {\n            this.uniformLocations_[name] = this.getGL().getUniformLocation(this.currentProgram_, name);\n        }\n        return this.uniformLocations_[name];\n    };\n    /**\n     * Will get the location from the shader or the cache\n     * @param {string} name Attribute name\n     * @return {number} attribLocation\n     * @api\n     */\n    WebGLHelper.prototype.getAttributeLocation = function (name) {\n        if (this.attribLocations_[name] === undefined) {\n            this.attribLocations_[name] = this.getGL().getAttribLocation(this.currentProgram_, name);\n        }\n        return this.attribLocations_[name];\n    };\n    /**\n     * Modifies the given transform to apply the rotation/t
 ranslation/scaling of the given frame state.\n     * The resulting transform can be used to convert world space coordinates to view coordinates.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../transform\").Transform} transform Transform to update.\n     * @return {import(\"../transform\").Transform} The updated transform object.\n     * @api\n     */\n    WebGLHelper.prototype.makeProjectionTransform = function (frameState, transform) {\n        var size = frameState.size;\n        var rotation = frameState.viewState.rotation;\n        var resolution = frameState.viewState.resolution;\n        var center = frameState.viewState.center;\n        resetTransform(transform);\n        composeTransform(transform, 0, 0, 2 / (resolution * size[0]), 2 / (resolution * size[1]), -rotation, -center[0], -center[1]);\n        return transform;\n    };\n    /**\n     * Give a value for a standard float uniform\n     * @param {string} un
 iform Uniform name\n     * @param {number} value Value\n     * @api\n     */\n    WebGLHelper.prototype.setUniformFloatValue = function (uniform, value) {\n        this.getGL().uniform1f(this.getUniformLocation(uniform), value);\n    };\n    /**\n     * Give a value for a standard matrix4 uniform\n     * @param {string} uniform Uniform name\n     * @param {Array<number>} value Matrix value\n     * @api\n     */\n    WebGLHelper.prototype.setUniformMatrixValue = function (uniform, value) {\n        this.getGL().uniformMatrix4fv(this.getUniformLocation(uniform), false, value);\n    };\n    /**\n     * Will set the currently bound buffer to an attribute of the shader program. Used by `#enableAttributes`\n     * internally.\n     * @param {string} attribName Attribute name\n     * @param {number} size Number of components per attributes\n     * @param {number} type UNSIGNED_INT, UNSIGNED_BYTE, UNSIGNED_SHORT or FLOAT\n     * @param {number} stride Stride in bytes (0 means attribs are pa
 cked)\n     * @param {number} offset Offset in bytes\n     * @private\n     */\n    WebGLHelper.prototype.enableAttributeArray_ = function (attribName, size, type, stride, offset) {\n        var location = this.getAttributeLocation(attribName);\n        // the attribute has not been found in the shaders; do not enable it\n        if (location < 0) {\n            return;\n        }\n        this.getGL().enableVertexAttribArray(location);\n        this.getGL().vertexAttribPointer(location, size, type, false, stride, offset);\n    };\n    /**\n     * Will enable the following attributes to be read from the currently bound buffer,\n     * i.e. tell the GPU where to read the different attributes in the buffer. An error in the\n     * size/type/order of attributes will most likely break the rendering and throw a WebGL exception.\n     * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n     * @api\n     */\n    WebGLHelper.prototype.enable
 Attributes = function (attributes) {\n        var stride = computeAttributesStride(attributes);\n        var offset = 0;\n        for (var i = 0; i < attributes.length; i++) {\n            var attr = attributes[i];\n            this.enableAttributeArray_(attr.name, attr.size, attr.type || FLOAT, stride, offset);\n            offset += attr.size * getByteSizeFromType(attr.type);\n        }\n    };\n    /**\n     * WebGL context was lost\n     * @private\n     */\n    WebGLHelper.prototype.handleWebGLContextLost = function () {\n        clear(this.bufferCache_);\n        this.currentProgram_ = null;\n    };\n    /**\n     * WebGL context was restored\n     * @private\n     */\n    WebGLHelper.prototype.handleWebGLContextRestored = function () { };\n    /**\n     * Will create or reuse a given webgl texture and apply the given size. If no image data\n     * specified, the texture will be empty, otherwise image data will be used and the `size`\n     * parameter will be ignored.\n     * 
 Note: wrap parameters are set to clamp to edge, min filter is set to linear.\n     * @param {Array<number>} size Expected size of the texture\n     * @param {ImageData|HTMLImageElement|HTMLCanvasElement} [opt_data] Image data/object to bind to the texture\n     * @param {WebGLTexture} [opt_texture] Existing texture to reuse\n     * @return {WebGLTexture} The generated texture\n     * @api\n     */\n    WebGLHelper.prototype.createTexture = function (size, opt_data, opt_texture) {\n        var gl = this.getGL();\n        var texture = opt_texture || gl.createTexture();\n        // set params & size\n        var level = 0;\n        var internalFormat = gl.RGBA;\n        var border = 0;\n        var format = gl.RGBA;\n        var type = gl.UNSIGNED_BYTE;\n        gl.bindTexture(gl.TEXTURE_2D, texture);\n        if (opt_data) {\n            gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, format, type, opt_data);\n        }\n        else {\n            gl.texImage2D(gl.TEXTURE_2D, le
 vel, internalFormat, size[0], size[1], border, format, type, null);\n        }\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n        return texture;\n    };\n    return WebGLHelper;\n}(Disposable));\n/**\n * Compute a stride in bytes based on a list of attributes\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes\n * @returns {number} Stride, ie amount of values for each vertex in the vertex buffer\n * @api\n */\nexport function computeAttributesStride(attributes) {\n    var stride = 0;\n    for (var i = 0; i < attributes.length; i++) {\n        var attr = attributes[i];\n        stride += attr.size * getByteSizeFromType(attr.type);\n    }\n    return stride;\n}\n/**\n * Computes the size in byte of an attribute type.\n * @param {AttributeType} type Attribute type\n * @
 returns {number} The size in bytes\n */\nfunction getByteSizeFromType(type) {\n    switch (type) {\n        case AttributeType.UNSIGNED_BYTE:\n            return Uint8Array.BYTES_PER_ELEMENT;\n        case AttributeType.UNSIGNED_SHORT:\n            return Uint16Array.BYTES_PER_ELEMENT;\n        case AttributeType.UNSIGNED_INT:\n            return Uint32Array.BYTES_PER_ELEMENT;\n        case AttributeType.FLOAT:\n        default:\n            return Float32Array.BYTES_PER_ELEMENT;\n    }\n}\nexport default WebGLHelper;\n//# sourceMappingURL=Helper.js.map","/**\n * A wrapper class to simplify rendering to a texture instead of the final canvas\n * @module ol/webgl/RenderTarget\n */\nimport { equals } from '../array.js';\n// for pixel color reading\nvar tmpArray4 = new Uint8Array(4);\n/**\n * @classdesc\n * This class is a wrapper around the association of both a `WebGLTexture` and a `WebGLFramebuffer` instances,\n * simplifying initialization and binding for rendering.\n * @api\n */\nv
 ar WebGLRenderTarget = /** @class */ (function () {\n    /**\n     * @param {import(\"./Helper.js\").default} helper WebGL helper; mandatory.\n     * @param {Array<number>} [opt_size] Expected size of the render target texture; note: this can be changed later on.\n     */\n    function WebGLRenderTarget(helper, opt_size) {\n        /**\n         * @private\n         * @type {import(\"./Helper.js\").default}\n         */\n        this.helper_ = helper;\n        var gl = helper.getGL();\n        /**\n         * @private\n         * @type {WebGLTexture}\n         */\n        this.texture_ = gl.createTexture();\n        /**\n         * @private\n         * @type {WebGLFramebuffer}\n         */\n        this.framebuffer_ = gl.createFramebuffer();\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        this.size_ = opt_size || [1, 1];\n        /**\n         * @type {Uint8Array}\n         * @private\n         */\n        this.data_ = new Uint8Array(0);\n  
       /**\n         * @type {boolean}\n         * @private\n         */\n        this.dataCacheDirty_ = true;\n        this.updateSize_();\n    }\n    /**\n     * Changes the size of the render target texture. Note: will do nothing if the size\n     * is already the same.\n     * @param {Array<number>} size Expected size of the render target texture\n     * @api\n     */\n    WebGLRenderTarget.prototype.setSize = function (size) {\n        if (equals(size, this.size_)) {\n            return;\n        }\n        this.size_[0] = size[0];\n        this.size_[1] = size[1];\n        this.updateSize_();\n    };\n    /**\n     * Returns the size of the render target texture\n     * @return {Array<number>} Size of the render target texture\n     * @api\n     */\n    WebGLRenderTarget.prototype.getSize = function () {\n        return this.size_;\n    };\n    /**\n     * This will cause following calls to `#readAll` or `#readPixel` to download the content of the\n     * render target into mem
 ory, which is an expensive operation.\n     * This content will be kept in cache but should be cleared after each new render.\n     * @api\n     */\n    WebGLRenderTarget.prototype.clearCachedData = function () {\n        this.dataCacheDirty_ = true;\n    };\n    /**\n     * Returns the full content of the frame buffer as a series of r, g, b, a components\n     * in the 0-255 range (unsigned byte).\n     * @return {Uint8Array} Integer array of color values\n     * @api\n     */\n    WebGLRenderTarget.prototype.readAll = function () {\n        if (this.dataCacheDirty_) {\n            var size = this.size_;\n            var gl = this.helper_.getGL();\n            gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n            gl.readPixels(0, 0, size[0], size[1], gl.RGBA, gl.UNSIGNED_BYTE, this.data_);\n            this.dataCacheDirty_ = false;\n        }\n        return this.data_;\n    };\n    /**\n     * Reads one pixel of the frame buffer as an array of r, g, b, a components\n
      * in the 0-255 range (unsigned byte).\n     * If x and/or y are outside of existing data, an array filled with 0 is returned.\n     * @param {number} x Pixel coordinate\n     * @param {number} y Pixel coordinate\n     * @returns {Uint8Array} Integer array with one color value (4 components)\n     * @api\n     */\n    WebGLRenderTarget.prototype.readPixel = function (x, y) {\n        if (x < 0 || y < 0 || x > this.size_[0] || y >= this.size_[1]) {\n            tmpArray4[0] = 0;\n            tmpArray4[1] = 0;\n            tmpArray4[2] = 0;\n            tmpArray4[3] = 0;\n            return tmpArray4;\n        }\n        this.readAll();\n        var index = Math.floor(x) + (this.size_[1] - Math.floor(y) - 1) * this.size_[0];\n        tmpArray4[0] = this.data_[index * 4];\n        tmpArray4[1] = this.data_[index * 4 + 1];\n        tmpArray4[2] = this.data_[index * 4 + 2];\n        tmpArray4[3] = this.data_[index * 4 + 3];\n        return tmpArray4;\n    };\n    /**\n     * @return 
 {WebGLTexture} Texture to render to\n     */\n    WebGLRenderTarget.prototype.getTexture = function () {\n        return this.texture_;\n    };\n    /**\n     * @return {WebGLFramebuffer} Frame buffer of the render target\n     */\n    WebGLRenderTarget.prototype.getFramebuffer = function () {\n        return this.framebuffer_;\n    };\n    /**\n     * @private\n     */\n    WebGLRenderTarget.prototype.updateSize_ = function () {\n        var size = this.size_;\n        var gl = this.helper_.getGL();\n        this.texture_ = this.helper_.createTexture(size, null, this.texture_);\n        gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n        gl.viewport(0, 0, size[0], size[1]);\n        gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture_, 0);\n        this.data_ = new Uint8Array(size[0] * size[1] * 4);\n    };\n    return WebGLRenderTarget;\n}());\nexport default WebGLRenderTarget;\n//# sourceMappingURL=RenderTarget.js.map","/**\n * @m
 odule ol/tilegrid/WMTS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileGrid from './TileGrid.js';\nimport { find } from '../array.js';\nimport { get as getProjection } from '../proj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles\n * outside this extent will be requested by {@link module:ol/source/Tile} sources.\n * When no `origin` or `origin
 s` are configured, the `origin` will be set to the\n * top-left corner of the extent.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e.\n * where the `x` and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left\n * to right and downwards. If not specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins,\n * i.e. where the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If\n * given, the array length should match the length of the `resolutions` array, i.e.\n * each resolution can have a different origin. Tile coordinates increase left to\n * right and downwards. If not specified, `extent` or `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each\n * resolution needs to match the zoom level. This means that even if a `minZoom`\n * is configured, the resolutions array will have a length of `max
 Zoom + 1`\n * @property {!Array<string>} matrixIds matrix IDs. The length of this array needs\n * to match the length of the `resolutions` array.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. The values here are the `TileMatrixWidth` and\n * `TileMatrixHeight` advertised in the GetCapabilities response of the WMTS, and\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent for\n * which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * @property {Array<import(\"../size.js\").Size>} [tileSizes] Tile sizes. The length of\n * this array needs to match the le
 ngth of the `resolutions` array.\n */\n/**\n * @classdesc\n * Set the grid pattern for sources accessing WMTS tiled-image servers.\n * @api\n */\nvar WMTSTileGrid = /** @class */ (function (_super) {\n    __extends(WMTSTileGrid, _super);\n    /**\n     * @param {Options} options WMTS options.\n     */\n    function WMTSTileGrid(options) {\n        var _this = _super.call(this, {\n            extent: options.extent,\n            origin: options.origin,\n            origins: options.origins,\n            resolutions: options.resolutions,\n            tileSize: options.tileSize,\n            tileSizes: options.tileSizes,\n            sizes: options.sizes,\n        }) || this;\n        /**\n         * @private\n         * @type {!Array<string>}\n         */\n        _this.matrixIds_ = options.matrixIds;\n        return _this;\n    }\n    /**\n     * @param {number} z Z.\n     * @return {string} MatrixId..\n     */\n    WMTSTileGrid.prototype.getMatrixId = function (z) {\n        return 
 this.matrixIds_[z];\n    };\n    /**\n     * Get the list of matrix identifiers.\n     * @return {Array<string>} MatrixIds.\n     * @api\n     */\n    WMTSTileGrid.prototype.getMatrixIds = function () {\n        return this.matrixIds_;\n    };\n    return WMTSTileGrid;\n}(TileGrid));\nexport default WMTSTileGrid;\n/**\n * Create a tile grid from a WMTS capabilities matrix set and an\n * optional TileMatrixSetLimits.\n * @param {Object} matrixSet An object representing a matrixSet in the\n *     capabilities document.\n * @param {import(\"../extent.js\").Extent=} opt_extent An optional extent to restrict the tile\n *     ranges the server provides.\n * @param {Array<Object>=} opt_matrixLimits An optional object representing\n *     the available matrices for tileGrid.\n * @return {WMTSTileGrid} WMTS tileGrid instance.\n * @api\n */\nexport function createFromCapabilitiesMatrixSet(matrixSet, opt_extent, opt_matrixLimits) {\n    /** @type {!Array<number>} */\n    var resolutions = [];\
 n    /** @type {!Array<string>} */\n    var matrixIds = [];\n    /** @type {!Array<import(\"../coordinate.js\").Coordinate>} */\n    var origins = [];\n    /** @type {!Array<import(\"../size.js\").Size>} */\n    var tileSizes = [];\n    /** @type {!Array<import(\"../size.js\").Size>} */\n    var sizes = [];\n    var matrixLimits = opt_matrixLimits !== undefined ? opt_matrixLimits : [];\n    var supportedCRSPropName = 'SupportedCRS';\n    var matrixIdsPropName = 'TileMatrix';\n    var identifierPropName = 'Identifier';\n    var scaleDenominatorPropName = 'ScaleDenominator';\n    var topLeftCornerPropName = 'TopLeftCorner';\n    var tileWidthPropName = 'TileWidth';\n    var tileHeightPropName = 'TileHeight';\n    var code = matrixSet[supportedCRSPropName];\n    var projection = getProjection(code.replace(/urn:ogc:def:crs:(\\w+):(.*:)?(\\w+)$/, '$1:$3')) || getProjection(code);\n    var metersPerUnit = projection.getMetersPerUnit();\n    // swap origin x and y coordinates if axis orien
 tation is lat/long\n    var switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';\n    matrixSet[matrixIdsPropName].sort(function (a, b) {\n        return b[scaleDenominatorPropName] - a[scaleDenominatorPropName];\n    });\n    matrixSet[matrixIdsPropName].forEach(function (elt) {\n        var matrixAvailable;\n        // use of matrixLimits to filter TileMatrices from GetCapabilities\n        // TileMatrixSet from unavailable matrix levels.\n        if (matrixLimits.length > 0) {\n            matrixAvailable = find(matrixLimits, function (elt_ml) {\n                if (elt[identifierPropName] == elt_ml[matrixIdsPropName]) {\n                    return true;\n                }\n                // Fallback for tileMatrix identifiers that don't get prefixed\n                // by their tileMatrixSet identifiers.\n                if (elt[identifierPropName].indexOf(':') === -1) {\n                    return (matrixSet[identifierPropName] + ':' + elt[identifierPropName]
  ===\n                        elt_ml[matrixIdsPropName]);\n                }\n                return false;\n            });\n        }\n        else {\n            matrixAvailable = true;\n        }\n        if (matrixAvailable) {\n            matrixIds.push(elt[identifierPropName]);\n            var resolution = (elt[scaleDenominatorPropName] * 0.28e-3) / metersPerUnit;\n            var tileWidth = elt[tileWidthPropName];\n            var tileHeight = elt[tileHeightPropName];\n            if (switchOriginXY) {\n                origins.push([\n                    elt[topLeftCornerPropName][1],\n                    elt[topLeftCornerPropName][0],\n                ]);\n            }\n            else {\n                origins.push(elt[topLeftCornerPropName]);\n            }\n            resolutions.push(resolution);\n            tileSizes.push(tileWidth == tileHeight ? tileWidth : [tileWidth, tileHeight]);\n            sizes.push([elt['MatrixWidth'], elt['MatrixHeight']]);\n        }
 \n    });\n    return new WMTSTileGrid({\n        extent: opt_extent,\n        origins: origins,\n        resolutions: resolutions,\n        matrixIds: matrixIds,\n        tileSizes: tileSizes,\n        sizes: sizes,\n    });\n}\n//# sourceMappingURL=WMTS.js.map","/**\n * @module ol/style/Image\n */\nimport { abstract } from '../util.js';\nimport { toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {number} opacity\n * @property {boolean} rotateWithView\n * @property {number} rotation\n * @property {number|import(\"../size.js\").Size} scale\n * @property {Array<number>} displacement\n */\n/**\n * @classdesc\n * A base class used for creating subclasses and not instantiated in\n * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and\n * {@link module:ol/style/RegularShape~RegularShape}.\n * @abstract\n * @api\n */\nvar ImageStyle = /** @class */ (function () {\n    /**\n     * @param {Options} options Options
 .\n     */\n    function ImageStyle(options) {\n        /**\n         * @private\n         * @type {number}\n         */\n        this.opacity_ = options.opacity;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.rotateWithView_ = options.rotateWithView;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.rotation_ = options.rotation;\n        /**\n         * @private\n         * @type {number|import(\"../size.js\").Size}\n         */\n        this.scale_ = options.scale;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        this.scaleArray_ = toSize(options.scale);\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.displacement_ = options.displacement;\n    }\n    /**\n     * Clones the style.\n     * @return {ImageStyle} The cloned style.\n     * @api\n     */\n    ImageStyle.prototype.clone = function () {\n      
   var scale = this.getScale();\n        return new ImageStyle({\n            opacity: this.getOpacity(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            displacement: this.getDisplacement().slice(),\n        });\n    };\n    /**\n     * Get the symbolizer opacity.\n     * @return {number} Opacity.\n     * @api\n     */\n    ImageStyle.prototype.getOpacity = function () {\n        return this.opacity_;\n    };\n    /**\n     * Determine whether the symbolizer rotates with the map.\n     * @return {boolean} Rotate with map.\n     * @api\n     */\n    ImageStyle.prototype.getRotateWithView = function () {\n        return this.rotateWithView_;\n    };\n    /**\n     * Get the symoblizer rotation.\n     * @return {number} Rotation.\n     * @api\n     */\n    ImageStyle.prototype.getRotation = function () {\n        return this.rotation_;\n    };\n    /**\n     
 * Get the symbolizer scale.\n     * @return {number|import(\"../size.js\").Size} Scale.\n     * @api\n     */\n    ImageStyle.prototype.getScale = function () {\n        return this.scale_;\n    };\n    /**\n     * Get the symbolizer scale array.\n     * @return {import(\"../size.js\").Size} Scale array.\n     */\n    ImageStyle.prototype.getScaleArray = function () {\n        return this.scaleArray_;\n    };\n    /**\n     * Get the displacement of the shape\n     * @return {Array<number>} Shape's center displacement\n     * @api\n     */\n    ImageStyle.prototype.getDisplacement = function () {\n        return this.displacement_;\n    };\n    /**\n     * Get the anchor point in pixels. The anchor determines the center point for the\n     * symbolizer.\n     * @abstract\n     * @return {Array<number>} Anchor.\n     */\n    ImageStyle.prototype.getAnchor = function () {\n        return abstract();\n    };\n    /**\n     * Get the image element for the symbolizer.\n     * @abstract\n
      * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n     */\n    ImageStyle.prototype.getImage = function (pixelRatio) {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n     */\n    ImageStyle.prototype.getHitDetectionImage = function () {\n        return abstract();\n    };\n    /*\n     * Get the image pixel ratio.\n     * @param {number} pixelRatio Pixel ratio.\n     * */\n    ImageStyle.prototype.getPixelRatio = function (pixelRatio) {\n        return 1;\n    };\n    /**\n     * @abstract\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    ImageStyle.prototype.getImageState = function () {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    ImageStyle.prototype.getImageSize = function () {
 \n        return abstract();\n    };\n    /**\n     * @abstract\n     * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n     */\n    ImageStyle.prototype.getHitDetectionImageSize = function () {\n        return abstract();\n    };\n    /**\n     * Get the origin of the symbolizer.\n     * @abstract\n     * @return {Array<number>} Origin.\n     */\n    ImageStyle.prototype.getOrigin = function () {\n        return abstract();\n    };\n    /**\n     * Get the size of the symbolizer (in pixels).\n     * @abstract\n     * @return {import(\"../size.js\").Size} Size.\n     */\n    ImageStyle.prototype.getSize = function () {\n        return abstract();\n    };\n    /**\n     * Set the opacity.\n     *\n     * @param {number} opacity Opacity.\n     * @api\n     */\n    ImageStyle.prototype.setOpacity = function (opacity) {\n        this.opacity_ = opacity;\n    };\n    /**\n     * Set whether to rotate the style with the view.\n     *\n     * @param {boolean} rotate
 WithView Rotate with map.\n     * @api\n     */\n    ImageStyle.prototype.setRotateWithView = function (rotateWithView) {\n        this.rotateWithView_ = rotateWithView;\n    };\n    /**\n     * Set the rotation.\n     *\n     * @param {number} rotation Rotation.\n     * @api\n     */\n    ImageStyle.prototype.setRotation = function (rotation) {\n        this.rotation_ = rotation;\n    };\n    /**\n     * Set the scale.\n     *\n     * @param {number|import(\"../size.js\").Size} scale Scale.\n     * @api\n     */\n    ImageStyle.prototype.setScale = function (scale) {\n        this.scale_ = scale;\n        this.scaleArray_ = toSize(scale);\n    };\n    /**\n     * @abstract\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    ImageStyle.prototype.listenImageChange = function (listener) {\n        abstract();\n    };\n    /**\n     * Load not yet loaded URI.\n     * @abstract\n     */\n    ImageStyle.prototype.load = functi
 on () {\n        abstract();\n    };\n    /**\n     * @abstract\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    ImageStyle.prototype.unlistenImageChange = function (listener) {\n        abstract();\n    };\n    return ImageStyle;\n}());\nexport default ImageStyle;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/style/RegularShape\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n 
    };\n})();\nimport ImageState from '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport { asArray } from '../color.js';\nimport { asColorLike } from '../colorlike.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { defaultFillStyle, defaultLineCap, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, } from '../render/canvas.js';\n/**\n * Specify radius for regular polygons, or radius1 and radius2 for stars.\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides.\n * @property {number} [radius] Radius of a regular polygon.\n * @property {number} [radius1] Outer radius of a star.\n * @property {number} [radius2] Inner radius of a star.\n * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing 
 up.\n * @property {Array<number>} [displacement=[0,0]] Displacement of the shape\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.\n */\n/**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {number} strokeWidth\n * @property {number} size\n * @property {CanvasLineCap} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {CanvasLineJoin} lineJoin\n * @property {number} miterLimit\n */\n/**\n * @classdesc\n * Set regular shape style for vector features. The resulting shape will be\n * a regular polygon when `radius` is provided, or a star when `radius1` and\n * `radius2` are provided.\n * @api\n */\nvar RegularShape = /** @class */ (function (_super) {\n    __extends(RegularSha
 pe, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function RegularShape(options) {\n        var _this = this;\n        /**\n         * @type {boolean}\n         */\n        var rotateWithView = options.rotateWithView !== undefined ? options.rotateWithView : false;\n        _this = _super.call(this, {\n            opacity: 1,\n            rotateWithView: rotateWithView,\n            rotation: options.rotation !== undefined ? options.rotation : 0,\n            scale: 1,\n            displacement: options.displacement !== undefined ? options.displacement : [0, 0],\n        }) || this;\n        /**\n         * @private\n         * @type {Object<number, HTMLCanvasElement>}\n         */\n        _this.canvas_ = {};\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.hitDetectionCanvas_ = null;\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default}\n         */\n        _this.fill_ = op
 tions.fill !== undefined ? options.fill : null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.origin_ = [0, 0];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.points_ = options.points;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.radius_ =\n            options.radius !== undefined ? options.radius : options.radius1;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.radius2_ = options.radius2;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.angle_ = options.angle !== undefined ? options.angle : 0;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        _this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n       
  _this.anchor_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.size_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.imageSize_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.hitDetectionImageSize_ = null;\n        _this.render();\n        return _this;\n    }\n    /**\n     * Clones the style.\n     * @return {RegularShape} The cloned style.\n     * @api\n     */\n    RegularShape.prototype.clone = function () {\n        var style = new RegularShape({\n            fill: this.getFill() ? this.getFill().clone() : undefined,\n            points: this.getPoints(),\n            radius: this.getRadius(),\n            radius2: this.getRadius2(),\n            angle: this.getAngle(),\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            rotation: 
 this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            displacement: this.getDisplacement().slice(),\n        });\n        style.setOpacity(this.getOpacity());\n        style.setScale(this.getScale());\n        return style;\n    };\n    /**\n     * Get the anchor point in pixels. The anchor determines the center point for the\n     * symbolizer.\n     * @return {Array<number>} Anchor.\n     * @api\n     */\n    RegularShape.prototype.getAnchor = function () {\n        return this.anchor_;\n    };\n    /**\n     * Get the angle used in generating the shape.\n     * @return {number} Shape's rotation in radians.\n     * @api\n     */\n    RegularShape.prototype.getAngle = function () {\n        return this.angle_;\n    };\n    /**\n     * Get the fill style for the shape.\n     * @return {import(\"./Fill.js\").default} Fill style.\n     * @api\n     */\n    RegularShape.prototype.getFill = function () {\n        return this.fill_;\n    };\n    /**\n   
   * @return {HTMLCanvasElement} Image element.\n     */\n    RegularShape.prototype.getHitDetectionImage = function () {\n        if (!this.hitDetectionCanvas_) {\n            var renderOptions = this.createRenderOptions();\n            this.createHitDetectionCanvas_(renderOptions);\n        }\n        return this.hitDetectionCanvas_;\n    };\n    /**\n     * Get the image icon.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLCanvasElement} Image or Canvas element.\n     * @api\n     */\n    RegularShape.prototype.getImage = function (pixelRatio) {\n        if (!this.canvas_[pixelRatio || 1]) {\n            var renderOptions = this.createRenderOptions();\n            var context = createCanvasContext2D(renderOptions.size * pixelRatio || 1, renderOptions.size * pixelRatio || 1);\n            this.draw_(renderOptions, context, 0, 0, pixelRatio || 1);\n            this.canvas_[pixelRatio || 1] = context.canvas;\n        }\n        return this.canvas_[pixelRatio || 
 1];\n    };\n    /*\n     * Get the image pixel ratio.\n     * @param {number} pixelRatio Pixel ratio.\n     * */\n    RegularShape.prototype.getPixelRatio = function (pixelRatio) {\n        return pixelRatio;\n    };\n    /**\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    RegularShape.prototype.getImageSize = function () {\n        return this.imageSize_;\n    };\n    /**\n     * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n     */\n    RegularShape.prototype.getHitDetectionImageSize = function () {\n        return this.hitDetectionImageSize_;\n    };\n    /**\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    RegularShape.prototype.getImageState = function () {\n        return ImageState.LOADED;\n    };\n    /**\n     * Get the origin of the symbolizer.\n     * @return {Array<number>} Origin.\n     * @api\n     */\n    RegularShape.prototype.getOrigin = function () {\n        return this.origin_;\n 
    };\n    /**\n     * Get the number of points for generating the shape.\n     * @return {number} Number of points for stars and regular polygons.\n     * @api\n     */\n    RegularShape.prototype.getPoints = function () {\n        return this.points_;\n    };\n    /**\n     * Get the (primary) radius for the shape.\n     * @return {number} Radius.\n     * @api\n     */\n    RegularShape.prototype.getRadius = function () {\n        return this.radius_;\n    };\n    /**\n     * Get the secondary radius for the shape.\n     * @return {number|undefined} Radius2.\n     * @api\n     */\n    RegularShape.prototype.getRadius2 = function () {\n        return this.radius2_;\n    };\n    /**\n     * Get the size of the symbolizer (in pixels).\n     * @return {import(\"../size.js\").Size} Size.\n     * @api\n     */\n    RegularShape.prototype.getSize = function () {\n        return this.size_;\n    };\n    /**\n     * Get the stroke style for the shape.\n     * @return {import(\"./Stroke.js\
 ").default} Stroke style.\n     * @api\n     */\n    RegularShape.prototype.getStroke = function () {\n        return this.stroke_;\n    };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    RegularShape.prototype.listenImageChange = function (listener) { };\n    /**\n     * Load not yet loaded URI.\n     */\n    RegularShape.prototype.load = function () { };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    RegularShape.prototype.unlistenImageChange = function (listener) { };\n    /**\n     * @returns {RenderOptions}  The render options\n     * @protected\n     */\n    RegularShape.prototype.createRenderOptions = function () {\n        var lineCap = defaultLineCap;\n        var lineJoin = defaultLineJoin;\n        var miterLimit = 0;\n        var lineDash = null;\n        var lineDashOffset = 0;\n        var strokeStyle;\n        var strok
 eWidth = 0;\n        if (this.stroke_) {\n            strokeStyle = this.stroke_.getColor();\n            if (strokeStyle === null) {\n                strokeStyle = defaultStrokeStyle;\n            }\n            strokeStyle = asColorLike(strokeStyle);\n            strokeWidth = this.stroke_.getWidth();\n            if (strokeWidth === undefined) {\n                strokeWidth = defaultLineWidth;\n            }\n            lineDash = this.stroke_.getLineDash();\n            lineDashOffset = this.stroke_.getLineDashOffset();\n            lineJoin = this.stroke_.getLineJoin();\n            if (lineJoin === undefined) {\n                lineJoin = defaultLineJoin;\n            }\n            lineCap = this.stroke_.getLineCap();\n            if (lineCap === undefined) {\n                lineCap = defaultLineCap;\n            }\n            miterLimit = this.stroke_.getMiterLimit();\n            if (miterLimit === undefined) {\n                miterLimit = defaultMiterLimit;\n          
   }\n        }\n        var size = 2 * (this.radius_ + strokeWidth) + 1;\n        return {\n            strokeStyle: strokeStyle,\n            strokeWidth: strokeWidth,\n            size: size,\n            lineCap: lineCap,\n            lineDash: lineDash,\n            lineDashOffset: lineDashOffset,\n            lineJoin: lineJoin,\n            miterLimit: miterLimit,\n        };\n    };\n    /**\n     * @protected\n     */\n    RegularShape.prototype.render = function () {\n        var renderOptions = this.createRenderOptions();\n        var context = createCanvasContext2D(renderOptions.size, renderOptions.size);\n        this.draw_(renderOptions, context, 0, 0, 1);\n        this.canvas_[1] = context.canvas;\n        // canvas.width and height are rounded to the closest integer\n        var size = context.canvas.width;\n        var imageSize = size;\n        var displacement = this.getDisplacement();\n        this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
 \n        this.createHitDetectionCanvas_(renderOptions);\n        this.anchor_ = [size / 2 - displacement[0], size / 2 + displacement[1]];\n        this.size_ = [size, size];\n        this.imageSize_ = [imageSize, imageSize];\n    };\n    /**\n     * @private\n     * @param {RenderOptions} renderOptions Render options.\n     * @param {CanvasRenderingContext2D} context The rendering context.\n     * @param {number} x The origin for the symbol (x).\n     * @param {number} y The origin for the symbol (y).\n     * @param {number} pixelRatio The pixel ratio.\n     */\n    RegularShape.prototype.draw_ = function (renderOptions, context, x, y, pixelRatio) {\n        var i, angle0, radiusC;\n        // reset transform\n        context.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n        // then move to (x, y)\n        context.translate(x, y);\n        context.beginPath();\n        var points = this.points_;\n        if (points === Infinity) {\n            context.arc(renderOptions.siz
 e / 2, renderOptions.size / 2, this.radius_, 0, 2 * Math.PI, true);\n        }\n        else {\n            var radius2 = this.radius2_ !== undefined ? this.radius2_ : this.radius_;\n            if (radius2 !== this.radius_) {\n                points = 2 * points;\n            }\n            for (i = 0; i <= points; i++) {\n                angle0 = (i * 2 * Math.PI) / points - Math.PI / 2 + this.angle_;\n                radiusC = i % 2 === 0 ? this.radius_ : radius2;\n                context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0), renderOptions.size / 2 + radiusC * Math.sin(angle0));\n            }\n        }\n        if (this.fill_) {\n            var color = this.fill_.getColor();\n            if (color === null) {\n                color = defaultFillStyle;\n            }\n            context.fillStyle = asColorLike(color);\n            context.fill();\n        }\n        if (this.stroke_) {\n            context.strokeStyle = renderOptions.strokeStyle;\n       
      context.lineWidth = renderOptions.strokeWidth;\n            if (context.setLineDash && renderOptions.lineDash) {\n                context.setLineDash(renderOptions.lineDash);\n                context.lineDashOffset = renderOptions.lineDashOffset;\n            }\n            context.lineCap = renderOptions.lineCap;\n            context.lineJoin = renderOptions.lineJoin;\n            context.miterLimit = renderOptions.miterLimit;\n            context.stroke();\n        }\n        context.closePath();\n    };\n    /**\n     * @private\n     * @param {RenderOptions} renderOptions Render options.\n     */\n    RegularShape.prototype.createHitDetectionCanvas_ = function (renderOptions) {\n        this.hitDetectionCanvas_ = this.getImage(1);\n        if (this.fill_) {\n            var color = this.fill_.getColor();\n            // determine if fill is transparent (or pattern or gradient)\n            var opacity = 0;\n            if (typeof color === 'string') {\n                color
  = asArray(color);\n            }\n            if (color === null) {\n                opacity = 1;\n            }\n            else if (Array.isArray(color)) {\n                opacity = color.length === 4 ? color[3] : 1;\n            }\n            if (opacity === 0) {\n                // if a transparent fill style is set, create an extra hit-detection image\n                // with a default fill style\n                var context = createCanvasContext2D(renderOptions.size, renderOptions.size);\n                this.hitDetectionCanvas_ = context.canvas;\n                this.drawHitDetectionCanvas_(renderOptions, context, 0, 0);\n            }\n        }\n    };\n    /**\n     * @private\n     * @param {RenderOptions} renderOptions Render options.\n     * @param {CanvasRenderingContext2D} context The context.\n     * @param {number} x The origin for the symbol (x).\n     * @param {number} y The origin for the symbol (y).\n     */\n    RegularShape.prototype.drawHitDetectionCanvas
 _ = function (renderOptions, context, x, y) {\n        // move to (x, y)\n        context.translate(x, y);\n        context.beginPath();\n        var points = this.points_;\n        if (points === Infinity) {\n            context.arc(renderOptions.size / 2, renderOptions.size / 2, this.radius_, 0, 2 * Math.PI, true);\n        }\n        else {\n            var radius2 = this.radius2_ !== undefined ? this.radius2_ : this.radius_;\n            if (radius2 !== this.radius_) {\n                points = 2 * points;\n            }\n            var i = void 0, radiusC = void 0, angle0 = void 0;\n            for (i = 0; i <= points; i++) {\n                angle0 = (i * 2 * Math.PI) / points - Math.PI / 2 + this.angle_;\n                radiusC = i % 2 === 0 ? this.radius_ : radius2;\n                context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0), renderOptions.size / 2 + radiusC * Math.sin(angle0));\n            }\n        }\n        context.fillStyle = defaultFillStyle
 ;\n        context.fill();\n        if (this.stroke_) {\n            context.strokeStyle = renderOptions.strokeStyle;\n            context.lineWidth = renderOptions.strokeWidth;\n            if (renderOptions.lineDash) {\n                context.setLineDash(renderOptions.lineDash);\n                context.lineDashOffset = renderOptions.lineDashOffset;\n            }\n            context.stroke();\n        }\n        context.closePath();\n    };\n    return RegularShape;\n}(ImageStyle));\nexport default RegularShape;\n//# sourceMappingURL=RegularShape.js.map","/**\n * @module ol/style/Circle\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return f
 unction (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport RegularShape from './RegularShape.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} radius Circle radius.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {Array<number>} [displacement=[0,0]] displacement\n */\n/**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */\nvar CircleStyle = /** @class */ (function (_super) {\n    __extends(CircleStyle, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function CircleStyle(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            points: Infinity,\n            fill: options.fill,\n  
           radius: options.radius,\n            stroke: options.stroke,\n            displacement: options.displacement !== undefined ? options.displacement : [0, 0],\n        }) || this;\n        return _this;\n    }\n    /**\n     * Clones the style.\n     * @return {CircleStyle} The cloned style.\n     * @api\n     */\n    CircleStyle.prototype.clone = function () {\n        var style = new CircleStyle({\n            fill: this.getFill() ? this.getFill().clone() : undefined,\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            radius: this.getRadius(),\n            displacement: this.getDisplacement().slice(),\n        });\n        style.setOpacity(this.getOpacity());\n        style.setScale(this.getScale());\n        return style;\n    };\n    /**\n     * Set the circle radius.\n     *\n     * @param {number} radius Circle radius.\n     * @api\n     */\n    CircleStyle.prototype.setRadius = function (radius) {\n        this.radius_ = radius;\
 n        this.render();\n    };\n    return CircleStyle;\n}(RegularShape));\nexport default CircleStyle;\n//# sourceMappingURL=Circle.js.map","/**\n * @module ol/style/Fill\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color=null] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n */\n/**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */\nvar Fill = /** @class */ (function () {\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Fill(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n         */\n        this.color_ = options.color !== undefined ? options.color : null;\n    }\n 
    /**\n     * Clones the style. The color is not cloned if it is an {@link module:ol/colorlike~ColorLike}.\n     * @return {Fill} The cloned style.\n     * @api\n     */\n    Fill.prototype.clone = function () {\n        var color = this.getColor();\n        return new Fill({\n            color: Array.isArray(color) ? color.slice() : color || undefined,\n        });\n    };\n    /**\n     * Get the fill color.\n     * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n     * @api\n     */\n    Fill.prototype.getColor = function () {\n        return this.color_;\n    };\n    /**\n     * Set the color.\n     *\n     * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n     * @api\n     */\n    Fill.prototype.setColor = function (color) {\n        this.color_ = color;\n    };\n    return Fill;\n}());\nexport default Fill;\n//# sourceMappingURL=Fill.js.map","/**\n * @module ol/style/IconAnchorUnits\n */\n/**\n *
  Icon anchor units. One of 'fraction', 'pixels'.\n * @enum {string}\n */\nexport default {\n    /**\n     * Anchor is a fraction\n     * @api\n     */\n    FRACTION: 'fraction',\n    /**\n     * Anchor is in pixels\n     * @api\n     */\n    PIXELS: 'pixels',\n};\n//# sourceMappingURL=IconAnchorUnits.js.map","/**\n * @module ol/style/IconOrigin\n */\n/**\n * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.\n * @enum {string}\n */\nexport default {\n    /**\n     * Origin is at bottom left\n     * @api\n     */\n    BOTTOM_LEFT: 'bottom-left',\n    /**\n     * Origin is at bottom right\n     * @api\n     */\n    BOTTOM_RIGHT: 'bottom-right',\n    /**\n     * Origin is at top left\n     * @api\n     */\n    TOP_LEFT: 'top-left',\n    /**\n     * Origin is at top right\n     * @api\n     */\n    TOP_RIGHT: 'top-right',\n};\n//# sourceMappingURL=IconOrigin.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d,
  b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/ImageBase\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport { abstract } from './util.js';\n/**\n * @abstract\n */\nvar ImageBase = /** @class */ (function (_super) {\n    __extends(ImageBase, _super);\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./ImageState.
 js\").default} state State.\n     */\n    function ImageBase(extent, resolution, pixelRatio, state) {\n        var _this = _super.call(this) || this;\n        /**\n         * @protected\n         * @type {import(\"./extent.js\").Extent}\n         */\n        _this.extent = extent;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ = pixelRatio;\n        /**\n         * @protected\n         * @type {number|undefined}\n         */\n        _this.resolution = resolution;\n        /**\n         * @protected\n         * @type {import(\"./ImageState.js\").default}\n         */\n        _this.state = state;\n        return _this;\n    }\n    /**\n     * @protected\n     */\n    ImageBase.prototype.changed = function () {\n        this.dispatchEvent(EventType.CHANGE);\n    };\n    /**\n     * @return {import(\"./extent.js\").Extent} Extent.\n     */\n    ImageBase.prototype.getExtent = function () {\n        return this.extent;\n    };\n    
 /**\n     * @abstract\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     */\n    ImageBase.prototype.getImage = function () {\n        return abstract();\n    };\n    /**\n     * @return {number} PixelRatio.\n     */\n    ImageBase.prototype.getPixelRatio = function () {\n        return this.pixelRatio_;\n    };\n    /**\n     * @return {number} Resolution.\n     */\n    ImageBase.prototype.getResolution = function () {\n        return /** @type {number} */ (this.resolution);\n    };\n    /**\n     * @return {import(\"./ImageState.js\").default} State.\n     */\n    ImageBase.prototype.getState = function () {\n        return this.state;\n    };\n    /**\n     * Load not yet loaded URI.\n     * @abstract\n     */\n    ImageBase.prototype.load = function () {\n        abstract();\n    };\n    return ImageBase;\n}(EventTarget));\nexport default ImageBase;\n//# sourceMappingURL=ImageBase.js.map","var __extends = (this && this.__extends) || (function () {
 \n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Image\n */\nimport EventType from './events/EventType.js';\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\nimport { IMAGE_DECODE } from './has.js';\nimport { getHeight } from './extent.js';\nimport { listenOnce, unlistenByKey } from './events.js';\n/**\n * A function that takes an {@link module:ol/Image~Image} for the image and a\n * `{string}` for the src as arguments. It is supposed to make it s
 o the\n * underlying image {@link module:ol/Image~Image#getImage} is assigned the\n * content specified by the src. If not specified, the default is\n *\n *     function(image, src) {\n *       image.getImage().src = src;\n *     }\n *\n * Providing a custom `imageLoadFunction` can be useful to load images with\n * post requests or - in general - through XHR requests, where the src of the\n * image element would be set to a data URI when the content is loaded.\n *\n * @typedef {function(ImageWrapper, string): void} LoadFunction\n * @api\n */\nvar ImageWrapper = /** @class */ (function (_super) {\n    __extends(ImageWrapper, _super);\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {string} src Image source URI.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {LoadFunction} imageLoadFunction Image load function.\n     */\n   
  function ImageWrapper(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) {\n        var _this = _super.call(this, extent, resolution, pixelRatio, ImageState.IDLE) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.src_ = src;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n         */\n        _this.image_ = new Image();\n        if (crossOrigin !== null) {\n            _this.image_.crossOrigin = crossOrigin;\n        }\n        /**\n         * @private\n         * @type {?function():void}\n         */\n        _this.unlisten_ = null;\n        /**\n         * @protected\n         * @type {import(\"./ImageState.js\").default}\n         */\n        _this.state = ImageState.IDLE;\n        /**\n         * @private\n         * @type {LoadFunction}\n         */\n        _this.imageLoadFunction_ = imageLoadFunction;\n        return _this;\n    }\n    /**\n     * @ret
 urn {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     * @api\n     */\n    ImageWrapper.prototype.getImage = function () {\n        return this.image_;\n    };\n    /**\n     * Tracks loading or read errors.\n     *\n     * @private\n     */\n    ImageWrapper.prototype.handleImageError_ = function () {\n        this.state = ImageState.ERROR;\n        this.unlistenImage_();\n        this.changed();\n    };\n    /**\n     * Tracks successful image load.\n     *\n     * @private\n     */\n    ImageWrapper.prototype.handleImageLoad_ = function () {\n        if (this.resolution === undefined) {\n            this.resolution = getHeight(this.extent) / this.image_.height;\n        }\n        this.state = ImageState.LOADED;\n        this.unlistenImage_();\n        this.changed();\n    };\n    /**\n     * Load the image or retry if loading previously failed.\n     * Loading is taken care of by the tile queue, and calling this method is\n     * only needed for preloading or fo
 r reloading in case of an error.\n     * @api\n     */\n    ImageWrapper.prototype.load = function () {\n        if (this.state == ImageState.IDLE || this.state == ImageState.ERROR) {\n            this.state = ImageState.LOADING;\n            this.changed();\n            this.imageLoadFunction_(this, this.src_);\n            this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n        }\n    };\n    /**\n     * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n     */\n    ImageWrapper.prototype.setImage = function (image) {\n        this.image_ = image;\n    };\n    /**\n     * Discards event handlers which listen for load completion or errors.\n     *\n     * @private\n     */\n    ImageWrapper.prototype.unlistenImage_ = function () {\n        if (this.unlisten_) {\n            this.unlisten_();\n            this.unlisten_ = null;\n        }\n    };\n    return ImageWrapper;\n}(ImageBase));\n/**\n
  * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image element.\n * @param {function():any} loadHandler Load callback function.\n * @param {function():any} errorHandler Error callback function.\n * @return {function():void} Callback to stop listening.\n */\nexport function listenImage(image, loadHandler, errorHandler) {\n    var img = /** @type {HTMLImageElement} */ (image);\n    if (img.src && IMAGE_DECODE) {\n        var promise = img.decode();\n        var listening_1 = true;\n        var unlisten = function () {\n            listening_1 = false;\n        };\n        promise\n            .then(function () {\n            if (listening_1) {\n                loadHandler();\n            }\n        })\n            .catch(function (error) {\n            if (listening_1) {\n                // FIXME: Unconditionally call errorHandler() when this bug is fixed upstream:\n                //        https://bugs.webkit.org/show_bug.cgi?id=198527\n                if (error
 .name === 'EncodingError' &&\n                    error.message === 'Invalid image type.') {\n                    loadHandler();\n                }\n                else {\n                    errorHandler();\n                }\n            }\n        });\n        return unlisten;\n    }\n    var listenerKeys = [\n        listenOnce(img, EventType.LOAD, loadHandler),\n        listenOnce(img, EventType.ERROR, errorHandler),\n    ];\n    return function unlisten() {\n        listenerKeys.forEach(unlistenByKey);\n    };\n}\nexport default ImageWrapper;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/style/IconImage\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics
 (d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventTarget from '../events/Target.js';\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { shared as iconImageCache } from './IconImageCache.js';\nimport { listenImage } from '../Image.js';\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar taintedTestContext = null;\nvar IconImage = /** @class */ (function (_super) {\n    __extends(IconImage, _super);\n    /**\n     * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n     * @param {string|undefined} src Src.\n     * @param {import(\"../size.js\").Size} size Size.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../ImageState.js\").default} imageState Image
  state.\n     * @param {import(\"../color.js\").Color} color Color.\n     */\n    function IconImage(image, src, size, crossOrigin, imageState, color) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {HTMLImageElement|HTMLCanvasElement}\n         */\n        _this.hitDetectionImage_ = null;\n        /**\n         * @private\n         * @type {HTMLImageElement|HTMLCanvasElement}\n         */\n        _this.image_ = !image ? new Image() : image;\n        if (crossOrigin !== null) {\n            /** @type {HTMLImageElement} */ (_this.image_).crossOrigin = crossOrigin;\n        }\n        /**\n         * @private\n         * @type {Object<number, HTMLCanvasElement>}\n         */\n        _this.canvas_ = {};\n        /**\n         * @private\n         * @type {import(\"../color.js\").Color}\n         */\n        _this.color_ = color;\n        /**\n         * @private\n         * @type {?function():void}\n         */\n        _this.unli
 sten_ = null;\n        /**\n         * @private\n         * @type {import(\"../ImageState.js\").default}\n         */\n        _this.imageState_ = imageState;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.size_ = size;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.src_ = src;\n        /**\n         * @private\n         */\n        _this.tainted_;\n        return _this;\n    }\n    /**\n     * @private\n     * @return {boolean} The image canvas is tainted.\n     */\n    IconImage.prototype.isTainted_ = function () {\n        if (this.tainted_ === undefined && this.imageState_ === ImageState.LOADED) {\n            if (!taintedTestContext) {\n                taintedTestContext = createCanvasContext2D(1, 1);\n            }\n            taintedTestContext.drawImage(this.image_, 0, 0);\n            try {\n                taintedTestContext.getImageData(0, 0, 1, 1);\n       
          this.tainted_ = false;\n            }\n            catch (e) {\n                taintedTestContext = null;\n                this.tainted_ = true;\n            }\n        }\n        return this.tainted_ === true;\n    };\n    /**\n     * @private\n     */\n    IconImage.prototype.dispatchChangeEvent_ = function () {\n        this.dispatchEvent(EventType.CHANGE);\n    };\n    /**\n     * @private\n     */\n    IconImage.prototype.handleImageError_ = function () {\n        this.imageState_ = ImageState.ERROR;\n        this.unlistenImage_();\n        this.dispatchChangeEvent_();\n    };\n    /**\n     * @private\n     */\n    IconImage.prototype.handleImageLoad_ = function () {\n        this.imageState_ = ImageState.LOADED;\n        if (this.size_) {\n            this.image_.width = this.size_[0];\n            this.image_.height = this.size_[1];\n        }\n        else {\n            this.size_ = [this.image_.width, this.image_.height];\n        }\n        this.unlistenImage_(
 );\n        this.dispatchChangeEvent_();\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n     */\n    IconImage.prototype.getImage = function (pixelRatio) {\n        this.replaceColor_(pixelRatio);\n        return this.canvas_[pixelRatio] ? this.canvas_[pixelRatio] : this.image_;\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Image or Canvas element.\n     */\n    IconImage.prototype.getPixelRatio = function (pixelRatio) {\n        this.replaceColor_(pixelRatio);\n        return this.canvas_[pixelRatio] ? pixelRatio : 1;\n    };\n    /**\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    IconImage.prototype.getImageState = function () {\n        return this.imageState_;\n    };\n    /**\n     * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n     */\n    IconImage.prototype.getHitDetectionImage = functi
 on () {\n        if (!this.hitDetectionImage_) {\n            if (this.isTainted_()) {\n                var width = this.size_[0];\n                var height = this.size_[1];\n                var context = createCanvasContext2D(width, height);\n                context.fillRect(0, 0, width, height);\n                this.hitDetectionImage_ = context.canvas;\n            }\n            else {\n                this.hitDetectionImage_ = this.image_;\n            }\n        }\n        return this.hitDetectionImage_;\n    };\n    /**\n     * Get the size of the icon (in pixels).\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    IconImage.prototype.getSize = function () {\n        return this.size_;\n    };\n    /**\n     * @return {string|undefined} Image src.\n     */\n    IconImage.prototype.getSrc = function () {\n        return this.src_;\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    IconImage.prototype.load = function () {\n        if (this.im
 ageState_ == ImageState.IDLE) {\n            this.imageState_ = ImageState.LOADING;\n            try {\n                /** @type {HTMLImageElement} */ (this.image_).src = this.src_;\n            }\n            catch (e) {\n                this.handleImageError_();\n            }\n            this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n        }\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @private\n     */\n    IconImage.prototype.replaceColor_ = function (pixelRatio) {\n        if (!this.color_ || this.canvas_[pixelRatio]) {\n            return;\n        }\n        var canvas = document.createElement('canvas');\n        this.canvas_[pixelRatio] = canvas;\n        canvas.width = Math.ceil(this.image_.width * pixelRatio);\n        canvas.height = Math.ceil(this.image_.height * pixelRatio);\n        var ctx = canvas.getContext('2d');\n        ctx.scale(pixelRatio, pixelRatio);\n        ct
 x.drawImage(this.image_, 0, 0);\n        if (this.isTainted_()) {\n            // If reading from the canvas throws a SecurityError the same effect can be\n            // achieved with globalCompositeOperation.\n            // This could be used as the default, but it is not fully supported by all\n            // browsers. E. g. Internet Explorer 11 does not support the multiply\n            // operation and the resulting image shape will be completelly filled with\n            // the provided color.\n            // So this is only used as a fallback. It is still better than having no icon\n            // at all.\n            var c = this.color_;\n            ctx.globalCompositeOperation = 'multiply';\n            ctx.fillStyle = 'rgb(' + c[0] + ',' + c[1] + ',' + c[2] + ')';\n            ctx.fillRect(0, 0, canvas.width, canvas.height);\n            ctx.globalCompositeOperation = 'destination-in';\n            ctx.drawImage(this.image_, 0, 0);\n            return;\n        }\n      
   var imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n        var data = imgData.data;\n        var r = this.color_[0] / 255.0;\n        var g = this.color_[1] / 255.0;\n        var b = this.color_[2] / 255.0;\n        for (var i = 0, ii = data.length; i < ii; i += 4) {\n            data[i] *= r;\n            data[i + 1] *= g;\n            data[i + 2] *= b;\n        }\n        ctx.putImageData(imgData, 0, 0);\n    };\n    /**\n     * Discards event handlers which listen for load completion or errors.\n     *\n     * @private\n     */\n    IconImage.prototype.unlistenImage_ = function () {\n        if (this.unlisten_) {\n            this.unlisten_();\n            this.unlisten_ = null;\n        }\n    };\n    return IconImage;\n}(EventTarget));\n/**\n * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n * @param {string} src Src.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../ImageStat
 e.js\").default} imageState Image state.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {IconImage} Icon image.\n */\nexport function get(image, src, size, crossOrigin, imageState, color) {\n    var iconImage = iconImageCache.get(src, crossOrigin, color);\n    if (!iconImage) {\n        iconImage = new IconImage(image, src, size, crossOrigin, imageState, color);\n        iconImageCache.set(src, crossOrigin, color, iconImage);\n    }\n    return iconImage;\n}\nexport default IconImage;\n//# sourceMappingURL=IconImage.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n     
    function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/style/Icon\n */\nimport EventType from '../events/EventType.js';\nimport IconAnchorUnits from './IconAnchorUnits.js';\nimport IconOrigin from './IconOrigin.js';\nimport ImageState from '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport { asArray } from '../color.js';\nimport { assert } from '../asserts.js';\nimport { get as getIconImage } from './IconImage.js';\nimport { getUid } from '../util.js';\n/**\n * @typedef {Object} Options\n * @property {Array<number>} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {import(\"./IconOrigin.js\").default} [anchorOrigin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorXUnits='fraction'] Units in which the anchor x value i
 s\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorYUnits='fraction'] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A value of `'pixels'` indicates\n * the y value in pixels.\n * @property {import(\"../color.js\").Color|string} [color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the\n * provided image mu
 st already be loaded. And in that case, it is required\n * to provide the size of the image, with the `imgSize` option.\n * @property {Array<number>} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the\n * sub-rectangle to use from the original icon image.\n * @property {Array<number>} [displacement=[0,0]] Displacement the icon\n * @property {import(\"./IconOrigin.js\").default} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {number} [opacity=1] Opacity of the icon.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {import(\"../size.js\").Size} [size] Icon size in pixel. Can be used together with `offset` to define the\n * sub-rectangle to use from the origin (sprite)
  icon image.\n * @property {import(\"../size.js\").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not, and\n * for SVG images in Internet Explorer 11. The provided `imgSize` needs to match the actual size of the image.\n * @property {string} [src] Image source URI.\n */\n/**\n * @classdesc\n * Set icon style for vector features.\n * @api\n */\nvar Icon = /** @class */ (function (_super) {\n    __extends(Icon, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Icon(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        /**\n         * @type {number}\n         */\n        var opacity = options.opacity !== undefined ? options.opacity : 1;\n        /**\n         * @type {number}\n         */\n        var rotation = options.rotation !== undefined ? options.rotation : 0;\n        /**\n         * @type {number|import(\"../size.js\").Size}\n         */\n        var scale = options.sc
 ale !== undefined ? options.scale : 1;\n        /**\n         * @type {boolean}\n         */\n        var rotateWithView = options.rotateWithView !== undefined ? options.rotateWithView : false;\n        _this = _super.call(this, {\n            opacity: opacity,\n            rotation: rotation,\n            scale: scale,\n            displacement: options.displacement !== undefined ? options.displacement : [0, 0],\n            rotateWithView: rotateWithView,\n        }) || this;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.normalizedAnchor_ = null;\n        /**\n         * @private\n         * @type {import(\"./IconOrigin.js\").default}\n         */\n        _this.anchorOrigin_ =\n            options.anchorOrigin !== undefined\n                ? options.anchorOrigin\n   
              : IconOrigin.TOP_LEFT;\n        /**\n         * @private\n         * @type {import(\"./IconAnchorUnits.js\").default}\n         */\n        _this.anchorXUnits_ =\n            options.anchorXUnits !== undefined\n                ? options.anchorXUnits\n                : IconAnchorUnits.FRACTION;\n        /**\n         * @private\n         * @type {import(\"./IconAnchorUnits.js\").default}\n         */\n        _this.anchorYUnits_ =\n            options.anchorYUnits !== undefined\n                ? options.anchorYUnits\n                : IconAnchorUnits.FRACTION;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @type {HTMLImageElement|HTMLCanvasElement}\n         */\n        var image = options.img !== undefined ? options.img : null;\n        /**\n         * @type {import(\"../size.js\").Size}\n         */\n        va
 r imgSize = options.imgSize !== undefined ? options.imgSize : null;\n        /**\n         * @type {string|undefined}\n         */\n        var src = options.src;\n        assert(!(src !== undefined && image), 4); // `image` and `src` cannot be provided at the same time\n        assert(!image || (image && imgSize), 5); // `imgSize` must be set when `image` is provided\n        if ((src === undefined || src.length === 0) && image) {\n            src = /** @type {HTMLImageElement} */ (image).src || getUid(image);\n        }\n        assert(src !== undefined && src.length > 0, 6); // A defined and non-empty `src` or `image` must be provided\n        /**\n         * @type {import(\"../ImageState.js\").default}\n         */\n        var imageState = options.src !== undefined ? ImageState.IDLE : ImageState.LOADED;\n        /**\n         * @private\n         * @type {import(\"../color.js\").Color}\n         */\n        _this.color_ = options.color !== undefined ? asArray(options.color) : n
 ull;\n        /**\n         * @private\n         * @type {import(\"./IconImage.js\").default}\n         */\n        _this.iconImage_ = getIconImage(image, \n        /** @type {string} */ (src), imgSize, _this.crossOrigin_, imageState, _this.color_);\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.offset_ = options.offset !== undefined ? options.offset : [0, 0];\n        /**\n         * @private\n         * @type {import(\"./IconOrigin.js\").default}\n         */\n        _this.offsetOrigin_ =\n            options.offsetOrigin !== undefined\n                ? options.offsetOrigin\n                : IconOrigin.TOP_LEFT;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.origin_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.size_ = options.size !== undefined ? options.size : null;\n        return _this;\n    }\n    /**\n   
   * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.\n     * @return {Icon} The cloned style.\n     * @api\n     */\n    Icon.prototype.clone = function () {\n        var scale = this.getScale();\n        return new Icon({\n            anchor: this.anchor_.slice(),\n            anchorOrigin: this.anchorOrigin_,\n            anchorXUnits: this.anchorXUnits_,\n            anchorYUnits: this.anchorYUnits_,\n            crossOrigin: this.crossOrigin_,\n            color: this.color_ && this.color_.slice\n                ? this.color_.slice()\n                : this.color_ || undefined,\n            src: this.getSrc(),\n            offset: this.offset_.slice(),\n            offsetOrigin: this.offsetOrigin_,\n            size: this.size_ !== null ? this.size_.slice() : undefined,\n            opacity: this.getOpacity(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            rotation: this.getRotation(),\n            rotateWithView: this.getRo
 tateWithView(),\n        });\n    };\n    /**\n     * Get the anchor point in pixels. The anchor determines the center point for the\n     * symbolizer.\n     * @return {Array<number>} Anchor.\n     * @api\n     */\n    Icon.prototype.getAnchor = function () {\n        if (this.normalizedAnchor_) {\n            return this.normalizedAnchor_;\n        }\n        var anchor = this.anchor_;\n        var size = this.getSize();\n        if (this.anchorXUnits_ == IconAnchorUnits.FRACTION ||\n            this.anchorYUnits_ == IconAnchorUnits.FRACTION) {\n            if (!size) {\n                return null;\n            }\n            anchor = this.anchor_.slice();\n            if (this.anchorXUnits_ == IconAnchorUnits.FRACTION) {\n                anchor[0] *= size[0];\n            }\n            if (this.anchorYUnits_ == IconAnchorUnits.FRACTION) {\n                anchor[1] *= size[1];\n            }\n        }\n        if (this.anchorOrigin_ != IconOrigin.TOP_LEFT) {\n            if (!
 size) {\n                return null;\n            }\n            if (anchor === this.anchor_) {\n                anchor = this.anchor_.slice();\n            }\n            if (this.anchorOrigin_ == IconOrigin.TOP_RIGHT ||\n                this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                anchor[0] = -anchor[0] + size[0];\n            }\n            if (this.anchorOrigin_ == IconOrigin.BOTTOM_LEFT ||\n                this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                anchor[1] = -anchor[1] + size[1];\n            }\n        }\n        this.normalizedAnchor_ = anchor;\n        return this.normalizedAnchor_;\n    };\n    /**\n     * Set the anchor point. The anchor determines the center point for the\n     * symbolizer.\n     *\n     * @param {Array<number>} anchor Anchor.\n     * @api\n     */\n    Icon.prototype.setAnchor = function (anchor) {\n        this.anchor_ = anchor;\n        this.normalizedAnchor_ = null;\n    };\n    /**\n     * Get the icon 
 color.\n     * @return {import(\"../color.js\").Color} Color.\n     * @api\n     */\n    Icon.prototype.getColor = function () {\n        return this.color_;\n    };\n    /**\n     * Get the image icon.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n     * @api\n     */\n    Icon.prototype.getImage = function (pixelRatio) {\n        return this.iconImage_.getImage(pixelRatio);\n    };\n    /**\n     * Get the pixel ratio.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} The pixel ration of the image.\n     * @api\n     */\n    Icon.prototype.getPixelRatio = function (pixelRatio) {\n        return this.iconImage_.getPixelRatio(pixelRatio);\n    };\n    /**\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    Icon.prototype.getImageSize = function () {\n        return this.iconImage_.getSize();\n    };\n    /**\n     * @return {import(\"../size.js\").Size} Size of
  the hit-detection image.\n     */\n    Icon.prototype.getHitDetectionImageSize = function () {\n        return this.getImageSize();\n    };\n    /**\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    Icon.prototype.getImageState = function () {\n        return this.iconImage_.getImageState();\n    };\n    /**\n     * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n     */\n    Icon.prototype.getHitDetectionImage = function () {\n        return this.iconImage_.getHitDetectionImage();\n    };\n    /**\n     * Get the origin of the symbolizer.\n     * @return {Array<number>} Origin.\n     * @api\n     */\n    Icon.prototype.getOrigin = function () {\n        if (this.origin_) {\n            return this.origin_;\n        }\n        var offset = this.offset_;\n        var displacement = this.getDisplacement();\n        if (this.offsetOrigin_ != IconOrigin.TOP_LEFT) {\n            var size = this.getSize();\n            var iconImageSize = this
 .iconImage_.getSize();\n            if (!size || !iconImageSize) {\n                return null;\n            }\n            offset = offset.slice();\n            if (this.offsetOrigin_ == IconOrigin.TOP_RIGHT ||\n                this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                offset[0] = iconImageSize[0] - size[0] - offset[0];\n            }\n            if (this.offsetOrigin_ == IconOrigin.BOTTOM_LEFT ||\n                this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                offset[1] = iconImageSize[1] - size[1] - offset[1];\n            }\n        }\n        offset[0] += displacement[0];\n        offset[1] += displacement[1];\n        this.origin_ = offset;\n        return this.origin_;\n    };\n    /**\n     * Get the image URL.\n     * @return {string|undefined} Image src.\n     * @api\n     */\n    Icon.prototype.getSrc = function () {\n        return this.iconImage_.getSrc();\n    };\n    /**\n     * Get the size of the icon (in pixels).\n     * 
 @return {import(\"../size.js\").Size} Image size.\n     * @api\n     */\n    Icon.prototype.getSize = function () {\n        return !this.size_ ? this.iconImage_.getSize() : this.size_;\n    };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    Icon.prototype.listenImageChange = function (listener) {\n        this.iconImage_.addEventListener(EventType.CHANGE, listener);\n    };\n    /**\n     * Load not yet loaded URI.\n     * When rendering a feature with an icon style, the vector renderer will\n     * automatically call this method. However, you might want to call this\n     * method yourself for preloading or other purposes.\n     * @api\n     */\n    Icon.prototype.load = function () {\n        this.iconImage_.load();\n    };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    Icon.prototype.unlistenImageChange = function (listener) {\n  
       this.iconImage_.removeEventListener(EventType.CHANGE, listener);\n    };\n    return Icon;\n}(ImageStyle));\nexport default Icon;\n//# sourceMappingURL=Icon.js.map","/**\n * @module ol/style/Stroke\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n * @property {CanvasLineCap} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array<number>} [lineDash] Line dash pattern. Default is `null` (no dash).\n * Please note that Internet Explorer 10 and lower do not support the `setLineDash` method on\n * the `CanvasRenderingContext2D` and therefore this option will have no visua
 l effect in these browsers.\n * @property {number} [lineDashOffset=0] Line dash offset.\n * @property {number} [miterLimit=10] Miter limit.\n * @property {number} [width] Width.\n */\n/**\n * @classdesc\n * Set stroke style for vector features.\n * Note that the defaults given are the Canvas defaults, which will be used if\n * option is not defined. The `get` functions return whatever was entered in\n * the options; they will not return the default.\n * @api\n */\nvar Stroke = /** @class */ (function () {\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Stroke(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n         */\n        this.color_ = options.color !== undefined ? options.color : null;\n        /**\n         * @private\n         * @type {CanvasLineCap|undefined}\n         */\n        this.lineCap_ = options.lineCap;\
 n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.lineDashOffset_ = options.lineDashOffset;\n        /**\n         * @private\n         * @type {CanvasLineJoin|undefined}\n         */\n        this.lineJoin_ = options.lineJoin;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.miterLimit_ = options.miterLimit;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.width_ = options.width;\n    }\n    /**\n     * Clones the style.\n     * @return {Stroke} The cloned style.\n     * @api\n     */\n    Stroke.prototype.clone = function () {\n        var color = this.getColor();\n        return new Stroke({\n            color: Array.isArray(color) ? color.slice() : color || undefined,\n    
         lineCap: this.getLineCap(),\n            lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,\n            lineDashOffset: this.getLineDashOffset(),\n            lineJoin: this.getLineJoin(),\n            miterLimit: this.getMiterLimit(),\n            width: this.getWidth(),\n        });\n    };\n    /**\n     * Get the stroke color.\n     * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n     * @api\n     */\n    Stroke.prototype.getColor = function () {\n        return this.color_;\n    };\n    /**\n     * Get the line cap type for the stroke.\n     * @return {CanvasLineCap|undefined} Line cap.\n     * @api\n     */\n    Stroke.prototype.getLineCap = function () {\n        return this.lineCap_;\n    };\n    /**\n     * Get the line dash style for the stroke.\n     * @return {Array<number>} Line dash.\n     * @api\n     */\n    Stroke.prototype.getLineDash = function () {\n        return this.lineDash_;\n    };\n    /*
 *\n     * Get the line dash offset for the stroke.\n     * @return {number|undefined} Line dash offset.\n     * @api\n     */\n    Stroke.prototype.getLineDashOffset = function () {\n        return this.lineDashOffset_;\n    };\n    /**\n     * Get the line join type for the stroke.\n     * @return {CanvasLineJoin|undefined} Line join.\n     * @api\n     */\n    Stroke.prototype.getLineJoin = function () {\n        return this.lineJoin_;\n    };\n    /**\n     * Get the miter limit for the stroke.\n     * @return {number|undefined} Miter limit.\n     * @api\n     */\n    Stroke.prototype.getMiterLimit = function () {\n        return this.miterLimit_;\n    };\n    /**\n     * Get the stroke width.\n     * @return {number|undefined} Width.\n     * @api\n     */\n    Stroke.prototype.getWidth = function () {\n        return this.width_;\n    };\n    /**\n     * Set the color.\n     *\n     * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n    
  * @api\n     */\n    Stroke.prototype.setColor = function (color) {\n        this.color_ = color;\n    };\n    /**\n     * Set the line cap.\n     *\n     * @param {CanvasLineCap|undefined} lineCap Line cap.\n     * @api\n     */\n    Stroke.prototype.setLineCap = function (lineCap) {\n        this.lineCap_ = lineCap;\n    };\n    /**\n     * Set the line dash.\n     *\n     * Please note that Internet Explorer 10 and lower [do not support][mdn] the\n     * `setLineDash` method on the `CanvasRenderingContext2D` and therefore this\n     * property will have no visual effect in these browsers.\n     *\n     * [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility\n     *\n     * @param {Array<number>} lineDash Line dash.\n     * @api\n     */\n    Stroke.prototype.setLineDash = function (lineDash) {\n        this.lineDash_ = lineDash;\n    };\n    /**\n     * Set the line dash offset.\n     *\n     * @param {number|undefined
 } lineDashOffset Line dash offset.\n     * @api\n     */\n    Stroke.prototype.setLineDashOffset = function (lineDashOffset) {\n        this.lineDashOffset_ = lineDashOffset;\n    };\n    /**\n     * Set the line join.\n     *\n     * @param {CanvasLineJoin|undefined} lineJoin Line join.\n     * @api\n     */\n    Stroke.prototype.setLineJoin = function (lineJoin) {\n        this.lineJoin_ = lineJoin;\n    };\n    /**\n     * Set the miter limit.\n     *\n     * @param {number|undefined} miterLimit Miter limit.\n     * @api\n     */\n    Stroke.prototype.setMiterLimit = function (miterLimit) {\n        this.miterLimit_ = miterLimit;\n    };\n    /**\n     * Set the width.\n     *\n     * @param {number|undefined} width Width.\n     * @api\n     */\n    Stroke.prototype.setWidth = function (width) {\n        this.width_ = width;\n    };\n    return Stroke;\n}());\nexport default Stroke;\n//# sourceMappingURL=Stroke.js.map","/**\n * @module ol/style/Style\n */\nimport CircleStyle from
  './Circle.js';\nimport Fill from './Fill.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Stroke from './Stroke.js';\nimport { assert } from '../asserts.js';\n/**\n * A function that takes an {@link module:ol/Feature} and a `{number}`\n * representing the view's resolution. The function should return a\n * {@link module:ol/style/Style} or an array of them. This way e.g. a\n * vector layer can be styled. If the function returns `undefined`, the\n * feature will not be rendered.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array<Style>|void)} StyleFunction\n */\n/**\n * A {@link Style}, an array of {@link Style}, or a {@link StyleFunction}.\n * @typedef {Style|Array<Style>|StyleFunction} StyleLike\n */\n/**\n * A function that takes an {@link module:ol/Feature} as argument and returns an\n * {@link module:ol/geom/Geometry} that will be rendered and styled for the feature.\n *\n * @typedef {function(import(\"../Feature.js\").Feature
 Like):\n *     (import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined)} GeometryFunction\n */\n/**\n * Custom renderer function. Takes two arguments:\n *\n * 1. The pixel coordinates of the geometry in GeoJSON notation.\n * 2. The {@link module:ol/render~State} of the layer renderer.\n *\n * @typedef {function((import(\"../coordinate.js\").Coordinate|Array<import(\"../coordinate.js\").Coordinate>|Array<Array<import(\"../coordinate.js\").Coordinate>>),import(\"../render.js\").State): void}\n * RenderFunction\n */\n/**\n * @typedef {Object} Options\n * @property {string|import(\"../geom/Geometry.js\").default|GeometryFunction} [geometry] Feature property or geometry\n * or function returning a geometry to render for this style.\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {import(\"./Image.js\").default} [image] Image style.\n * @property {RenderFunction} [renderer] Custom renderer. When configured, `fill`, `stroke
 ` and `image` will be\n * ignored, and the provided function will be called with each render frame for each geometry.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Text.js\").default} [text] Text style.\n * @property {number} [zIndex] Z index.\n */\n/**\n * @classdesc\n * Container for vector feature rendering styles. Any changes made to the style\n * or its children through `set*()` methods will not take effect until the\n * feature or layer that uses the style is re-rendered.\n *\n * ## Feature styles\n *\n * If no style is defined, the following default style is used:\n * ```js\n *  import {Fill, Stroke, Circle, Style} from 'ol/style';\n *\n *  var fill = new Fill({\n *    color: 'rgba(255,255,255,0.4)'\n *  });\n *  var stroke = new Stroke({\n *    color: '#3399CC',\n *    width: 1.25\n *  });\n *  var styles = [\n *    new Style({\n *      image: new Circle({\n *        fill: fill,\n *        stroke: stroke,\n *        radius: 
 5\n *      }),\n *      fill: fill,\n *      stroke: stroke\n *    })\n *  ];\n * ```\n *\n * A separate editing style has the following defaults:\n * ```js\n *  import {Fill, Stroke, Circle, Style} from 'ol/style';\n *  import GeometryType from 'ol/geom/GeometryType';\n *\n *  var white = [255, 255, 255, 1];\n *  var blue = [0, 153, 255, 1];\n *  var width = 3;\n *  styles[GeometryType.POLYGON] = [\n *    new Style({\n *      fill: new Fill({\n *        color: [255, 255, 255, 0.5]\n *      })\n *    })\n *  ];\n *  styles[GeometryType.MULTI_POLYGON] =\n *      styles[GeometryType.POLYGON];\n *  styles[GeometryType.LINE_STRING] = [\n *    new Style({\n *      stroke: new Stroke({\n *        color: white,\n *        width: width + 2\n *      })\n *    }),\n *    new Style({\n *      stroke: new Stroke({\n *        color: blue,\n *        width: width\n *      })\n *    })\n *  ];\n *  styles[GeometryType.MULTI_LINE_STRING] =\n *      styles[GeometryType.LINE_STRING];\n *  styles[Geom
 etryType.POINT] = [\n *    new Style({\n *      image: new Circle({\n *        radius: width * 2,\n *        fill: new Fill({\n *          color: blue\n *        }),\n *        stroke: new Stroke({\n *          color: white,\n *          width: width / 2\n *        })\n *      }),\n *      zIndex: Infinity\n *    })\n *  ];\n *  styles[GeometryType.MULTI_POINT] =\n *      styles[GeometryType.POINT];\n *  styles[GeometryType.GEOMETRY_COLLECTION] =\n *      styles[GeometryType.POLYGON].concat(\n *          styles[GeometryType.LINE_STRING],\n *          styles[GeometryType.POINT]\n *      );\n * ```\n *\n * @api\n */\nvar Style = /** @class */ (function () {\n    /**\n     * @param {Options=} opt_options Style options.\n     */\n    function Style(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n         */\n        this.geometry_ = null;\n        /**\n        
  * @private\n         * @type {!GeometryFunction}\n         */\n        this.geometryFunction_ = defaultGeometryFunction;\n        if (options.geometry !== undefined) {\n            this.setGeometry(options.geometry);\n        }\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default}\n         */\n        this.fill_ = options.fill !== undefined ? options.fill : null;\n        /**\n         * @private\n         * @type {import(\"./Image.js\").default}\n         */\n        this.image_ = options.image !== undefined ? options.image : null;\n        /**\n         * @private\n         * @type {RenderFunction|null}\n         */\n        this.renderer_ = options.renderer !== undefined ? options.renderer : null;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n         * @private\n         * @type {import(\"./Text.js\").def
 ault}\n         */\n        this.text_ = options.text !== undefined ? options.text : null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.zIndex_ = options.zIndex;\n    }\n    /**\n     * Clones the style.\n     * @return {Style} The cloned style.\n     * @api\n     */\n    Style.prototype.clone = function () {\n        var geometry = this.getGeometry();\n        if (geometry && typeof geometry === 'object') {\n            geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (geometry).clone();\n        }\n        return new Style({\n            geometry: geometry,\n            fill: this.getFill() ? this.getFill().clone() : undefined,\n            image: this.getImage() ? this.getImage().clone() : undefined,\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            text: this.getText() ? this.getText().clone() : undefined,\n            zIndex: this.getZIndex(),\n        });\n    };\n   
  /**\n     * Get the custom renderer function that was configured with\n     * {@link #setRenderer} or the `renderer` constructor option.\n     * @return {RenderFunction|null} Custom renderer function.\n     * @api\n     */\n    Style.prototype.getRenderer = function () {\n        return this.renderer_;\n    };\n    /**\n     * Sets a custom renderer function for this style. When set, `fill`, `stroke`\n     * and `image` options of the style will be ignored.\n     * @param {RenderFunction|null} renderer Custom renderer function.\n     * @api\n     */\n    Style.prototype.setRenderer = function (renderer) {\n        this.renderer_ = renderer;\n    };\n    /**\n     * Get the geometry to be rendered.\n     * @return {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n     * Feature property or geometry or function that returns the geometry that will\n     * be rendered with this style.\n     * @api\n     */\n    Style.prototype.getGeometry = function () {\n        retur
 n this.geometry_;\n    };\n    /**\n     * Get the function used to generate a geometry for rendering.\n     * @return {!GeometryFunction} Function that is called with a feature\n     * and returns the geometry to render instead of the feature's geometry.\n     * @api\n     */\n    Style.prototype.getGeometryFunction = function () {\n        return this.geometryFunction_;\n    };\n    /**\n     * Get the fill style.\n     * @return {import(\"./Fill.js\").default} Fill style.\n     * @api\n     */\n    Style.prototype.getFill = function () {\n        return this.fill_;\n    };\n    /**\n     * Set the fill style.\n     * @param {import(\"./Fill.js\").default} fill Fill style.\n     * @api\n     */\n    Style.prototype.setFill = function (fill) {\n        this.fill_ = fill;\n    };\n    /**\n     * Get the image style.\n     * @return {import(\"./Image.js\").default} Image style.\n     * @api\n     */\n    Style.prototype.getImage = function () {\n        return this.image_;\n    };\n
     /**\n     * Set the image style.\n     * @param {import(\"./Image.js\").default} image Image style.\n     * @api\n     */\n    Style.prototype.setImage = function (image) {\n        this.image_ = image;\n    };\n    /**\n     * Get the stroke style.\n     * @return {import(\"./Stroke.js\").default} Stroke style.\n     * @api\n     */\n    Style.prototype.getStroke = function () {\n        return this.stroke_;\n    };\n    /**\n     * Set the stroke style.\n     * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n     * @api\n     */\n    Style.prototype.setStroke = function (stroke) {\n        this.stroke_ = stroke;\n    };\n    /**\n     * Get the text style.\n     * @return {import(\"./Text.js\").default} Text style.\n     * @api\n     */\n    Style.prototype.getText = function () {\n        return this.text_;\n    };\n    /**\n     * Set the text style.\n     * @param {import(\"./Text.js\").default} text Text style.\n     * @api\n     */\n    Style.prototype.setT
 ext = function (text) {\n        this.text_ = text;\n    };\n    /**\n     * Get the z-index for the style.\n     * @return {number|undefined} ZIndex.\n     * @api\n     */\n    Style.prototype.getZIndex = function () {\n        return this.zIndex_;\n    };\n    /**\n     * Set a geometry that is rendered instead of the feature's geometry.\n     *\n     * @param {string|import(\"../geom/Geometry.js\").default|GeometryFunction} geometry\n     *     Feature property or geometry or function returning a geometry to render\n     *     for this style.\n     * @api\n     */\n    Style.prototype.setGeometry = function (geometry) {\n        if (typeof geometry === 'function') {\n            this.geometryFunction_ = geometry;\n        }\n        else if (typeof geometry === 'string') {\n            this.geometryFunction_ = function (feature) {\n                return /** @type {import(\"../geom/Geometry.js\").default} */ (feature.get(geometry));\n            };\n        }\n        else if (!g
 eometry) {\n            this.geometryFunction_ = defaultGeometryFunction;\n        }\n        else if (geometry !== undefined) {\n            this.geometryFunction_ = function () {\n                return /** @type {import(\"../geom/Geometry.js\").default} */ (geometry);\n            };\n        }\n        this.geometry_ = geometry;\n    };\n    /**\n     * Set the z-index.\n     *\n     * @param {number|undefined} zIndex ZIndex.\n     * @api\n     */\n    Style.prototype.setZIndex = function (zIndex) {\n        this.zIndex_ = zIndex;\n    };\n    return Style;\n}());\n/**\n * Convert the provided object into a style function.  Functions passed through\n * unchanged.  Arrays of Style or single style objects wrapped in a\n * new style function.\n * @param {StyleFunction|Array<Style>|Style} obj\n *     A style function, a single style, or an array of styles.\n * @return {StyleFunction} A style function.\n */\nexport function toFunction(obj) {\n    var styleFunction;\n    if (typeof ob
 j === 'function') {\n        styleFunction = obj;\n    }\n    else {\n        /**\n         * @type {Array<Style>}\n         */\n        var styles_1;\n        if (Array.isArray(obj)) {\n            styles_1 = obj;\n        }\n        else {\n            assert(typeof ( /** @type {?} */(obj).getZIndex) === 'function', 41); // Expected an `Style` or an array of `Style`\n            var style = /** @type {Style} */ (obj);\n            styles_1 = [style];\n        }\n        styleFunction = function () {\n            return styles_1;\n        };\n    }\n    return styleFunction;\n}\n/**\n * @type {Array<Style>}\n */\nvar defaultStyles = null;\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} resolution Resolution.\n * @return {Array<Style>} Style.\n */\nexport function createDefaultStyle(feature, resolution) {\n    // We don't use an immediately-invoked function\n    // and a closure so we don't get an error at script evaluation time in\n    /
 / browsers that do not support Canvas. (import(\"./Circle.js\").CircleStyle does\n    // canvas.getContext('2d') at construction time, which will cause an.error\n    // in such browsers.)\n    if (!defaultStyles) {\n        var fill = new Fill({\n            color: 'rgba(255,255,255,0.4)',\n        });\n        var stroke = new Stroke({\n            color: '#3399CC',\n            width: 1.25,\n        });\n        defaultStyles = [\n            new Style({\n                image: new CircleStyle({\n                    fill: fill,\n                    stroke: stroke,\n                    radius: 5,\n                }),\n                fill: fill,\n                stroke: stroke,\n            }),\n        ];\n    }\n    return defaultStyles;\n}\n/**\n * Default styles for editing features.\n * @return {Object<import(\"../geom/GeometryType.js\").default, Array<Style>>} Styles\n */\nexport function createEditingStyle() {\n    /** @type {Object<import(\"../geom/GeometryType.js\").defaul
 t, Array<Style>>} */\n    var styles = {};\n    var white = [255, 255, 255, 1];\n    var blue = [0, 153, 255, 1];\n    var width = 3;\n    styles[GeometryType.POLYGON] = [\n        new Style({\n            fill: new Fill({\n                color: [255, 255, 255, 0.5],\n            }),\n        }),\n    ];\n    styles[GeometryType.MULTI_POLYGON] = styles[GeometryType.POLYGON];\n    styles[GeometryType.LINE_STRING] = [\n        new Style({\n            stroke: new Stroke({\n                color: white,\n                width: width + 2,\n            }),\n        }),\n        new Style({\n            stroke: new Stroke({\n                color: blue,\n                width: width,\n            }),\n        }),\n    ];\n    styles[GeometryType.MULTI_LINE_STRING] = styles[GeometryType.LINE_STRING];\n    styles[GeometryType.CIRCLE] = styles[GeometryType.POLYGON].concat(styles[GeometryType.LINE_STRING]);\n    styles[GeometryType.POINT] = [\n        new Style({\n            image: new Circ
 leStyle({\n                radius: width * 2,\n                fill: new Fill({\n                    color: blue,\n                }),\n                stroke: new Stroke({\n                    color: white,\n                    width: width / 2,\n                }),\n            }),\n            zIndex: Infinity,\n        }),\n    ];\n    styles[GeometryType.MULTI_POINT] = styles[GeometryType.POINT];\n    styles[GeometryType.GEOMETRY_COLLECTION] = styles[GeometryType.POLYGON].concat(styles[GeometryType.LINE_STRING], styles[GeometryType.POINT]);\n    return styles;\n}\n/**\n * Function that is called with a feature and returns its default geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature to get the geometry for.\n * @return {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined} Geometry to render.\n */\nfunction defaultGeometryFunction(feature) {\n    return feature.getGeometry();\n}\nexport default Style;\n//# sourceM
 appingURL=Style.js.map","/**\n * @module ol/style/TextPlacement\n */\n/**\n * Text placement. One of `'point'`, `'line'`. Default is `'point'`. Note that\n * `'line'` requires the underlying geometry to be a {@link module:ol/geom/LineString~LineString},\n * {@link module:ol/geom/Polygon~Polygon}, {@link module:ol/geom/MultiLineString~MultiLineString} or\n * {@link module:ol/geom/MultiPolygon~MultiPolygon}.\n * @enum {string}\n */\nexport default {\n    POINT: 'point',\n    LINE: 'line',\n};\n//# sourceMappingURL=TextPlacement.js.map","/**\n * @module ol/style/Text\n */\nimport Fill from './Fill.js';\nimport TextPlacement from './TextPlacement.js';\nimport { toSize } from '../size.js';\n/**\n * The default fill color to use if no fill was set at construction time; a\n * blackish `#333`.\n *\n * @const {string}\n */\nvar DEFAULT_FILL_COLOR = '#333';\n/**\n * @typedef {Object} Options\n * @property {string} [font] Font style as CSS 'font' value, see:\n * https://developer.mozilla.org/e
 n-US/docs/Web/API/CanvasRenderingContext2D/font. Default is '10px sans-serif'\n * @property {number} [maxAngle=Math.PI/4] When `placement` is set to `'line'`, allow a maximum angle between adjacent characters.\n * The expected value is in radians, and the default is 45° (`Math.PI / 4`).\n * @property {number} [offsetX=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {number} [offsetY=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {boolean} [overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed\n * the width of the polygon at the label position or the length of the path that it follows.\n * @property {import(\"./TextPlacement.js\").default|string} [placement='point'] Text placement.\n * @property {number|import(\"../size.js\").Size} [scale] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the text with the view.\n * @property {number} [rotat
 ion=0] Rotation in radians (positive rotation clockwise).\n * @property {string} [text] Text content.\n * @property {string} [textAlign] Text alignment. Possible values: 'left', 'right', 'center', 'end' or 'start'.\n * Default is 'center' for `placement: 'point'`. For `placement: 'line'`, the default is to let the renderer choose a\n * placement where `maxAngle` is not exceeded.\n * @property {string} [textBaseline='middle'] Text base line. Possible values: 'bottom', 'top', 'middle', 'alphabetic',\n * 'hanging', 'ideographic'.\n * @property {import(\"./Fill.js\").default} [fill] Fill style. If none is provided, we'll use a dark fill-style (#333).\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Fill.js\").default} [backgroundFill] Fill style for the text background when `placement` is\n * `'point'`. Default is no fill.\n * @property {import(\"./Stroke.js\").default} [backgroundStroke] Stroke style for the text background  when `placeme
 nt`\n * is `'point'`. Default is no stroke.\n * @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of\n * values in the array is `[top, right, bottom, left]`.\n */\n/**\n * @classdesc\n * Set text style for vector features.\n * @api\n */\nvar Text = /** @class */ (function () {\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Text(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.font_ = options.font;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.rotation_ = options.rotation;\n        /**\n         * @private\n         * @type {boolean|undefined}\n         */\n        this.rotateWithView_ = options.rotateWithView;\n        /**\n         * @private\n         * @type {number|import(\"../size.js\").Size|undefined}\n         */\n
         this.scale_ = options.scale;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        this.scaleArray_ = toSize(options.scale !== undefined ? options.scale : 1);\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.text_ = options.text;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.textAlign_ = options.textAlign;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.textBaseline_ = options.textBaseline;\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default}\n         */\n        this.fill_ =\n            options.fill !== undefined\n                ? options.fill\n                : new Fill({ color: DEFAULT_FILL_COLOR });\n        /**\n         * @private\n         * @type {number}\n         */\n        this.maxAngle_ =\n            options.maxAngle !== undefined
  ? options.maxAngle : Math.PI / 4;\n        /**\n         * @private\n         * @type {import(\"./TextPlacement.js\").default|string}\n         */\n        this.placement_ =\n            options.placement !== undefined ? options.placement : TextPlacement.POINT;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.overflow_ = !!options.overflow;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.offsetX_ = options.offsetX !== undefined ? options.offsetX : 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default}\n         */\n        this.backgroundFill_ = opt
 ions.backgroundFill\n            ? options.backgroundFill\n            : null;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        this.backgroundStroke_ = options.backgroundStroke\n            ? options.backgroundStroke\n            : null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.padding_ = options.padding === undefined ? null : options.padding;\n    }\n    /**\n     * Clones the style.\n     * @return {Text} The cloned style.\n     * @api\n     */\n    Text.prototype.clone = function () {\n        var scale = this.getScale();\n        return new Text({\n            font: this.getFont(),\n            placement: this.getPlacement(),\n            maxAngle: this.getMaxAngle(),\n            overflow: this.getOverflow(),\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            scale: Array.isArray(scale) ? scale.slice() : sc
 ale,\n            text: this.getText(),\n            textAlign: this.getTextAlign(),\n            textBaseline: this.getTextBaseline(),\n            fill: this.getFill() ? this.getFill().clone() : undefined,\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            offsetX: this.getOffsetX(),\n            offsetY: this.getOffsetY(),\n            backgroundFill: this.getBackgroundFill()\n                ? this.getBackgroundFill().clone()\n                : undefined,\n            backgroundStroke: this.getBackgroundStroke()\n                ? this.getBackgroundStroke().clone()\n                : undefined,\n            padding: this.getPadding(),\n        });\n    };\n    /**\n     * Get the `overflow` configuration.\n     * @return {boolean} Let text overflow the length of the path they follow.\n     * @api\n     */\n    Text.prototype.getOverflow = function () {\n        return this.overflow_;\n    };\n    /**\n     * Get the font name.\n     * @ret
 urn {string|undefined} Font.\n     * @api\n     */\n    Text.prototype.getFont = function () {\n        return this.font_;\n    };\n    /**\n     * Get the maximum angle between adjacent characters.\n     * @return {number} Angle in radians.\n     * @api\n     */\n    Text.prototype.getMaxAngle = function () {\n        return this.maxAngle_;\n    };\n    /**\n     * Get the label placement.\n     * @return {import(\"./TextPlacement.js\").default|string} Text placement.\n     * @api\n     */\n    Text.prototype.getPlacement = function () {\n        return this.placement_;\n    };\n    /**\n     * Get the x-offset for the text.\n     * @return {number} Horizontal text offset.\n     * @api\n     */\n    Text.prototype.getOffsetX = function () {\n        return this.offsetX_;\n    };\n    /**\n     * Get the y-offset for the text.\n     * @return {number} Vertical text offset.\n     * @api\n     */\n    Text.prototype.getOffsetY = function () {\n        return this.offsetY_;\n    };\n  
   /**\n     * Get the fill style for the text.\n     * @return {import(\"./Fill.js\").default} Fill style.\n     * @api\n     */\n    Text.prototype.getFill = function () {\n        return this.fill_;\n    };\n    /**\n     * Determine whether the text rotates with the map.\n     * @return {boolean|undefined} Rotate with map.\n     * @api\n     */\n    Text.prototype.getRotateWithView = function () {\n        return this.rotateWithView_;\n    };\n    /**\n     * Get the text rotation.\n     * @return {number|undefined} Rotation.\n     * @api\n     */\n    Text.prototype.getRotation = function () {\n        return this.rotation_;\n    };\n    /**\n     * Get the text scale.\n     * @return {number|import(\"../size.js\").Size|undefined} Scale.\n     * @api\n     */\n    Text.prototype.getScale = function () {\n        return this.scale_;\n    };\n    /**\n     * Get the symbolizer scale array.\n     * @return {import(\"../size.js\").Size} Scale array.\n     */\n    Text.prototype.getS
 caleArray = function () {\n        return this.scaleArray_;\n    };\n    /**\n     * Get the stroke style for the text.\n     * @return {import(\"./Stroke.js\").default} Stroke style.\n     * @api\n     */\n    Text.prototype.getStroke = function () {\n        return this.stroke_;\n    };\n    /**\n     * Get the text to be rendered.\n     * @return {string|undefined} Text.\n     * @api\n     */\n    Text.prototype.getText = function () {\n        return this.text_;\n    };\n    /**\n     * Get the text alignment.\n     * @return {string|undefined} Text align.\n     * @api\n     */\n    Text.prototype.getTextAlign = function () {\n        return this.textAlign_;\n    };\n    /**\n     * Get the text baseline.\n     * @return {string|undefined} Text baseline.\n     * @api\n     */\n    Text.prototype.getTextBaseline = function () {\n        return this.textBaseline_;\n    };\n    /**\n     * Get the background fill style for the text.\n     * @return {import(\"./Fill.js\").default} F
 ill style.\n     * @api\n     */\n    Text.prototype.getBackgroundFill = function () {\n        return this.backgroundFill_;\n    };\n    /**\n     * Get the background stroke style for the text.\n     * @return {import(\"./Stroke.js\").default} Stroke style.\n     * @api\n     */\n    Text.prototype.getBackgroundStroke = function () {\n        return this.backgroundStroke_;\n    };\n    /**\n     * Get the padding for the text.\n     * @return {Array<number>} Padding.\n     * @api\n     */\n    Text.prototype.getPadding = function () {\n        return this.padding_;\n    };\n    /**\n     * Set the `overflow` property.\n     *\n     * @param {boolean} overflow Let text overflow the path that it follows.\n     * @api\n     */\n    Text.prototype.setOverflow = function (overflow) {\n        this.overflow_ = overflow;\n    };\n    /**\n     * Set the font.\n     *\n     * @param {string|undefined} font Font.\n     * @api\n     */\n    Text.prototype.setFont = function (font) {\n      
   this.font_ = font;\n    };\n    /**\n     * Set the maximum angle between adjacent characters.\n     *\n     * @param {number} maxAngle Angle in radians.\n     * @api\n     */\n    Text.prototype.setMaxAngle = function (maxAngle) {\n        this.maxAngle_ = maxAngle;\n    };\n    /**\n     * Set the x offset.\n     *\n     * @param {number} offsetX Horizontal text offset.\n     * @api\n     */\n    Text.prototype.setOffsetX = function (offsetX) {\n        this.offsetX_ = offsetX;\n    };\n    /**\n     * Set the y offset.\n     *\n     * @param {number} offsetY Vertical text offset.\n     * @api\n     */\n    Text.prototype.setOffsetY = function (offsetY) {\n        this.offsetY_ = offsetY;\n    };\n    /**\n     * Set the text placement.\n     *\n     * @param {import(\"./TextPlacement.js\").default|string} placement Placement.\n     * @api\n     */\n    Text.prototype.setPlacement = function (placement) {\n        this.placement_ = placement;\n    };\n    /**\n     * Set whether
  to rotate the text with the view.\n     *\n     * @param {boolean} rotateWithView Rotate with map.\n     * @api\n     */\n    Text.prototype.setRotateWithView = function (rotateWithView) {\n        this.rotateWithView_ = rotateWithView;\n    };\n    /**\n     * Set the fill.\n     *\n     * @param {import(\"./Fill.js\").default} fill Fill style.\n     * @api\n     */\n    Text.prototype.setFill = function (fill) {\n        this.fill_ = fill;\n    };\n    /**\n     * Set the rotation.\n     *\n     * @param {number|undefined} rotation Rotation.\n     * @api\n     */\n    Text.prototype.setRotation = function (rotation) {\n        this.rotation_ = rotation;\n    };\n    /**\n     * Set the scale.\n     *\n     * @param {number|import(\"../size.js\").Size|undefined} scale Scale.\n     * @api\n     */\n    Text.prototype.setScale = function (scale) {\n        this.scale_ = scale;\n        this.scaleArray_ = toSize(scale !== undefined ? scale : 1);\n    };\n    /**\n     * Set the strok
 e.\n     *\n     * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n     * @api\n     */\n    Text.prototype.setStroke = function (stroke) {\n        this.stroke_ = stroke;\n    };\n    /**\n     * Set the text.\n     *\n     * @param {string|undefined} text Text.\n     * @api\n     */\n    Text.prototype.setText = function (text) {\n        this.text_ = text;\n    };\n    /**\n     * Set the text alignment.\n     *\n     * @param {string|undefined} textAlign Text align.\n     * @api\n     */\n    Text.prototype.setTextAlign = function (textAlign) {\n        this.textAlign_ = textAlign;\n    };\n    /**\n     * Set the text baseline.\n     *\n     * @param {string|undefined} textBaseline Text baseline.\n     * @api\n     */\n    Text.prototype.setTextBaseline = function (textBaseline) {\n        this.textBaseline_ = textBaseline;\n    };\n    /**\n     * Set the background fill.\n     *\n     * @param {import(\"./Fill.js\").default} fill Fill style.\n     * @api\n     
 */\n    Text.prototype.setBackgroundFill = function (fill) {\n        this.backgroundFill_ = fill;\n    };\n    /**\n     * Set the background stroke.\n     *\n     * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n     * @api\n     */\n    Text.prototype.setBackgroundStroke = function (stroke) {\n        this.backgroundStroke_ = stroke;\n    };\n    /**\n     * Set the padding (`[top, right, bottom, left]`).\n     *\n     * @param {!Array<number>} padding Padding.\n     * @api\n     */\n    Text.prototype.setPadding = function (padding) {\n        this.padding_ = padding;\n    };\n    return Text;\n}());\nexport default Text;\n//# sourceMappingURL=Text.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProper
 ty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Tile\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport TileState from './TileState.js';\nimport { abstract } from './util.js';\nimport { easeIn } from './easing.js';\n/**\n * A function that takes an {@link module:ol/Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(function(tile, src) {\n *   tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState';\n *\n * source.setTileLoadFunction(function(tile,
  src) {\n *   var xhr = new XMLHttpRequest();\n *   xhr.responseType = 'blob';\n *   xhr.addEventListener('loadend', function (evt) {\n *     var data = this.response;\n *     if (data !== undefined) {\n *       tile.getImage().src = URL.createObjectURL(data);\n *     } else {\n *       tile.setState(TileState.ERROR);\n *     }\n *   });\n *   xhr.addEventListener('error', function () {\n *     tile.setState(TileState.ERROR);\n *   });\n *   xhr.open('GET', src);\n *   xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string): void} LoadFunction\n * @api\n */\n/**\n * {@link module:ol/source/Tile~Tile} sources use a function of this type to get\n * the url that provides a tile for a given tile coordinate.\n *\n * This function takes an {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection} for the projection  as arguments\n * and returns a `{string}` representing the tile URL
 , or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n *           import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @api\n */\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nvar Tile = /** @class */ (function (_super) {\n    __extends(Tile, _super);\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @param {Options=} opt_options Tile options.\n     */\n    function Tile(tileCoord, state, opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         
 * @type {import(\"./tilecoord.js\").TileCoord}\n         */\n        _this.tileCoord = tileCoord;\n        /**\n         * @protected\n         * @type {import(\"./TileState.js\").default}\n         */\n        _this.state = state;\n        /**\n         * An \"interim\" tile for this tile. The interim tile may be used while this\n         * one is loading, for \"smooth\" transitions when changing params/dimensions\n         * on the source.\n         * @type {Tile}\n         */\n        _this.interimTile = null;\n        /**\n         * The tile is available at the highest possible resolution. Subclasses can\n         * set this to `false` initially. Tile load listeners will not be\n         * unregistered before this is set to `true` and a `#changed()` is called.\n         * @type {boolean}\n         */\n        _this.hifi = true;\n        /**\n         * A key assigned to the tile. This is used by the tile source to determine\n         * if this tile can effectively be used, or i
 f a new tile should be created\n         * and this one be used as an interim tile for this new tile.\n         * @type {string}\n         */\n        _this.key = '';\n        /**\n         * The duration for the opacity transition.\n         * @type {number}\n         */\n        _this.transition_ =\n            options.transition === undefined ? 250 : options.transition;\n        /**\n         * Lookup of start times for rendering transitions.  If the start time is\n         * equal to -1, the transition is complete.\n         * @type {Object<string, number>}\n         */\n        _this.transitionStarts_ = {};\n        return _this;\n    }\n    /**\n     * @protected\n     */\n    Tile.prototype.changed = function () {\n        this.dispatchEvent(EventType.CHANGE);\n    };\n    /**\n     * Called by the tile cache when the tile is removed from the cache due to expiry\n     */\n    Tile.prototype.release = function () { };\n    /**\n     * @return {string} Key.\n     */\n    Tile.p
 rototype.getKey = function () {\n        return this.key + '/' + this.tileCoord;\n    };\n    /**\n     * Get the interim tile most suitable for rendering using the chain of interim\n     * tiles. This corresponds to the  most recent tile that has been loaded, if no\n     * such tile exists, the original tile is returned.\n     * @return {!Tile} Best tile for rendering.\n     */\n    Tile.prototype.getInterimTile = function () {\n        if (!this.interimTile) {\n            //empty chain\n            return this;\n        }\n        var tile = this.interimTile;\n        // find the first loaded tile and return it. Since the chain is sorted in\n        // decreasing order of creation time, there is no need to search the remainder\n        // of the list (all those tiles correspond to older requests and will be\n        // cleaned up by refreshInterimChain)\n        do {\n            if (tile.getState() == TileState.LOADED) {\n                // Show tile immediately instead of fadin
 g it in after loading, because\n                // the interim tile is in place already\n                this.transition_ = 0;\n                return tile;\n            }\n            tile = tile.interimTile;\n        } while (tile);\n        // we can not find a better tile\n        return this;\n    };\n    /**\n     * Goes through the chain of interim tiles and discards sections of the chain\n     * that are no longer relevant.\n     */\n    Tile.prototype.refreshInterimChain = function () {\n        if (!this.interimTile) {\n            return;\n        }\n        var tile = this.interimTile;\n        var prev = /** @type {Tile} */ (this);\n        do {\n            if (tile.getState() == TileState.LOADED) {\n                //we have a loaded tile, we can discard the rest of the list\n                //we would could abort any LOADING tile request\n                //older than this tile (i.e. any LOADING tile following this entry in the chain)\n                tile.interimTile
  = null;\n                break;\n            }\n            else if (tile.getState() == TileState.LOADING) {\n                //keep this LOADING tile any loaded tiles later in the chain are\n                //older than this tile, so we're still interested in the request\n                prev = tile;\n            }\n            else if (tile.getState() == TileState.IDLE) {\n                //the head of the list is the most current tile, we don't need\n                //to start any other requests for this chain\n                prev.interimTile = tile.interimTile;\n            }\n            else {\n                prev = tile;\n            }\n            tile = prev.interimTile;\n        } while (tile);\n    };\n    /**\n     * Get the tile coordinate for this tile.\n     * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n     * @api\n     */\n    Tile.prototype.getTileCoord = function () {\n        return this.tileCoord;\n    };\n    /**\n     * @return {imp
 ort(\"./TileState.js\").default} State.\n     */\n    Tile.prototype.getState = function () {\n        return this.state;\n    };\n    /**\n     * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n     * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n     * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n     * the tile queue and will block other requests.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @api\n     */\n    Tile.prototype.setState = function (state) {\n        if (this.state !== TileState.ERROR && this.state > state) {\n            throw new Error('Tile load sequence violation');\n        }\n        this.state = state;\n        this.changed();\n    };\n    /**\n     * Load the image or retry if loading previously failed.\n     * Loading is taken care of by the tile queue, and calling this method is\n     * only needed for prelo
 ading or for reloading in case of an error.\n     * @abstract\n     * @api\n     */\n    Tile.prototype.load = function () {\n        abstract();\n    };\n    /**\n     * Get the alpha value for rendering.\n     * @param {string} id An id for the renderer.\n     * @param {number} time The render frame time.\n     * @return {number} A number between 0 and 1.\n     */\n    Tile.prototype.getAlpha = function (id, time) {\n        if (!this.transition_) {\n            return 1;\n        }\n        var start = this.transitionStarts_[id];\n        if (!start) {\n            start = time;\n            this.transitionStarts_[id] = start;\n        }\n        else if (start === -1) {\n            return 1;\n        }\n        var delta = time - start + 1000 / 60; // avoid rendering at 0\n        if (delta >= this.transition_) {\n            return 1;\n        }\n        return easeIn(delta / this.transition_);\n    };\n    /**\n     * Determine if a tile is in an alpha transition.  A tile is 
 considered in\n     * transition if tile.getAlpha() has not yet been called or has been called\n     * and returned 1.\n     * @param {string} id An id for the renderer.\n     * @return {boolean} The tile is in transition.\n     */\n    Tile.prototype.inTransition = function (id) {\n        if (!this.transition_) {\n            return false;\n        }\n        return this.transitionStarts_[id] !== -1;\n    };\n    /**\n     * Mark a transition as complete.\n     * @param {string} id An id for the renderer.\n     */\n    Tile.prototype.endTransition = function (id) {\n        if (this.transition_) {\n            this.transitionStarts_[id] = -1;\n        }\n    };\n    return Tile;\n}(EventTarget));\nexport default Tile;\n//# sourceMappingURL=Tile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto
 __ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/ImageTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport { createCanvasContext2D } from './dom.js';\nimport { listenImage } from './Image.js';\nvar ImageTile = /** @class */ (function (_super) {\n    __extends(ImageTile, _super);\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @param {string} src Image source URI.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n
      * @param {import(\"./Tile.js\").Options=} opt_options Tile options.\n     */\n    function ImageTile(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {\n        var _this = _super.call(this, tileCoord, state, opt_options) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ = crossOrigin;\n        /**\n         * Image URI\n         *\n         * @private\n         * @type {string}\n         */\n        _this.src_ = src;\n        /**\n         * @private\n         * @type {HTMLImageElement|HTMLCanvasElement}\n         */\n        _this.image_ = new Image();\n        if (crossOrigin !== null) {\n            _this.image_.crossOrigin = crossOrigin;\n        }\n        /**\n         * @private\n         * @type {?function():void}\n         */\n        _this.unlisten_ = null;\n        /**\n         * @private\n         * @type {import(\"./Tile.js\").LoadFunction}\n         */\n        _this.tileLoadFunction
 _ = tileLoadFunction;\n        return _this;\n    }\n    /**\n     * Get the HTML image element for this tile (may be a Canvas, Image, or Video).\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     * @api\n     */\n    ImageTile.prototype.getImage = function () {\n        return this.image_;\n    };\n    /**\n     * @return {string} Key.\n     */\n    ImageTile.prototype.getKey = function () {\n        return this.src_;\n    };\n    /**\n     * Tracks loading or read errors.\n     *\n     * @private\n     */\n    ImageTile.prototype.handleImageError_ = function () {\n        this.state = TileState.ERROR;\n        this.unlistenImage_();\n        this.image_ = getBlankImage();\n        this.changed();\n    };\n    /**\n     * Tracks successful image load.\n     *\n     * @private\n     */\n    ImageTile.prototype.handleImageLoad_ = function () {\n        var image = /** @type {HTMLImageElement} */ (this.image_);\n        if (image.naturalWidth && image.n
 aturalHeight) {\n            this.state = TileState.LOADED;\n        }\n        else {\n            this.state = TileState.EMPTY;\n        }\n        this.unlistenImage_();\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     * @api\n     */\n    ImageTile.prototype.load = function () {\n        if (this.state == TileState.ERROR) {\n            this.state = TileState.IDLE;\n            this.image_ = new Image();\n            if (this.crossOrigin_ !== null) {\n                this.image_.crossOrigin = this.crossOrigin_;\n            }\n        }\n        if (this.state == TileState.IDLE) {\n            this.state = TileState.LOADING;\n            this.changed();\n            this.tileLoadFunction_(this, this.src_);\n            this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n        }\n    };\n    /**\n     * Discards event handlers which listen for load completion or errors.\n     *\n     * 
 @private\n     */\n    ImageTile.prototype.unlistenImage_ = function () {\n        if (this.unlisten_) {\n            this.unlisten_();\n            this.unlisten_ = null;\n        }\n    };\n    return ImageTile;\n}(Tile));\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n    var ctx = createCanvasContext2D(1, 1);\n    ctx.fillStyle = 'rgba(0,0,0,0)';\n    ctx.fillRect(0, 0, 1, 1);\n    return ctx.canvas;\n}\nexport default ImageTile;\n//# sourceMappingURL=ImageTile.js.map","/**\n * @module ol/reproj\n */\nimport { IMAGE_SMOOTHING_DISABLED } from './source/common.js';\nimport { assign } from './obj.js';\nimport { containsCoordinate, createEmpty, extend, forEachCorner, getCenter, getHeight, getTopLeft, getWidth, } from './extent.js';\nimport { createCanvasContext2D } from './dom.js';\nimport { getPointResolution, transform } from './proj.js';\nimport { solveLinearSystem } from './math.js';\nvar brokenDiagonalRendering
 _;\n/**\n * This draws a small triangle into a canvas by setting the triangle as the clip region\n * and then drawing a (too large) rectangle\n *\n * @param {CanvasRenderingContext2D} ctx The context in which to draw the triangle\n * @param {number} u1 The x-coordinate of the second point. The first point is 0,0.\n * @param {number} v1 The y-coordinate of the second point.\n * @param {number} u2 The x-coordinate of the third point.\n * @param {number} v2 The y-coordinate of the third point.\n */\nfunction drawTestTriangle(ctx, u1, v1, u2, v2) {\n    ctx.beginPath();\n    ctx.moveTo(0, 0);\n    ctx.lineTo(u1, v1);\n    ctx.lineTo(u2, v2);\n    ctx.closePath();\n    ctx.save();\n    ctx.clip();\n    ctx.fillRect(0, 0, Math.max(u1, u2) + 1, Math.max(v1, v2));\n    ctx.restore();\n}\n/**\n * Given the data from getImageData, see if the right values appear at the provided offset.\n * Returns true if either the color or transparency is off\n *\n * @param {Uint8ClampedArray} data The data 
 returned from getImageData\n * @param {number} offset The pixel offset from the start of data.\n * @return {boolean} true if the diagonal rendering is broken\n */\nfunction verifyBrokenDiagonalRendering(data, offset) {\n    // the values ought to be close to the rgba(210, 0, 0, 0.75)\n    return (Math.abs(data[offset * 4] - 210) > 2 ||\n        Math.abs(data[offset * 4 + 3] - 0.75 * 255) > 2);\n}\n/**\n * Determines if the current browser configuration can render triangular clip regions correctly.\n * This value is cached so the function is only expensive the first time called.\n * Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show_bug.cgi?id=1606976\n * IE also doesn't. Chrome works, and everything seems to work on OSX and Android. This function caches the\n * result. I suppose that it is conceivably possible that a browser might flip modes while the app is\n * running, but lets hope not.\n *\n * @return {boolean} true if the Diagonal R
 endering is broken.\n */\nfunction isBrokenDiagonalRendering() {\n    if (brokenDiagonalRendering_ === undefined) {\n        var ctx = document.createElement('canvas').getContext('2d');\n        ctx.globalCompositeOperation = 'lighter';\n        ctx.fillStyle = 'rgba(210, 0, 0, 0.75)';\n        drawTestTriangle(ctx, 4, 5, 4, 0);\n        drawTestTriangle(ctx, 4, 5, 0, 5);\n        var data = ctx.getImageData(0, 0, 3, 3).data;\n        brokenDiagonalRendering_ =\n            verifyBrokenDiagonalRendering(data, 0) ||\n                verifyBrokenDiagonalRendering(data, 4) ||\n                verifyBrokenDiagonalRendering(data, 8);\n    }\n    return brokenDiagonalRendering_;\n}\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Pro
 jection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./coordinate.js\").Coordinate} targetCenter Target center.\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution) {\n    var sourceCenter = transform(targetCenter, targetProj, sourceProj);\n    // calculate the ideal resolution of the source data\n    var sourceResolution = getPointResolution(targetProj, targetResolution, targetCenter);\n    var targetMetersPerUnit = targetProj.getMetersPerUnit();\n    if (targetMetersPerUnit !== undefined) {\n        sourceResolution *= targetMetersPerUnit;\n    }\n    var sourceMetersPerUnit = sourceProj.getMetersPerUnit();\n    if (sourceMetersPerUnit !== undefined) {\n        sourceResolution /= sourceMetersPer
 Unit;\n    }\n    // Based on the projection properties, the point resolution at the specified\n    // coordinates may be slightly different. We need to reverse-compensate this\n    // in order to achieve optimal results.\n    var sourceExtent = sourceProj.getExtent();\n    if (!sourceExtent || containsCoordinate(sourceExtent, sourceCenter)) {\n        var compensationFactor = getPointResolution(sourceProj, sourceResolution, sourceCenter) /\n            sourceResolution;\n        if (isFinite(compensationFactor) && compensationFactor > 0) {\n            sourceResolution /= compensationFactor;\n        }\n    }\n    return sourceResolution;\n}\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj 
 Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceExtentResolution(sourceProj, targetProj, targetExtent, targetResolution) {\n    var targetCenter = getCenter(targetExtent);\n    var sourceResolution = calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution);\n    if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n        forEachCorner(targetExtent, function (corner) {\n            sourceResolution = calculateSourceResolution(sourceProj, targetProj, corner, targetResolution);\n            return isFinite(sourceResolution) && sourceResolution > 0;\n        });\n    }\n    return sourceResolution;\n}\n/**\n * Renders the source data into new canvas based on the
  triangulation.\n *\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} sourceResolution Source resolution.\n * @param {import(\"./extent.js\").Extent} sourceExtent Extent of the data source.\n * @param {number} targetResolution Target resolution.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent.\n * @param {import(\"./reproj/Triangulation.js\").default} triangulation\n * Calculated triangulation.\n * @param {Array<{extent: import(\"./extent.js\").Extent,\n *                 image: (HTMLCanvasElement|HTMLImageElement|HTMLVideoElement)}>} sources\n * Array of sources.\n * @param {number} gutter Gutter of the sources.\n * @param {boolean=} opt_renderEdges Render reprojection edges.\n * @param {object=} opt_contextOptions Properties to set on the canvas context.\n * @return {HTMLCanvasElement} Canvas with reprojected data.\n */\nexport function render(width,
  height, pixelRatio, sourceResolution, sourceExtent, targetResolution, targetExtent, triangulation, sources, gutter, opt_renderEdges, opt_contextOptions) {\n    var context = createCanvasContext2D(Math.round(pixelRatio * width), Math.round(pixelRatio * height));\n    assign(context, opt_contextOptions);\n    if (sources.length === 0) {\n        return context.canvas;\n    }\n    context.scale(pixelRatio, pixelRatio);\n    function pixelRound(value) {\n        return Math.round(value * pixelRatio) / pixelRatio;\n    }\n    context.globalCompositeOperation = 'lighter';\n    var sourceDataExtent = createEmpty();\n    sources.forEach(function (src, i, arr) {\n        extend(sourceDataExtent, src.extent);\n    });\n    var canvasWidthInUnits = getWidth(sourceDataExtent);\n    var canvasHeightInUnits = getHeight(sourceDataExtent);\n    var stitchContext = createCanvasContext2D(Math.round((pixelRatio * canvasWidthInUnits) / sourceResolution), Math.round((pixelRatio * canvasHeightInUnits) /
  sourceResolution));\n    assign(stitchContext, opt_contextOptions);\n    var stitchScale = pixelRatio / sourceResolution;\n    sources.forEach(function (src, i, arr) {\n        var xPos = src.extent[0] - sourceDataExtent[0];\n        var yPos = -(src.extent[3] - sourceDataExtent[3]);\n        var srcWidth = getWidth(src.extent);\n        var srcHeight = getHeight(src.extent);\n        // This test should never fail -- but it does. Need to find a fix the upstream condition\n        if (src.image.width > 0 && src.image.height > 0) {\n            stitchContext.drawImage(src.image, gutter, gutter, src.image.width - 2 * gutter, src.image.height - 2 * gutter, xPos * stitchScale, yPos * stitchScale, srcWidth * stitchScale, srcHeight * stitchScale);\n        }\n    });\n    var targetTopLeft = getTopLeft(targetExtent);\n    triangulation.getTriangles().forEach(function (triangle, i, arr) {\n        /* Calculate affine transform (src -> dst)\n         * Resulting matrix can be used to trans
 form coordinate\n         * from `sourceProjection` to destination pixels.\n         *\n         * To optimize number of context calls and increase numerical stability,\n         * we also do the following operations:\n         * trans(-topLeftExtentCorner), scale(1 / targetResolution), scale(1, -1)\n         * here before solving the linear system so [ui, vi] are pixel coordinates.\n         *\n         * Src points: xi, yi\n         * Dst points: ui, vi\n         * Affine coefficients: aij\n         *\n         * | x0 y0 1  0  0 0 |   |a00|   |u0|\n         * | x1 y1 1  0  0 0 |   |a01|   |u1|\n         * | x2 y2 1  0  0 0 | x |a02| = |u2|\n         * |  0  0 0 x0 y0 1 |   |a10|   |v0|\n         * |  0  0 0 x1 y1 1 |   |a11|   |v1|\n         * |  0  0 0 x2 y2 1 |   |a12|   |v2|\n         */\n        var source = triangle.source;\n        var target = triangle.target;\n        var x0 = source[0][0], y0 = source[0][1];\n        var x1 = source[1][0], y1 = source[1][1];\n        var 
 x2 = source[2][0], y2 = source[2][1];\n        // Make sure that everything is on pixel boundaries\n        var u0 = pixelRound((target[0][0] - targetTopLeft[0]) / targetResolution);\n        var v0 = pixelRound(-(target[0][1] - targetTopLeft[1]) / targetResolution);\n        var u1 = pixelRound((target[1][0] - targetTopLeft[0]) / targetResolution);\n        var v1 = pixelRound(-(target[1][1] - targetTopLeft[1]) / targetResolution);\n        var u2 = pixelRound((target[2][0] - targetTopLeft[0]) / targetResolution);\n        var v2 = pixelRound(-(target[2][1] - targetTopLeft[1]) / targetResolution);\n        // Shift all the source points to improve numerical stability\n        // of all the subsequent calculations. The [x0, y0] is used here.\n        // This is also used to simplify the linear system.\n        var sourceNumericalShiftX = x0;\n        var sourceNumericalShiftY = y0;\n        x0 = 0;\n        y0 = 0;\n        x1 -= sourceNumericalShiftX;\n        y1 -= sourceNumerical
 ShiftY;\n        x2 -= sourceNumericalShiftX;\n        y2 -= sourceNumericalShiftY;\n        var augmentedMatrix = [\n            [x1, y1, 0, 0, u1 - u0],\n            [x2, y2, 0, 0, u2 - u0],\n            [0, 0, x1, y1, v1 - v0],\n            [0, 0, x2, y2, v2 - v0],\n        ];\n        var affineCoefs = solveLinearSystem(augmentedMatrix);\n        if (!affineCoefs) {\n            return;\n        }\n        context.save();\n        context.beginPath();\n        if (isBrokenDiagonalRendering() ||\n            opt_contextOptions === IMAGE_SMOOTHING_DISABLED) {\n            // Make sure that all lines are horizontal or vertical\n            context.moveTo(u1, v1);\n            // This is the diagonal line. Do it in 4 steps\n            var steps = 4;\n            var ud = u0 - u1;\n            var vd = v0 - v1;\n            for (var step = 0; step < steps; step++) {\n                // Go horizontally\n                context.lineTo(u1 + pixelRound(((step + 1) * ud) / steps), v1 + p
 ixelRound((step * vd) / (steps - 1)));\n                // Go vertically\n                if (step != steps - 1) {\n                    context.lineTo(u1 + pixelRound(((step + 1) * ud) / steps), v1 + pixelRound(((step + 1) * vd) / (steps - 1)));\n                }\n            }\n            // We are almost at u0r, v0r\n            context.lineTo(u2, v2);\n        }\n        else {\n            context.moveTo(u1, v1);\n            context.lineTo(u0, v0);\n            context.lineTo(u2, v2);\n        }\n        context.clip();\n        context.transform(affineCoefs[0], affineCoefs[2], affineCoefs[1], affineCoefs[3], u0, v0);\n        context.translate(sourceDataExtent[0] - sourceNumericalShiftX, sourceDataExtent[3] - sourceNumericalShiftY);\n        context.scale(sourceResolution / pixelRatio, -sourceResolution / pixelRatio);\n        context.drawImage(stitchContext.canvas, 0, 0);\n        context.restore();\n    });\n    if (opt_renderEdges) {\n        context.save();\n        cont
 ext.globalCompositeOperation = 'source-over';\n        context.strokeStyle = 'black';\n        context.lineWidth = 1;\n        triangulation.getTriangles().forEach(function (triangle, i, arr) {\n            var target = triangle.target;\n            var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n            var v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n            var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n            var v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n            var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n            var v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n            context.beginPath();\n            context.moveTo(u1, v1);\n            context.lineTo(u0, v0);\n            context.lineTo(u2, v2);\n            context.closePath();\n            context.stroke();\n        });\n        context.restore();\n    }\n    return context.canvas;\n}\n//# sourceM
 appingURL=reproj.js.map","/**\n * @module ol/reproj/Triangulation\n */\nimport { boundingExtent, createEmpty, extendCoordinate, getArea, getBottomLeft, getBottomRight, getTopLeft, getTopRight, getWidth, intersects, } from '../extent.js';\nimport { getTransform } from '../proj.js';\nimport { log2, modulo } from '../math.js';\n/**\n * Single triangle; consists of 3 source points and 3 target points.\n * @typedef {Object} Triangle\n * @property {Array<import(\"../coordinate.js\").Coordinate>} source\n * @property {Array<import(\"../coordinate.js\").Coordinate>} target\n */\n/**\n * Maximum number of subdivision steps during raster reprojection triangulation.\n * Prevents high memory usage and large number of proj4 calls (for certain\n * transformations and areas). At most `2*(2^this)` triangles are created for\n * each triangulated extent (tile/image).\n * @type {number}\n */\nvar MAX_SUBDIVISION = 10;\n/**\n * Maximum allowed size of triangle relative to world width. When transforming
 \n * corners of world extent between certain projections, the resulting\n * triangulation seems to have zero error and no subdivision is performed. If\n * the triangle width is more than this (relative to world width; 0-1),\n * subdivison is forced (up to `MAX_SUBDIVISION`). Default is `0.25`.\n * @type {number}\n */\nvar MAX_TRIANGLE_WIDTH = 0.25;\n/**\n * @classdesc\n * Class containing triangulation of the given target extent.\n * Used for determining source data and the reprojection itself.\n */\nvar Triangulation = /** @class */ (function () {\n    /**\n     * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n     * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n     * @param {import(\"../extent.js\").Extent} targetExtent Target extent to triangulate.\n     * @param {import(\"../extent.js\").Extent} maxSourceExtent Maximal source extent that can be used.\n     * @param {number} errorThreshold Acceptable error (i
 n source units).\n     * @param {?number} opt_destinationResolution The (optional) resolution of the destination.\n     */\n    function Triangulation(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold, opt_destinationResolution) {\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         * @private\n         */\n        this.sourceProj_ = sourceProj;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         * @private\n         */\n        this.targetProj_ = targetProj;\n        /** @type {!Object<string, import(\"../coordinate.js\").Coordinate>} */\n        var transformInvCache = {};\n        var transformInv = getTransform(this.targetProj_, this.sourceProj_);\n        /**\n         * @param {import(\"../coordinate.js\").Coordinate} c A coordinate.\n         * @return {import(\"../coordinate.js\").Coordinate} Transformed coordinate.\n         * @private\n         */\n        this.transformInv_ = function (c)
  {\n            var key = c[0] + '/' + c[1];\n            if (!transformInvCache[key]) {\n                transformInvCache[key] = transformInv(c);\n            }\n            return transformInvCache[key];\n        };\n        /**\n         * @type {import(\"../extent.js\").Extent}\n         * @private\n         */\n        this.maxSourceExtent_ = maxSourceExtent;\n        /**\n         * @type {number}\n         * @private\n         */\n        this.errorThresholdSquared_ = errorThreshold * errorThreshold;\n        /**\n         * @type {Array<Triangle>}\n         * @private\n         */\n        this.triangles_ = [];\n        /**\n         * Indicates that the triangulation crosses edge of the source projection.\n         * @type {boolean}\n         * @private\n         */\n        this.wrapsXInSource_ = false;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        this.canWrapXInSource_ =\n            this.sourceProj_.canWrapX() &&\n                !
 !maxSourceExtent &&\n                !!this.sourceProj_.getExtent() &&\n                getWidth(maxSourceExtent) == getWidth(this.sourceProj_.getExtent());\n        /**\n         * @type {?number}\n         * @private\n         */\n        this.sourceWorldWidth_ = this.sourceProj_.getExtent()\n            ? getWidth(this.sourceProj_.getExtent())\n            : null;\n        /**\n         * @type {?number}\n         * @private\n         */\n        this.targetWorldWidth_ = this.targetProj_.getExtent()\n            ? getWidth(this.targetProj_.getExtent())\n            : null;\n        var destinationTopLeft = getTopLeft(targetExtent);\n        var destinationTopRight = getTopRight(targetExtent);\n        var destinationBottomRight = getBottomRight(targetExtent);\n        var destinationBottomLeft = getBottomLeft(targetExtent);\n        var sourceTopLeft = this.transformInv_(destinationTopLeft);\n        var sourceTopRight = this.transformInv_(destinationTopRight);\n        var sourc
 eBottomRight = this.transformInv_(destinationBottomRight);\n        var sourceBottomLeft = this.transformInv_(destinationBottomLeft);\n        /*\n         * The maxSubdivision controls how many splittings of the target area can\n         * be done. The idea here is to do a linear mapping of the target areas\n         * but the actual overal reprojection (can be) extremely non-linear. The\n         * default value of MAX_SUBDIVISION was chosen based on mapping a 256x256\n         * tile size. However this function is also called to remap canvas rendered\n         * layers which can be much larger. This calculation increases the maxSubdivision\n         * value by the right factor so that each 256x256 pixel area has\n         * MAX_SUBDIVISION divisions.\n         */\n        var maxSubdivision = MAX_SUBDIVISION +\n            (opt_destinationResolution\n                ? Math.max(0, Math.ceil(log2(getArea(targetExtent) /\n                    (opt_destinationResolution *\n           
              opt_destinationResolution *\n                        256 *\n                        256))))\n                : 0);\n        this.addQuad_(destinationTopLeft, destinationTopRight, destinationBottomRight, destinationBottomLeft, sourceTopLeft, sourceTopRight, sourceBottomRight, sourceBottomLeft, maxSubdivision);\n        if (this.wrapsXInSource_) {\n            var leftBound_1 = Infinity;\n            this.triangles_.forEach(function (triangle, i, arr) {\n                leftBound_1 = Math.min(leftBound_1, triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]);\n            });\n            // Shift triangles to be as close to `leftBound` as possible\n            // (if the distance is more than `worldWidth / 2` it can be closer.\n            this.triangles_.forEach(function (triangle) {\n                if (Math.max(triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]) -\n                    leftBound_1 >\n                    this.sourceWorldW
 idth_ / 2) {\n                    var newTriangle = [\n                        [triangle.source[0][0], triangle.source[0][1]],\n                        [triangle.source[1][0], triangle.source[1][1]],\n                        [triangle.source[2][0], triangle.source[2][1]],\n                    ];\n                    if (newTriangle[0][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n                        newTriangle[0][0] -= this.sourceWorldWidth_;\n                    }\n                    if (newTriangle[1][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n                        newTriangle[1][0] -= this.sourceWorldWidth_;\n                    }\n                    if (newTriangle[2][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n                        newTriangle[2][0] -= this.sourceWorldWidth_;\n                    }\n                    // Rarely (if the extent contains both the dateline and prime meridian)\n                    // the shift can in turn break some tria
 ngles.\n                    // Detect this here and don't shift in such cases.\n                    var minX = Math.min(newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n                    var maxX = Math.max(newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n                    if (maxX - minX < this.sourceWorldWidth_ / 2) {\n                        triangle.source = newTriangle;\n                    }\n                }\n            }.bind(this));\n        }\n        transformInvCache = {};\n    }\n    /**\n     * Adds triangle to the triangulation.\n     * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordin
 ate.\n     * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n     * @private\n     */\n    Triangulation.prototype.addTriangle_ = function (a, b, c, aSrc, bSrc, cSrc) {\n        this.triangles_.push({\n            source: [aSrc, bSrc, cSrc],\n            target: [a, b, c],\n        });\n    };\n    /**\n     * Adds quad (points in clock-wise order) to the triangulation\n     * (and reprojects the vertices) if valid.\n     * Performs quad subdivision if needed to increase precision.\n     *\n     * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} d The target d coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n     * @param {import(\"../coordinate.js\").Co
 ordinate} bSrc The source b coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} dSrc The source d coordinate.\n     * @param {number} maxSubdivision Maximal allowed subdivision of the quad.\n     * @private\n     */\n    Triangulation.prototype.addQuad_ = function (a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n        var sourceQuadExtent = boundingExtent([aSrc, bSrc, cSrc, dSrc]);\n        var sourceCoverageX = this.sourceWorldWidth_\n            ? getWidth(sourceQuadExtent) / this.sourceWorldWidth_\n            : null;\n        var sourceWorldWidth = /** @type {number} */ (this.sourceWorldWidth_);\n        // when the quad is wrapped in the source projection\n        // it covers most of the projection extent, but not fully\n        var wrapsX = this.sourceProj_.canWrapX() &&\n            sourceCoverageX > 0.5 &&\n            sourceCoverageX < 1;\n        var needsSubdi
 vision = false;\n        if (maxSubdivision > 0) {\n            if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {\n                var targetQuadExtent = boundingExtent([a, b, c, d]);\n                var targetCoverageX = getWidth(targetQuadExtent) / this.targetWorldWidth_;\n                needsSubdivision =\n                    targetCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n            }\n            if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {\n                needsSubdivision =\n                    sourceCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n            }\n        }\n        if (!needsSubdivision && this.maxSourceExtent_) {\n            if (isFinite(sourceQuadExtent[0]) &&\n                isFinite(sourceQuadExtent[1]) &&\n                isFinite(sourceQuadExtent[2]) &&\n                isFinite(sourceQuadExtent[3])) {\n                if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) {\n                    // w
 hole quad outside source projection extent -> ignore\n                    return;\n                }\n            }\n        }\n        var isNotFinite = 0;\n        if (!needsSubdivision) {\n            if (!isFinite(aSrc[0]) ||\n                !isFinite(aSrc[1]) ||\n                !isFinite(bSrc[0]) ||\n                !isFinite(bSrc[1]) ||\n                !isFinite(cSrc[0]) ||\n                !isFinite(cSrc[1]) ||\n                !isFinite(dSrc[0]) ||\n                !isFinite(dSrc[1])) {\n                if (maxSubdivision > 0) {\n                    needsSubdivision = true;\n                }\n                else {\n                    // It might be the case that only 1 of the points is infinite. In this case\n                    // we can draw a single triangle with the other three points\n                    isNotFinite =\n                        (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ? 8 : 0) +\n                            (!isFinite(bSrc[0]) || !isFinite(bSrc[1])
  ? 4 : 0) +\n                            (!isFinite(cSrc[0]) || !isFinite(cSrc[1]) ? 2 : 0) +\n                            (!isFinite(dSrc[0]) || !isFinite(dSrc[1]) ? 1 : 0);\n                    if (isNotFinite != 1 &&\n                        isNotFinite != 2 &&\n                        isNotFinite != 4 &&\n                        isNotFinite != 8) {\n                        return;\n                    }\n                }\n            }\n        }\n        if (maxSubdivision > 0) {\n            if (!needsSubdivision) {\n                var center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];\n                var centerSrc = this.transformInv_(center);\n                var dx = void 0;\n                if (wrapsX) {\n                    var centerSrcEstimX = (modulo(aSrc[0], sourceWorldWidth) +\n                        modulo(cSrc[0], sourceWorldWidth)) /\n                        2;\n                    dx = centerSrcEstimX - modulo(centerSrc[0], sourceWorldWidth);\n                }
 \n                else {\n                    dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];\n                }\n                var dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];\n                var centerSrcErrorSquared = dx * dx + dy * dy;\n                needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;\n            }\n            if (needsSubdivision) {\n                if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {\n                    // split horizontally (top & bottom)\n                    var bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];\n                    var bcSrc = this.transformInv_(bc);\n                    var da = [(d[0] + a[0]) / 2, (d[1] + a[1]) / 2];\n                    var daSrc = this.transformInv_(da);\n                    this.addQuad_(a, b, bc, da, aSrc, bSrc, bcSrc, daSrc, maxSubdivision - 1);\n                    this.addQuad_(da, bc, c, d, daSrc, bcSrc, cSrc, dSrc, maxSubdivision - 1);\n                }\n                else 
 {\n                    // split vertically (left & right)\n                    var ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];\n                    var abSrc = this.transformInv_(ab);\n                    var cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];\n                    var cdSrc = this.transformInv_(cd);\n                    this.addQuad_(a, ab, cd, d, aSrc, abSrc, cdSrc, dSrc, maxSubdivision - 1);\n                    this.addQuad_(ab, b, c, cd, abSrc, bSrc, cSrc, cdSrc, maxSubdivision - 1);\n                }\n                return;\n            }\n        }\n        if (wrapsX) {\n            if (!this.canWrapXInSource_) {\n                return;\n            }\n            this.wrapsXInSource_ = true;\n        }\n        // Exactly zero or one of *Src is not finite\n        // The triangles must have the diagonal line as the first side\n        // This is to allow easy code in reproj.s to make it straight for broken\n        // browsers that can't handle diagonal clippin
 g\n        if ((isNotFinite & 0xb) == 0) {\n            this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);\n        }\n        if ((isNotFinite & 0xe) == 0) {\n            this.addTriangle_(a, c, b, aSrc, cSrc, bSrc);\n        }\n        if (isNotFinite) {\n            // Try the other two triangles\n            if ((isNotFinite & 0xd) == 0) {\n                this.addTriangle_(b, d, a, bSrc, dSrc, aSrc);\n            }\n            if ((isNotFinite & 0x7) == 0) {\n                this.addTriangle_(b, d, c, bSrc, dSrc, cSrc);\n            }\n        }\n    };\n    /**\n     * Calculates extent of the 'source' coordinates from all the triangles.\n     *\n     * @return {import(\"../extent.js\").Extent} Calculated extent.\n     */\n    Triangulation.prototype.calculateSourceExtent = function () {\n        var extent = createEmpty();\n        this.triangles_.forEach(function (triangle, i, arr) {\n            var src = triangle.source;\n            extendCoordinate(extent, src[0]);\n        
     extendCoordinate(extent, src[1]);\n            extendCoordinate(extent, src[2]);\n        });\n        return extent;\n    };\n    /**\n     * @return {Array<Triangle>} Array of the calculated triangles.\n     */\n    Triangulation.prototype.getTriangles = function () {\n        return this.triangles_;\n    };\n    return Triangulation;\n}());\nexport default Triangulation;\n//# sourceMappingURL=Triangulation.js.map","/**\n * @module ol/source/common\n */\n/**\n * Default WMS version.\n * @type {string}\n */\nexport var DEFAULT_WMS_VERSION = '1.3.0';\n/**\n * Context options to disable image smoothing.\n * @type {Object}\n */\nexport var IMAGE_SMOOTHING_DISABLED = {\n    imageSmoothingEnabled: false,\n    msImageSmoothingEnabled: false,\n};\n//# sourceMappingURL=common.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && 
 function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/reproj/Tile\n */\nimport { ERROR_THRESHOLD } from './common.js';\nimport EventType from '../events/EventType.js';\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport Triangulation from './Triangulation.js';\nimport { calculateSourceExtentResolution, render as renderReprojected, } from '../reproj.js';\nimport { clamp } from '../math.js';\nimport { getArea, getIntersection } from '../extent.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {function(number, number, number, number) : import(\"../Tile.js\").default} Functio
 nType\n */\n/**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */\nvar ReprojTile = /** @class */ (function (_super) {\n    __extends(ReprojTile, _super);\n    /**\n     * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n     * @param {import(\"../tilegrid/TileGrid.js\").default} sourceTileGrid Source tile grid.\n     * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n     * @param {import(\"../tilegrid/TileGrid.js\").default} targetTileGrid Target tile grid.\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Coordinate of the tile.\n     * @param {import(\"../tilecoord.js\").TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {number} gutter Gutter of the source tiles.\n     * @param {FunctionType} getTileFunction\n     *     Function returning source t
 iles (z, x, y, pixelRatio).\n     * @param {number=} opt_errorThreshold Acceptable reprojection error (in px).\n     * @param {boolean=} opt_renderEdges Render reprojection edges.\n     * @param {object=} opt_contextOptions Properties to set on the canvas context.\n     */\n    function ReprojTile(sourceProj, sourceTileGrid, targetProj, targetTileGrid, tileCoord, wrappedTileCoord, pixelRatio, gutter, getTileFunction, opt_errorThreshold, opt_renderEdges, opt_contextOptions) {\n        var _this = _super.call(this, tileCoord, TileState.IDLE) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderEdges_ = opt_renderEdges !== undefined ? opt_renderEdges : false;\n        /**\n         * @private\n         * @type {object}\n         */\n        _this.contextOptions_ = opt_contextOptions;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n   
       * @type {number}\n         */\n        _this.gutter_ = gutter;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = null;\n        /**\n         * @private\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        _this.sourceTileGrid_ = sourceTileGrid;\n        /**\n         * @private\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        _this.targetTileGrid_ = targetTileGrid;\n        /**\n         * @private\n         * @type {import(\"../tilecoord.js\").TileCoord}\n         */\n        _this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;\n        /**\n         * @private\n         * @type {!Array<import(\"../Tile.js\").default>}\n         */\n        _this.sourceTiles_ = [];\n        /**\n         * @private\n         * @type {?Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.sourcesListenerKeys_ = null;\n        
 /**\n         * @private\n         * @type {number}\n         */\n        _this.sourceZ_ = 0;\n        var targetExtent = targetTileGrid.getTileCoordExtent(_this.wrappedTileCoord_);\n        var maxTargetExtent = _this.targetTileGrid_.getExtent();\n        var maxSourceExtent = _this.sourceTileGrid_.getExtent();\n        var limitedTargetExtent = maxTargetExtent\n            ? getIntersection(targetExtent, maxTargetExtent)\n            : targetExtent;\n        if (getArea(limitedTargetExtent) === 0) {\n            // Tile is completely outside range -> EMPTY\n            // TODO: is it actually correct that the source even creates the tile ?\n            _this.state = TileState.EMPTY;\n            return _this;\n        }\n        var sourceProjExtent = sourceProj.getExtent();\n        if (sourceProjExtent) {\n            if (!maxSourceExtent) {\n                maxSourceExtent = sourceProjExtent;\n            }\n            else {\n                maxSourceExtent = getIntersection(
 maxSourceExtent, sourceProjExtent);\n            }\n        }\n        var targetResolution = targetTileGrid.getResolution(_this.wrappedTileCoord_[0]);\n        var sourceResolution = calculateSourceExtentResolution(sourceProj, targetProj, limitedTargetExtent, targetResolution);\n        if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n            // invalid sourceResolution -> EMPTY\n            // probably edges of the projections when no extent is defined\n            _this.state = TileState.EMPTY;\n            return _this;\n        }\n        var errorThresholdInPixels = opt_errorThreshold !== undefined ? opt_errorThreshold : ERROR_THRESHOLD;\n        /**\n         * @private\n         * @type {!import(\"./Triangulation.js\").default}\n         */\n        _this.triangulation_ = new Triangulation(sourceProj, targetProj, limitedTargetExtent, maxSourceExtent, sourceResolution * errorThresholdInPixels, targetResolution);\n        if (_this.triangulation_.getTriangles()
 .length === 0) {\n            // no valid triangles -> EMPTY\n            _this.state = TileState.EMPTY;\n            return _this;\n        }\n        _this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);\n        var sourceExtent = _this.triangulation_.calculateSourceExtent();\n        if (maxSourceExtent) {\n            if (sourceProj.canWrapX()) {\n                sourceExtent[1] = clamp(sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);\n                sourceExtent[3] = clamp(sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);\n            }\n            else {\n                sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n            }\n        }\n        if (!getArea(sourceExtent)) {\n            _this.state = TileState.EMPTY;\n        }\n        else {\n            var sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(sourceExtent, _this.sourceZ_);\n            for (var srcX = sourceRange.minX; srcX <= sourceRange.maxX; src
 X++) {\n                for (var srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n                    var tile = getTileFunction(_this.sourceZ_, srcX, srcY, pixelRatio);\n                    if (tile) {\n                        _this.sourceTiles_.push(tile);\n                    }\n                }\n            }\n            if (_this.sourceTiles_.length === 0) {\n                _this.state = TileState.EMPTY;\n            }\n        }\n        return _this;\n    }\n    /**\n     * Get the HTML Canvas element for this tile.\n     * @return {HTMLCanvasElement} Canvas.\n     */\n    ReprojTile.prototype.getImage = function () {\n        return this.canvas_;\n    };\n    /**\n     * @private\n     */\n    ReprojTile.prototype.reproject_ = function () {\n        var sources = [];\n        this.sourceTiles_.forEach(function (tile, i, arr) {\n            if (tile && tile.getState() == TileState.LOADED) {\n                sources.push({\n                    extent: this.sour
 ceTileGrid_.getTileCoordExtent(tile.tileCoord),\n                    image: tile.getImage(),\n                });\n            }\n        }.bind(this));\n        this.sourceTiles_.length = 0;\n        if (sources.length === 0) {\n            this.state = TileState.ERROR;\n        }\n        else {\n            var z = this.wrappedTileCoord_[0];\n            var size = this.targetTileGrid_.getTileSize(z);\n            var width = typeof size === 'number' ? size : size[0];\n            var height = typeof size === 'number' ? size : size[1];\n            var targetResolution = this.targetTileGrid_.getResolution(z);\n            var sourceResolution = this.sourceTileGrid_.getResolution(this.sourceZ_);\n            var targetExtent = this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);\n            this.canvas_ = renderReprojected(width, height, this.pixelRatio_, sourceResolution, this.sourceTileGrid_.getExtent(), targetResolution, targetExtent, this.triangulation_, sources, 
 this.gutter_, this.renderEdges_, this.contextOptions_);\n            this.state = TileState.LOADED;\n        }\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    ReprojTile.prototype.load = function () {\n        if (this.state == TileState.IDLE) {\n            this.state = TileState.LOADING;\n            this.changed();\n            var leftToLoad_1 = 0;\n            this.sourcesListenerKeys_ = [];\n            this.sourceTiles_.forEach(function (tile, i, arr) {\n                var state = tile.getState();\n                if (state == TileState.IDLE || state == TileState.LOADING) {\n                    leftToLoad_1++;\n                    var sourceListenKey_1 = listen(tile, EventType.CHANGE, function (e) {\n                        var state = tile.getState();\n                        if (state == TileState.LOADED ||\n                            state == TileState.ERROR ||\n                            state == TileState.EMPTY) {\n            
                 unlistenByKey(sourceListenKey_1);\n                            leftToLoad_1--;\n                            if (leftToLoad_1 === 0) {\n                                this.unlistenSources_();\n                                this.reproject_();\n                            }\n                        }\n                    }, this);\n                    this.sourcesListenerKeys_.push(sourceListenKey_1);\n                }\n            }.bind(this));\n            this.sourceTiles_.forEach(function (tile, i, arr) {\n                var state = tile.getState();\n                if (state == TileState.IDLE) {\n                    tile.load();\n                }\n            });\n            if (leftToLoad_1 === 0) {\n                setTimeout(this.reproject_.bind(this), 0);\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    ReprojTile.prototype.unlistenSources_ = function () {\n        this.sourcesListenerKeys_.forEach(unlistenByKey);\n        this.
 sourcesListenerKeys_ = null;\n    };\n    return ReprojTile;\n}(Tile));\nexport default ReprojTile;\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/reproj/common\n */\n/**\n * Default maximum allowed threshold  (in pixels) for reprojection\n * triangulation.\n * @type {number}\n */\nexport var ERROR_THRESHOLD = 0.5;\n/**\n * Enable automatic reprojection of raster sources. Default is `true`.\n * TODO: decide if we want to expose this as a build flag or remove it\n * @type {boolean}\n */\nexport var ENABLE_RASTER_REPROJECTION = true;\n//# sourceMappingURL=common.js.map","/**\n * @module ol/structs/LRUCache\n */\nimport { assert } from '../asserts.js';\n/**\n * @typedef {Object} Entry\n * @property {string} key_\n * @property {Object} newer\n * @property {Object} older\n * @property {*} value_\n */\n/**\n * @classdesc\n * Implements a Least-Recently-Used cache where the keys do not conflict with\n * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring\n
  * items from the cache is the responsibility of the user.\n *\n * @fires import(\"../events/Event.js\").default\n * @template T\n */\nvar LRUCache = /** @class */ (function () {\n    /**\n     * @param {number=} opt_highWaterMark High water mark.\n     */\n    function LRUCache(opt_highWaterMark) {\n        /**\n         * Desired max cache size after expireCache(). If set to 0, no cache entries\n         * will be pruned at all.\n         * @type {number}\n         */\n        this.highWaterMark =\n            opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.count_ = 0;\n        /**\n         * @private\n         * @type {!Object<string, Entry>}\n         */\n        this.entries_ = {};\n        /**\n         * @private\n         * @type {?Entry}\n         */\n        this.oldest_ = null;\n        /**\n         * @private\n         * @type {?Entry}\n         */\n        this.newest_ 
 = null;\n    }\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    LRUCache.prototype.canExpireCache = function () {\n        return this.highWaterMark > 0 && this.getCount() > this.highWaterMark;\n    };\n    /**\n     * FIXME empty description for jsdoc\n     */\n    LRUCache.prototype.clear = function () {\n        this.count_ = 0;\n        this.entries_ = {};\n        this.oldest_ = null;\n        this.newest_ = null;\n    };\n    /**\n     * @param {string} key Key.\n     * @return {boolean} Contains key.\n     */\n    LRUCache.prototype.containsKey = function (key) {\n        return this.entries_.hasOwnProperty(key);\n    };\n    /**\n     * @param {function(T, string, LRUCache<T>): ?} f The function\n     *     to call for every entry from the oldest to the newer. This function takes\n     *     3 arguments (the entry value, the entry key and the LRUCache object).\n     *     The return value is ignored.\n     */\n    LRUCache.prototype.forEach = function (f) {
 \n        var entry = this.oldest_;\n        while (entry) {\n            f(entry.value_, entry.key_, this);\n            entry = entry.newer;\n        }\n    };\n    /**\n     * @param {string} key Key.\n     * @param {*=} opt_options Options (reserverd for subclasses).\n     * @return {T} Value.\n     */\n    LRUCache.prototype.get = function (key, opt_options) {\n        var entry = this.entries_[key];\n        assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n        if (entry === this.newest_) {\n            return entry.value_;\n        }\n        else if (entry === this.oldest_) {\n            this.oldest_ = /** @type {Entry} */ (this.oldest_.newer);\n            this.oldest_.older = null;\n        }\n        else {\n            entry.newer.older = entry.older;\n            entry.older.newer = entry.newer;\n        }\n        entry.newer = null;\n        entry.older = this.newest_;\n        this.newest_.newer = entry;\n      
   this.newest_ = entry;\n        return entry.value_;\n    };\n    /**\n     * Remove an entry from the cache.\n     * @param {string} key The entry key.\n     * @return {T} The removed entry.\n     */\n    LRUCache.prototype.remove = function (key) {\n        var entry = this.entries_[key];\n        assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n        if (entry === this.newest_) {\n            this.newest_ = /** @type {Entry} */ (entry.older);\n            if (this.newest_) {\n                this.newest_.newer = null;\n            }\n        }\n        else if (entry === this.oldest_) {\n            this.oldest_ = /** @type {Entry} */ (entry.newer);\n            if (this.oldest_) {\n                this.oldest_.older = null;\n            }\n        }\n        else {\n            entry.newer.older = entry.older;\n            entry.older.newer = entry.newer;\n        }\n        delete this.entries_[key];\n        --this.count_;
 \n        return entry.value_;\n    };\n    /**\n     * @return {number} Count.\n     */\n    LRUCache.prototype.getCount = function () {\n        return this.count_;\n    };\n    /**\n     * @return {Array<string>} Keys.\n     */\n    LRUCache.prototype.getKeys = function () {\n        var keys = new Array(this.count_);\n        var i = 0;\n        var entry;\n        for (entry = this.newest_; entry; entry = entry.older) {\n            keys[i++] = entry.key_;\n        }\n        return keys;\n    };\n    /**\n     * @return {Array<T>} Values.\n     */\n    LRUCache.prototype.getValues = function () {\n        var values = new Array(this.count_);\n        var i = 0;\n        var entry;\n        for (entry = this.newest_; entry; entry = entry.older) {\n            values[i++] = entry.value_;\n        }\n        return values;\n    };\n    /**\n     * @return {T} Last value.\n     */\n    LRUCache.prototype.peekLast = function () {\n        return this.oldest_.value_;\n    };\n    /*
 *\n     * @return {string} Last key.\n     */\n    LRUCache.prototype.peekLastKey = function () {\n        return this.oldest_.key_;\n    };\n    /**\n     * Get the key of the newest item in the cache.  Throws if the cache is empty.\n     * @return {string} The newest key.\n     */\n    LRUCache.prototype.peekFirstKey = function () {\n        return this.newest_.key_;\n    };\n    /**\n     * @return {T} value Value.\n     */\n    LRUCache.prototype.pop = function () {\n        var entry = this.oldest_;\n        delete this.entries_[entry.key_];\n        if (entry.newer) {\n            entry.newer.older = null;\n        }\n        this.oldest_ = /** @type {Entry} */ (entry.newer);\n        if (!this.oldest_) {\n            this.newest_ = null;\n        }\n        --this.count_;\n        return entry.value_;\n    };\n    /**\n     * @param {string} key Key.\n     * @param {T} value Value.\n     */\n    LRUCache.prototype.replace = function (key, value) {\n        this.get(key); // u
 pdate `newest_`\n        this.entries_[key].value_ = value;\n    };\n    /**\n     * @param {string} key Key.\n     * @param {T} value Value.\n     */\n    LRUCache.prototype.set = function (key, value) {\n        assert(!(key in this.entries_), 16); // Tried to set a value for a key that is used already\n        var entry = {\n            key_: key,\n            newer: null,\n            older: this.newest_,\n            value_: value,\n        };\n        if (!this.newest_) {\n            this.oldest_ = entry;\n        }\n        else {\n            this.newest_.newer = entry;\n        }\n        this.newest_ = entry;\n        this.entries_[key] = entry;\n        ++this.count_;\n    };\n    /**\n     * Set a maximum number of entries for the cache.\n     * @param {number} size Cache size.\n     * @api\n     */\n    LRUCache.prototype.setSize = function (size) {\n        this.highWaterMark = size;\n    };\n    return LRUCache;\n}());\nexport default LRUCache;\n//# sourceMappingURL=
 LRUCache.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/TileCache\n */\nimport LRUCache from './structs/LRUCache.js';\nimport { fromKey, getKey } from './tilecoord.js';\nvar TileCache = /** @class */ (function (_super) {\n    __extends(TileCache, _super);\n    function TileCache() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    /**\n     * @param {!Object<string, boolean>} u
 sedTiles Used tiles.\n     */\n    TileCache.prototype.expireCache = function (usedTiles) {\n        while (this.canExpireCache()) {\n            var tile = this.peekLast();\n            if (tile.getKey() in usedTiles) {\n                break;\n            }\n            else {\n                this.pop().release();\n            }\n        }\n    };\n    /**\n     * Prune all tiles from the cache that don't have the same z as the newest tile.\n     */\n    TileCache.prototype.pruneExceptNewestZ = function () {\n        if (this.getCount() === 0) {\n            return;\n        }\n        var key = this.peekFirstKey();\n        var tileCoord = fromKey(key);\n        var z = tileCoord[0];\n        this.forEach(function (tile) {\n            if (tile.tileCoord[0] !== z) {\n                this.remove(getKey(tile.tileCoord));\n                tile.release();\n            }\n        }.bind(this));\n    };\n    return TileCache;\n}(LRUCache));\nexport default TileCache;\n//# sourceMappin
 gURL=TileCache.js.map","/**\n * @module ol/source/TileEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered when a tile starts loading.\n     * @event module:ol/source/Tile.TileSourceEvent#tileloadstart\n     * @api\n     */\n    TILELOADSTART: 'tileloadstart',\n    /**\n     * Triggered when a tile finishes loading, either when its data is loaded,\n     * or when loading was aborted because the tile is no longer needed.\n     * @event module:ol/source/Tile.TileSourceEvent#tileloadend\n     * @api\n     */\n    TILELOADEND: 'tileloadend',\n    /**\n     * Triggered if tile loading results in an error.\n     * @event module:ol/source/Tile.TileSourceEvent#tileloaderror\n     * @api\n     */\n    TILELOADERROR: 'tileloaderror',\n};\n//# sourceMappingURL=TileEventType.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__:
  [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Source\n */\nimport BaseObject from '../Object.js';\nimport SourceState from './State.js';\nimport { abstract } from '../util.js';\nimport { get as getProjection } from '../proj.js';\n/**\n * A function that returns a string or an array of strings representing source\n * attributions.\n *\n * @typedef {function(import(\"../PluggableMap.js\").FrameState): (string|Array<string>)} Attribution\n */\n/**\n * A type that can be used to provide attribution information for data sources.\n *\n * It represents either\n * * a simple string (e.g. `'© Acme
  Inc.'`)\n * * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)\n * * a function that returns a string or array of strings ({@link module:ol/source/Source~Attribution})\n *\n * @typedef {string|Array<string>|Attribution} AttributionLike\n */\n/**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"./State.js\").default} [state='ready']\n * @property {boolean} [wrapX=false]\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for {@link module:ol/layer/Layer~Layer} sources.\n *\n * A generic `change` event is triggered when the state of the source changes.\n * @abstract\n * @api\n */\nvar Source = /** @class */ (function (_super) {\n  
   __extends(Source, _super);\n    /**\n     * @param {Options} options Source options.\n     */\n    function Source(options) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.projection_ = getProjection(options.projection);\n        /**\n         * @private\n         * @type {?Attribution}\n         */\n        _this.attributions_ = adaptAttributions(options.attributions);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.attributionsCollapsible_ =\n            options.attributionsCollapsible !== undefined\n                ? options.attributionsCollapsible\n                : true;\n        /**\n         * This source is currently loading data. Sources that defer loading to the\n         * map's tile queue never set this to `true`.\n         * @type {boolean}\n         */\n        _this.loading = false;\n        /**\n    
      * @private\n         * @type {import(\"./State.js\").default}\n         */\n        _this.state_ =\n            options.state !== undefined ? options.state : SourceState.READY;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;\n        return _this;\n    }\n    /**\n     * Get the attribution function for the source.\n     * @return {?Attribution} Attribution function.\n     */\n    Source.prototype.getAttributions = function () {\n        return this.attributions_;\n    };\n    /**\n     * @return {boolean} Attributions are collapsible.\n     */\n    Source.prototype.getAttributionsCollapsible = function () {\n        return this.attributionsCollapsible_;\n    };\n    /**\n     * Get the projection of the source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    Source.prototype.getProjection = function () {\n        return this
 .projection_;\n    };\n    /**\n     * @abstract\n     * @return {Array<number>|undefined} Resolutions.\n     */\n    Source.prototype.getResolutions = function () {\n        return abstract();\n    };\n    /**\n     * Get the state of the source, see {@link module:ol/source/State~State} for possible states.\n     * @return {import(\"./State.js\").default} State.\n     * @api\n     */\n    Source.prototype.getState = function () {\n        return this.state_;\n    };\n    /**\n     * @return {boolean|undefined} Wrap X.\n     */\n    Source.prototype.getWrapX = function () {\n        return this.wrapX_;\n    };\n    /**\n     * @return {Object|undefined} Context options.\n     */\n    Source.prototype.getContextOptions = function () {\n        return undefined;\n    };\n    /**\n     * Refreshes the source. The source will be cleared, and data from the server will be reloaded.\n     * @api\n     */\n    Source.prototype.refresh = function () {\n        this.changed();\n    };\n    /*
 *\n     * Set the attributions of the source.\n     * @param {AttributionLike|undefined} attributions Attributions.\n     *     Can be passed as `string`, `Array<string>`, {@link module:ol/source/Source~Attribution},\n     *     or `undefined`.\n     * @api\n     */\n    Source.prototype.setAttributions = function (attributions) {\n        this.attributions_ = adaptAttributions(attributions);\n        this.changed();\n    };\n    /**\n     * Set the state of the source.\n     * @param {import(\"./State.js\").default} state State.\n     */\n    Source.prototype.setState = function (state) {\n        this.state_ = state;\n        this.changed();\n    };\n    return Source;\n}(BaseObject));\n/**\n * Turns the attributions option into an attributions function.\n * @param {AttributionLike|undefined} attributionLike The attribution option.\n * @return {?Attribution} An attribution function (or null).\n */\nfunction adaptAttributions(attributionLike) {\n    if (!attributionLike) {\n       
  return null;\n    }\n    if (Array.isArray(attributionLike)) {\n        return function (frameState) {\n            return attributionLike;\n        };\n    }\n    if (typeof attributionLike === 'function') {\n        return attributionLike;\n    }\n    return function (frameState) {\n        return [attributionLike];\n    };\n}\nexport default Source;\n//# sourceMappingURL=Source.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\
 n * @module ol/source/Tile\n */\nimport Event from '../events/Event.js';\nimport Source from './Source.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport { abstract } from '../util.js';\nimport { equivalent } from '../proj.js';\nimport { getKeyZXY, withinExtentAndZ } from '../tilecoord.js';\nimport { getForProjection as getTileGridForProjection, wrapX, } from '../tilegrid.js';\nimport { scale as scaleSize, toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {number} [tilePixelRatio]\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {import(\"./State.js\").default} [state]\n * @property {import(\"../tilegrid/TileGrid.js\").defaul
 t} [tileGrid]\n * @property {boolean} [wrapX=true]\n * @property {number} [transition]\n * @property {string} [key]\n * @property {number} [zDirection=0]\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing images divided into a tile grid.\n * @abstract\n * @api\n */\nvar TileSource = /** @class */ (function (_super) {\n    __extends(TileSource, _super);\n    /**\n     * @param {Options} options SourceTile source options.\n     */\n    function TileSource(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            projection: options.projection,\n            state: options.state,\n            wrapX: options.wrapX,\n        }) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.opaque_ = options.opaque !==
  undefined ? options.opaque : false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.tilePixelRatio_ =\n            options.tilePixelRatio !== undefined ? options.tilePixelRatio : 1;\n        /**\n         * @protected\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        _this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;\n        var tileSize = [256, 256];\n        var tileGrid = options.tileGrid;\n        if (tileGrid) {\n            toSize(tileGrid.getTileSize(tileGrid.getMinZoom()), tileSize);\n        }\n        /**\n         * @protected\n         * @type {import(\"../TileCache.js\").default}\n         */\n        _this.tileCache = new TileCache(options.cacheSize || 0);\n        /**\n         * @protected\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.tmpSize = [0, 0];\n        /**\n         * @private\n         * @type {string}\n         */\n        _t
 his.key_ = options.key || '';\n        /**\n         * @protected\n         * @type {import(\"../Tile.js\").Options}\n         */\n        _this.tileOptions = { transition: options.transition };\n        /**\n         * zDirection hint, read by the renderer. Indicates which resolution should be used\n         * by a renderer if the views resolution does not match any resolution of the tile source.\n         * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n         * will be used. If -1, the nearest higher resolution will be used.\n         * @type {number}\n         */\n        _this.zDirection = options.zDirection ? options.zDirection : 0;\n        return _this;\n    }\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    TileSource.prototype.canExpireCache = function () {\n        return this.tileCache.canExpireCache();\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {!Ob
 ject<string, boolean>} usedTiles Used tiles.\n     */\n    TileSource.prototype.expireCache = function (projection, usedTiles) {\n        var tileCache = this.getTileCacheForProjection(projection);\n        if (tileCache) {\n            tileCache.expireCache(usedTiles);\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {number} z Zoom level.\n     * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n     * @param {function(import(\"../Tile.js\").default):(boolean|void)} callback Called with each\n     *     loaded tile.  If the callback returns `false`, the tile will not be\n     *     considered loaded.\n     * @return {boolean} The tile range is fully covered with loaded tiles.\n     */\n    TileSource.prototype.forEachLoadedTile = function (projection, z, tileRange, callback) {\n        var tileCache = this.getTileCacheForProjection(projection);\n        if (!tileCache) {\n            retu
 rn false;\n        }\n        var covered = true;\n        var tile, tileCoordKey, loaded;\n        for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {\n            for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {\n                tileCoordKey = getKeyZXY(z, x, y);\n                loaded = false;\n                if (tileCache.containsKey(tileCoordKey)) {\n                    tile = /** @type {!import(\"../Tile.js\").default} */ (tileCache.get(tileCoordKey));\n                    loaded = tile.getState() === TileState.LOADED;\n                    if (loaded) {\n                        loaded = callback(tile) !== false;\n                    }\n                }\n                if (!loaded) {\n                    covered = false;\n                }\n            }\n        }\n        return covered;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {number} Gutter.\n     */\n    TileSource.prototype.getGutt
 erForProjection = function (projection) {\n        return 0;\n    };\n    /**\n     * Return the key to be used for all tiles in the source.\n     * @return {string} The key for all tiles.\n     * @protected\n     */\n    TileSource.prototype.getKey = function () {\n        return this.key_;\n    };\n    /**\n     * Set the value to be used as the key for all tiles in the source.\n     * @param {string} key The key for tiles.\n     * @protected\n     */\n    TileSource.prototype.setKey = function (key) {\n        if (this.key_ !== key) {\n            this.key_ = key;\n            this.changed();\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {boolean} Opaque.\n     */\n    TileSource.prototype.getOpaque = function (projection) {\n        return this.opaque_;\n    };\n    /**\n     * @return {Array<number>} Resolutions.\n     */\n    TileSource.prototype.getResolutions = function () {\n        return this.
 tileGrid.getResolutions();\n    };\n    /**\n     * @abstract\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../Tile.js\").default} Tile.\n     */\n    TileSource.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        return abstract();\n    };\n    /**\n     * Return the tile grid of the tile source.\n     * @return {import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     * @api\n     */\n    TileSource.prototype.getTileGrid = function () {\n        return this.tileGrid;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     */\n    TileSource.prototype.getTileGridForProjection = function (proje
 ction) {\n        if (!this.tileGrid) {\n            return getTileGridForProjection(projection);\n        }\n        else {\n            return this.tileGrid;\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../TileCache.js\").default} Tile cache.\n     * @protected\n     */\n    TileSource.prototype.getTileCacheForProjection = function (projection) {\n        var thisProj = this.getProjection();\n        if (thisProj && !equivalent(thisProj, projection)) {\n            return null;\n        }\n        else {\n            return this.tileCache;\n        }\n    };\n    /**\n     * Get the tile pixel ratio for this source. Subclasses may override this\n     * method, which is meant to return a supported pixel ratio that matches the\n     * provided `pixelRatio` as close as possible.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     */\n    TileSource.p
 rototype.getTilePixelRatio = function (pixelRatio) {\n        return this.tilePixelRatio_;\n    };\n    /**\n     * @param {number} z Z.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../size.js\").Size} Tile size.\n     */\n    TileSource.prototype.getTilePixelSize = function (z, pixelRatio, projection) {\n        var tileGrid = this.getTileGridForProjection(projection);\n        var tilePixelRatio = this.getTilePixelRatio(pixelRatio);\n        var tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n        if (tilePixelRatio == 1) {\n            return tileSize;\n        }\n        else {\n            return scaleSize(tileSize, tilePixelRatio, this.tmpSize);\n        }\n    };\n    /**\n     * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate\n     * is outside the resolution and extent range of the tile grid, `null` will be\n     * return
 ed.\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../proj/Projection.js\").default=} opt_projection Projection.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate to be passed to the tileUrlFunction or\n     *     null if no tile URL should be created for the passed `tileCoord`.\n     */\n    TileSource.prototype.getTileCoordForTileUrlFunction = function (tileCoord, opt_projection) {\n        var projection = opt_projection !== undefined ? opt_projection : this.getProjection();\n        var tileGrid = this.getTileGridForProjection(projection);\n        if (this.getWrapX() && projection.isGlobal()) {\n            tileCoord = wrapX(tileGrid, tileCoord, projection);\n        }\n        return withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;\n    };\n    /**\n     * Remove all cached tiles from the source. The next render cycle will fetch new tiles.\n     * @api\n     */\n    TileSource.prototype.
 clear = function () {\n        this.tileCache.clear();\n    };\n    TileSource.prototype.refresh = function () {\n        this.clear();\n        _super.prototype.refresh.call(this);\n    };\n    /**\n     * Increases the cache size if needed\n     * @param {number} tileCount Minimum number of tiles needed.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    TileSource.prototype.updateCacheSize = function (tileCount, projection) {\n        var tileCache = this.getTileCacheForProjection(projection);\n        if (tileCount > tileCache.highWaterMark) {\n            tileCache.highWaterMark = tileCount;\n        }\n    };\n    /**\n     * Marks a tile coord as being used, without triggering a load.\n     * @abstract\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    Ti
 leSource.prototype.useTile = function (z, x, y, projection) { };\n    return TileSource;\n}(Source));\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this\n * type.\n */\nvar TileSourceEvent = /** @class */ (function (_super) {\n    __extends(TileSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../Tile.js\").default} tile The tile.\n     */\n    function TileSourceEvent(type, tile) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The tile related to the event.\n         * @type {import(\"../Tile.js\").default}\n         * @api\n         */\n        _this.tile = tile;\n        return _this;\n    }\n    return TileSourceEvent;\n}(Event));\nexport { TileSourceEvent };\nexport default TileSource;\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/tileurlfunction\n */\nimport { assert } from './asserts.js';\nimport { modulo } from './math.js';\nimpor
 t { hash as tileCoordHash } from './tilecoord.js';\n/**\n * @param {string} template Template.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplate(template, tileGrid) {\n    var zRegEx = /\\{z\\}/g;\n    var xRegEx = /\\{x\\}/g;\n    var yRegEx = /\\{y\\}/g;\n    var dashYRegEx = /\\{-y\\}/g;\n    return (\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    function (tileCoord, pixelRatio, projection) {\n        if (!tileCoord) {\n            return undefined;\n        }\n        else {\n            return template\n                .replace(zRegEx, tileCoord[0].toString())\n                .replace(xRegEx, tileCoord[1].toString())\
 n                .replace(yRegEx, tileCoord[2].toString())\n                .replace(dashYRegEx, function () {\n                var z = tileCoord[0];\n                var range = tileGrid.getFullTileRange(z);\n                assert(range, 55); // The {-y} placeholder requires a tile grid with extent\n                var y = range.getHeight() - tileCoord[2] - 1;\n                return y.toString();\n            });\n        }\n    });\n}\n/**\n * @param {Array<string>} templates Templates.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplates(templates, tileGrid) {\n    var len = templates.length;\n    var tileUrlFunctions = new Array(len);\n    for (var i = 0; i < len; ++i) {\n        tileUrlFunctions[i] = createFromTemplate(templates[i], tileGrid);\n    }\n    return createFromTileUrlFunctions(tileUrlFunctions);\n}\n/**\n * @param {Array<import(\"./Ti
 le.js\").UrlFunction>} tileUrlFunctions Tile URL Functions.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTileUrlFunctions(tileUrlFunctions) {\n    if (tileUrlFunctions.length === 1) {\n        return tileUrlFunctions[0];\n    }\n    return (\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    function (tileCoord, pixelRatio, projection) {\n        if (!tileCoord) {\n            return undefined;\n        }\n        else {\n            var h = tileCoordHash(tileCoord);\n            var index = modulo(h, tileUrlFunctions.length);\n            return tileUrlFunctions[index](tileCoord, pixelRatio, projection);\n        }\n    });\n}\n/**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate
 .\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\nexport function nullTileUrlFunction(tileCoord, pixelRatio, projection) {\n    return undefined;\n}\n/**\n * @param {string} url URL.\n * @return {Array<string>} Array of urls.\n */\nexport function expandUrl(url) {\n    var urls = [];\n    var match = /\\{([a-z])-([a-z])\\}/.exec(url);\n    if (match) {\n        // char range\n        var startCharCode = match[1].charCodeAt(0);\n        var stopCharCode = match[2].charCodeAt(0);\n        var charCode = void 0;\n        for (charCode = startCharCode; charCode <= stopCharCode; ++charCode) {\n            urls.push(url.replace(match[0], String.fromCharCode(charCode)));\n        }\n        return urls;\n    }\n    match = /\\{(\\d+)-(\\d+)\\}/.exec(url);\n    if (match) {\n        // number range\n        var stop_1 = parseInt(match[2], 10);\n        for (var i = parseIn
 t(match[1], 10); i <= stop_1; i++) {\n            urls.push(url.replace(match[0], i.toString()));\n        }\n        return urls;\n    }\n    urls.push(url);\n    return urls;\n}\n//# sourceMappingURL=tileurlfunction.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/UrlTile\n */\nimport TileEventType from './TileEventType.js';\nimport TileSource, { TileSourceEvent } from './Tile.js';\nimport TileState from '.
 ./TileState.js';\nimport { createFromTemplates, expandUrl } from '../tileurlfunction.js';\nimport { getKeyZXY } from '../tilecoord.js';\nimport { getUid } from '../util.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {import(\"./State.js\").default} [state]\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid]\n * @property {import(\"../Tile.js\").LoadFunction} tileLoadFunction\n * @property {number} [tilePixelRatio]\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction]\n * @property {string} [url]\n * @property {Array<string>} [urls]\n * @property {boolean} [wrapX=true]\n * @property {number} [transition]\n * @property {stri
 ng} [key]\n * @property {number} [zDirection=0]\n */\n/**\n * @classdesc\n * Base class for sources providing tiles divided into a tile grid over http.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n */\nvar UrlTile = /** @class */ (function (_super) {\n    __extends(UrlTile, _super);\n    /**\n     * @param {Options} options Image tile options.\n     */\n    function UrlTile(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            opaque: options.opaque,\n            projection: options.projection,\n            state: options.state,\n            tileGrid: options.tileGrid,\n            tilePixelRatio: options.tilePixelRatio,\n            wrapX: options.wrapX,\n            transition: options.transition,\n            key: options.key,\n            attributionsCollapsible: options.attributionsCollapsible,\n            zDirection: options.zDirection,\n        }) || this;\n       
  /**\n         * @private\n         * @type {boolean}\n         */\n        _this.generateTileUrlFunction_ =\n            _this.tileUrlFunction === UrlTile.prototype.tileUrlFunction;\n        /**\n         * @protected\n         * @type {import(\"../Tile.js\").LoadFunction}\n         */\n        _this.tileLoadFunction = options.tileLoadFunction;\n        if (options.tileUrlFunction) {\n            _this.tileUrlFunction = options.tileUrlFunction.bind(_this);\n        }\n        /**\n         * @protected\n         * @type {!Array<string>|null}\n         */\n        _this.urls = null;\n        if (options.urls) {\n            _this.setUrls(options.urls);\n        }\n        else if (options.url) {\n            _this.setUrl(options.url);\n        }\n        /**\n         * @private\n         * @type {!Object<string, boolean>}\n         */\n        _this.tileLoadingKeys_ = {};\n        return _this;\n    }\n    /**\n     * Return the tile load function of the source.\n     * @return {im
 port(\"../Tile.js\").LoadFunction} TileLoadFunction\n     * @api\n     */\n    UrlTile.prototype.getTileLoadFunction = function () {\n        return this.tileLoadFunction;\n    };\n    /**\n     * Return the tile URL function of the source.\n     * @return {import(\"../Tile.js\").UrlFunction} TileUrlFunction\n     * @api\n     */\n    UrlTile.prototype.getTileUrlFunction = function () {\n        return this.tileUrlFunction;\n    };\n    /**\n     * Return the URLs used for this source.\n     * When a tileUrlFunction is used instead of url or urls,\n     * null will be returned.\n     * @return {!Array<string>|null} URLs.\n     * @api\n     */\n    UrlTile.prototype.getUrls = function () {\n        return this.urls;\n    };\n    /**\n     * Handle tile change events.\n     * @param {import(\"../events/Event.js\").default} event Event.\n     * @protected\n     */\n    UrlTile.prototype.handleTileChange = function (event) {\n        var tile = /** @type {import(\"../Tile.js\").default}
  */ (event.target);\n        var uid = getUid(tile);\n        var tileState = tile.getState();\n        var type;\n        if (tileState == TileState.LOADING) {\n            this.tileLoadingKeys_[uid] = true;\n            type = TileEventType.TILELOADSTART;\n        }\n        else if (uid in this.tileLoadingKeys_) {\n            delete this.tileLoadingKeys_[uid];\n            type =\n                tileState == TileState.ERROR\n                    ? TileEventType.TILELOADERROR\n                    : tileState == TileState.LOADED\n                        ? TileEventType.TILELOADEND\n                        : undefined;\n        }\n        if (type != undefined) {\n            this.dispatchEvent(new TileSourceEvent(type, tile));\n        }\n    };\n    /**\n     * Set the tile load function of the source.\n     * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n     * @api\n     */\n    UrlTile.prototype.setTileLoadFunction = function (tileLoadFunct
 ion) {\n        this.tileCache.clear();\n        this.tileLoadFunction = tileLoadFunction;\n        this.changed();\n    };\n    /**\n     * Set the tile URL function of the source.\n     * @param {import(\"../Tile.js\").UrlFunction} tileUrlFunction Tile URL function.\n     * @param {string=} key Optional new tile key for the source.\n     * @api\n     */\n    UrlTile.prototype.setTileUrlFunction = function (tileUrlFunction, key) {\n        this.tileUrlFunction = tileUrlFunction;\n        this.tileCache.pruneExceptNewestZ();\n        if (typeof key !== 'undefined') {\n            this.setKey(key);\n        }\n        else {\n            this.changed();\n        }\n    };\n    /**\n     * Set the URL to use for requests.\n     * @param {string} url URL.\n     * @api\n     */\n    UrlTile.prototype.setUrl = function (url) {\n        var urls = expandUrl(url);\n        this.urls = urls;\n        this.setUrls(urls);\n    };\n    /**\n     * Set the URLs to use for requests.\n     * @par
 am {Array<string>} urls URLs.\n     * @api\n     */\n    UrlTile.prototype.setUrls = function (urls) {\n        this.urls = urls;\n        var key = urls.join('\\n');\n        if (this.generateTileUrlFunction_) {\n            this.setTileUrlFunction(createFromTemplates(urls, this.tileGrid), key);\n        }\n        else {\n            this.setKey(key);\n        }\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    UrlTile.prototype.tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n        return undefined;\n    };\n    /**\n     * Marks a tile coord as being used, without triggering a load.\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     */\n 
    UrlTile.prototype.useTile = function (z, x, y) {\n        var tileCoordKey = getKeyZXY(z, x, y);\n        if (this.tileCache.containsKey(tileCoordKey)) {\n            this.tileCache.get(tileCoordKey);\n        }\n    };\n    return UrlTile;\n}(TileSource));\nexport default UrlTile;\n//# sourceMappingURL=UrlTile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/TileImage\n */\nimport EventType from '../event
 s/EventType.js';\nimport ImageTile from '../ImageTile.js';\nimport ReprojTile from '../reproj/Tile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport UrlTile from './UrlTile.js';\nimport { ENABLE_RASTER_REPROJECTION } from '../reproj/common.js';\nimport { IMAGE_SMOOTHING_DISABLED } from './common.js';\nimport { equivalent, get as getProjection } from '../proj.js';\nimport { getKey, getKeyZXY } from '../tilecoord.js';\nimport { getForProjection as getTileGridForProjection } from '../tilegrid.js';\nimport { getUid } from '../util.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for load
 ed images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Til
 e.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service. For example, if the tile\n * service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX] Whether to wrap the world hori
 zontally. The default, is to\n * request out-of-bounds tiles from the server. When set to `false`, only one\n * world will be rendered. When set to `true`, tiles will be requested for one\n * world only, but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [key] Optional tile key for proper cache fetching\n * @property {number} [zDirection=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n/**\n * @classdesc\n * Base class for sources providing images divided into a tile grid.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nvar TileImage = /** @cla
 ss */ (function (_super) {\n    __extends(TileImage, _super);\n    /**\n     * @param {!Options} options Image tile options.\n     */\n    function TileImage(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            opaque: options.opaque,\n            projection: options.projection,\n            state: options.state,\n            tileGrid: options.tileGrid,\n            tileLoadFunction: options.tileLoadFunction\n                ? options.tileLoadFunction\n                : defaultTileLoadFunction,\n            tilePixelRatio: options.tilePixelRatio,\n            tileUrlFunction: options.tileUrlFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX,\n            transition: options.transition,\n            key: options.key,\n            attributionsCollapsible: options.attributionsCollapsible,\n            zDirection: options.zDirec
 tion,\n        }) || this;\n        /**\n         * @protected\n         * @type {?string}\n         */\n        _this.crossOrigin =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @protected\n         * @type {typeof ImageTile}\n         */\n        _this.tileClass =\n            options.tileClass !== undefined ? options.tileClass : ImageTile;\n        /**\n         * @protected\n         * @type {!Object<string, TileCache>}\n         */\n        _this.tileCacheForProjection = {};\n        /**\n         * @protected\n         * @type {!Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n         */\n        _this.tileGridForProjection = {};\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.reprojectionErrorThreshold_ = options.reprojectionErrorThreshold;\n        /**\n         * @private\n         * @type {object|undefined}\n         */\n        _this.contextOptions_ =\n
             options.imageSmoothing === false ? IMAGE_SMOOTHING_DISABLED : undefined;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderReprojectionEdges_ = false;\n        return _this;\n    }\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    TileImage.prototype.canExpireCache = function () {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            return _super.prototype.canExpireCache.call(this);\n        }\n        if (this.tileCache.canExpireCache()) {\n            return true;\n        }\n        else {\n            for (var key in this.tileCacheForProjection) {\n                if (this.tileCacheForProjection[key].canExpireCache()) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {!Object<string, boolean>} usedTiles Used tiles.\n     */\n    TileIma
 ge.prototype.expireCache = function (projection, usedTiles) {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            _super.prototype.expireCache.call(this, projection, usedTiles);\n            return;\n        }\n        var usedTileCache = this.getTileCacheForProjection(projection);\n        this.tileCache.expireCache(this.tileCache == usedTileCache ? usedTiles : {});\n        for (var id in this.tileCacheForProjection) {\n            var tileCache = this.tileCacheForProjection[id];\n            tileCache.expireCache(tileCache == usedTileCache ? usedTiles : {});\n        }\n    };\n    /**\n     * @return {Object|undefined} Context options.\n     */\n    TileImage.prototype.getContextOptions = function () {\n        return this.contextOptions_;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {number} Gutter.\n     */\n    TileImage.prototype.getGutterForProjection = function (projection) {\n        if (ENABLE_RAS
 TER_REPROJECTION &&\n            this.getProjection() &&\n            projection &&\n            !equivalent(this.getProjection(), projection)) {\n            return 0;\n        }\n        else {\n            return this.getGutter();\n        }\n    };\n    /**\n     * @return {number} Gutter.\n     */\n    TileImage.prototype.getGutter = function () {\n        return 0;\n    };\n    /**\n     * Return the key to be used for all tiles in the source.\n     * @return {string} The key for all tiles.\n     * @protected\n     */\n    TileImage.prototype.getKey = function () {\n        return (_super.prototype.getKey.call(this) +\n            (this.contextOptions_ ? '\\n' + JSON.stringify(this.contextOptions_) : ''));\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {boolean} Opaque.\n     */\n    TileImage.prototype.getOpaque = function (projection) {\n        if (ENABLE_RASTER_REPROJECTION &&\n            this.getProjecti
 on() &&\n            projection &&\n            !equivalent(this.getProjection(), projection)) {\n            return false;\n        }\n        else {\n            return _super.prototype.getOpaque.call(this, projection);\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     */\n    TileImage.prototype.getTileGridForProjection = function (projection) {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            return _super.prototype.getTileGridForProjection.call(this, projection);\n        }\n        var thisProj = this.getProjection();\n        if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) {\n            return this.tileGrid;\n        }\n        else {\n            var projKey = getUid(projection);\n            if (!(projKey in this.tileGridForProjection)) {\n                this.tileGridForProjection[projKey] = getTileGridFo
 rProjection(projection);\n            }\n            return this.tileGridForProjection[projKey];\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../TileCache.js\").default} Tile cache.\n     */\n    TileImage.prototype.getTileCacheForProjection = function (projection) {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            return _super.prototype.getTileCacheForProjection.call(this, projection);\n        }\n        var thisProj = this.getProjection();\n        if (!thisProj || equivalent(thisProj, projection)) {\n            return this.tileCache;\n        }\n        else {\n            var projKey = getUid(projection);\n            if (!(projKey in this.tileCacheForProjection)) {\n                this.tileCacheForProjection[projKey] = new TileCache(this.tileCache.highWaterMark);\n            }\n            return this.tileCacheForProjection[projKey];\n        }\n    };\n    /**\n     * @param
  {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {string} key The key set on the tile.\n     * @return {!import(\"../Tile.js\").default} Tile.\n     * @private\n     */\n    TileImage.prototype.createTile_ = function (z, x, y, pixelRatio, projection, key) {\n        var tileCoord = [z, x, y];\n        var urlTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n        var tileUrl = urlTileCoord\n            ? this.tileUrlFunction(urlTileCoord, pixelRatio, projection)\n            : undefined;\n        var tile = new this.tileClass(tileCoord, tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY, tileUrl !== undefined ? tileUrl : '', this.crossOrigin, this.tileLoadFunction, this.tileOptions);\n        tile.key = key;\n        tile.addEventListener(
 EventType.CHANGE, this.handleTileChange.bind(this));\n        return tile;\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../Tile.js\").default} Tile.\n     */\n    TileImage.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        var sourceProjection = this.getProjection();\n        if (!ENABLE_RASTER_REPROJECTION ||\n            !sourceProjection ||\n            !projection ||\n            equivalent(sourceProjection, projection)) {\n            return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection);\n        }\n        else {\n            var cache = this.getTileCacheForProjection(projection);\n            var tileCoord = [z, x, y];\n            var tile = void 0;\n            va
 r tileCoordKey = getKey(tileCoord);\n            if (cache.containsKey(tileCoordKey)) {\n                tile = cache.get(tileCoordKey);\n            }\n            var key = this.getKey();\n            if (tile && tile.key == key) {\n                return tile;\n            }\n            else {\n                var sourceTileGrid = this.getTileGridForProjection(sourceProjection);\n                var targetTileGrid = this.getTileGridForProjection(projection);\n                var wrappedTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n                var newTile = new ReprojTile(sourceProjection, sourceTileGrid, projection, targetTileGrid, tileCoord, wrappedTileCoord, this.getTilePixelRatio(pixelRatio), this.getGutter(), function (z, x, y, pixelRatio) {\n                    return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);\n                }.bind(this), this.reprojectionErrorThreshold_, this.renderReprojectionEdges_, this.contextOptions_)
 ;\n                newTile.key = key;\n                if (tile) {\n                    newTile.interimTile = tile;\n                    newTile.refreshInterimChain();\n                    cache.replace(tileCoordKey, newTile);\n                }\n                else {\n                    cache.set(tileCoordKey, newTile);\n                }\n                return newTile;\n            }\n        }\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {!import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../Tile.js\").default} Tile.\n     * @protected\n     */\n    TileImage.prototype.getTileInternal = function (z, x, y, pixelRatio, projection) {\n        var tile = null;\n        var tileCoordKey = getKeyZXY(z, x, y);\n        var key = this.getKey();\n        if (!this.tileCache.co
 ntainsKey(tileCoordKey)) {\n            tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n            this.tileCache.set(tileCoordKey, tile);\n        }\n        else {\n            tile = this.tileCache.get(tileCoordKey);\n            if (tile.key != key) {\n                // The source's params changed. If the tile has an interim tile and if we\n                // can use it then we use it. Otherwise we create a new tile.  In both\n                // cases we attempt to assign an interim tile to the new tile.\n                var interimTile = tile;\n                tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n                //make the new tile the head of the list,\n                if (interimTile.getState() == TileState.IDLE) {\n                    //the old tile hasn't begun loading yet, and is now outdated, so we can simply discard it\n                    tile.interimTile = interimTile.interimTile;\n                }\n                else {\n
                     tile.interimTile = interimTile;\n                }\n                tile.refreshInterimChain();\n                this.tileCache.replace(tileCoordKey, tile);\n            }\n        }\n        return tile;\n    };\n    /**\n     * Sets whether to render reprojection edges or not (usually for debugging).\n     * @param {boolean} render Render the edges.\n     * @api\n     */\n    TileImage.prototype.setRenderReprojectionEdges = function (render) {\n        if (!ENABLE_RASTER_REPROJECTION ||\n            this.renderReprojectionEdges_ == render) {\n            return;\n        }\n        this.renderReprojectionEdges_ = render;\n        for (var id in this.tileCacheForProjection) {\n            this.tileCacheForProjection[id].clear();\n        }\n        this.changed();\n    };\n    /**\n     * Sets the tile grid to use when reprojecting the tiles to the given\n     * projection instead of the default tile grid for the projection.\n     *\n     * This can be useful wh
 en the default tile grid cannot be created\n     * (e.g. projection has no extent defined) or\n     * for optimization reasons (custom tile size, resolutions, ...).\n     *\n     * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n     * @param {import(\"../tilegrid/TileGrid.js\").default} tilegrid Tile grid to use for the projection.\n     * @api\n     */\n    TileImage.prototype.setTileGridForProjection = function (projection, tilegrid) {\n        if (ENABLE_RASTER_REPROJECTION) {\n            var proj = getProjection(projection);\n            if (proj) {\n                var projKey = getUid(proj);\n                if (!(projKey in this.tileGridForProjection)) {\n                    this.tileGridForProjection[projKey] = tilegrid;\n                }\n            }\n        }\n    };\n    return TileImage;\n}(UrlTile));\n/**\n * @param {ImageTile} imageTile Image tile.\n * @param {string} src Source.\n */\nfunction defaultTileLoadFunction(imageTile, src) {\n   
  /** @type {HTMLImageElement|HTMLVideoElement} */ (imageTile.getImage()).src = src;\n}\nexport default TileImage;\n//# sourceMappingURL=TileImage.js.map","/**\n * @module ol/net\n */\nimport { getUid } from './util.js';\n/**\n * Simple JSONP helper. Supports error callbacks and a custom callback param.\n * The error callback will be called when no JSONP is executed after 10 seconds.\n *\n * @param {string} url Request url. A 'callback' query parameter will be\n *     appended.\n * @param {Function} callback Callback on success.\n * @param {function()=} opt_errback Callback on error.\n * @param {string=} opt_callbackParam Custom query parameter for the JSONP\n *     callback. Default is 'callback'.\n */\nexport function jsonp(url, callback, opt_errback, opt_callbackParam) {\n    var script = document.createElement('script');\n    var key = 'olc_' + getUid(callback);\n    function cleanup() {\n        delete window[key];\n        script.parentNode.removeChild(script);\n    }\n    scri
 pt.async = true;\n    script.src =\n        url +\n            (url.indexOf('?') == -1 ? '?' : '&') +\n            (opt_callbackParam || 'callback') +\n            '=' +\n            key;\n    var timer = setTimeout(function () {\n        cleanup();\n        if (opt_errback) {\n            opt_errback();\n        }\n    }, 10000);\n    window[key] = function (data) {\n        clearTimeout(timer);\n        cleanup();\n        callback(data);\n    };\n    document.getElementsByTagName('head')[0].appendChild(script);\n}\n//# sourceMappingURL=net.js.map","/**\n * @module ol/source/BingMaps\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return functio
 n (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport SourceState from './State.js';\nimport TileImage from './TileImage.js';\nimport { applyTransform, intersects } from '../extent.js';\nimport { createFromTileUrlFunctions } from '../tileurlfunction.js';\nimport { createOrUpdate } from '../tilecoord.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\nimport { get as getProjection, getTransformFromProjections } from '../proj.js';\nimport { jsonp as requestJSONP } from '../net.js';\n/**\n * @param {import('../tilecoord.js').TileCoord} tileCoord Tile coord.\n * @return {string} Quad key.\n */\nexport function quadKey(tileCoord) {\n    var z = tileCoord[0];\n    var digits = new Array(z);\n    var mask = 1 << (z - 1);\n    var i, charCode;\n    for (i = 0; i < z; ++i) {\n        // 48 is charCode for 0 - '0'.charCo
 deAt(0)\n        charCode = 48;\n        if (tileCoord[1] & mask) {\n            charCode += 1;\n        }\n        if (tileCoord[2] & mask) {\n            charCode += 2;\n        }\n        digits[i] = String.fromCharCode(charCode);\n        mask >>= 1;\n    }\n    return digits.join('');\n}\n/**\n * The attribution containing a link to the Microsoft® Bing™ Maps Platform APIs’\n * Terms Of Use.\n * @const\n * @type {string}\n */\nvar TOS_ATTRIBUTION = '<a class=\"ol-attribution-bing-tos\" ' +\n    'href=\"https://www.microsoft.com/maps/product/terms.html\" target=\"_blank\">' +\n    'Terms of Use</a>';\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {boolean} [hidpi=false] If `true` hidpi tiles will be requested.\n * @property {string} [culture='en-us'] Culture code.\n * @property {string} key Bing Maps API key. Get yours at http://www.bingmapsporta
 l.com/.\n * @property {string} imagerySet Type of imagery.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {number} [maxZoom=21] Max zoom. Default is what's advertized by the BingMaps service.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n/**\n * @typedef {Object} BingMapsImageryMetadataResponse\n * @property {number} statusCode The response status code\n * @prope
 rty {string} statusDescription The response status description\n * @property {string} authenticationResultCode The authentication result code\n * @property {Array<ResourceSet>} resourceSets The array of resource sets\n */\n/**\n * @typedef {Object} ResourceSet\n * @property {Array<Resource>} resources\n */\n/**\n * @typedef {Object} Resource\n * @property {number} imageHeight The image height\n * @property {number} imageWidth The image width\n * @property {number} zoomMin The minimum zoom level\n * @property {number} zoomMax The maximum zoom level\n * @property {string} imageUrl The image URL\n * @property {Array<string>} imageUrlSubdomains The image URL subdomains for rotation\n * @property {Array<ImageryProvider>} [imageryProviders] The array of ImageryProviders\n */\n/**\n * @typedef {Object} ImageryProvider\n * @property {Array<CoverageArea>} coverageAreas The coverage areas\n * @property {string} [attribution] The attribution\n */\n/**\n * @typedef {Object} CoverageArea\n * @pr
 operty {number} zoomMin The minimum zoom\n * @property {number} zoomMax The maximum zoom\n * @property {Array<number>} bbox The coverage bounding box\n */\n/**\n * @classdesc\n * Layer source for Bing Maps tile data.\n * @api\n */\nvar BingMaps = /** @class */ (function (_super) {\n    __extends(BingMaps, _super);\n    /**\n     * @param {Options} options Bing Maps options.\n     */\n    function BingMaps(options) {\n        var _this = this;\n        var hidpi = options.hidpi !== undefined ? options.hidpi : false;\n        _this = _super.call(this, {\n            cacheSize: options.cacheSize,\n            crossOrigin: 'anonymous',\n            imageSmoothing: options.imageSmoothing,\n            opaque: true,\n            projection: getProjection('EPSG:3857'),\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            state: SourceState.LOADING,\n            tileLoadFunction: options.tileLoadFunction,\n            tilePixelRatio: hidpi ? 2 : 1,\n    
         wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = hidpi;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.culture_ = options.culture !== undefined ? options.culture : 'en-us';\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxZoom_ = options.maxZoom !== undefined ? options.maxZoom : -1;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.apiKey_ = options.key;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.imagerySet_ = options.imagerySet;\n        var url = 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/' +\n            _this.imagerySet_ +\n            '?uriScheme=https&include=ImageryProviders&key=' +\n            _this.apiKey_ +\n     
        '&c=' +\n            _this.culture_;\n        requestJSONP(url, _this.handleImageryMetadataResponse.bind(_this), undefined, 'jsonp');\n        return _this;\n    }\n    /**\n     * Get the api key used for this source.\n     *\n     * @return {string} The api key.\n     * @api\n     */\n    BingMaps.prototype.getApiKey = function () {\n        return this.apiKey_;\n    };\n    /**\n     * Get the imagery set associated with this source.\n     *\n     * @return {string} The imagery set.\n     * @api\n     */\n    BingMaps.prototype.getImagerySet = function () {\n        return this.imagerySet_;\n    };\n    /**\n     * @param {BingMapsImageryMetadataResponse} response Response.\n     */\n    BingMaps.prototype.handleImageryMetadataResponse = function (response) {\n        if (response.statusCode != 200 ||\n            response.statusDescription != 'OK' ||\n            response.authenticationResultCode != 'ValidCredentials' ||\n            response.resourceSets.length != 1 ||\n
             response.resourceSets[0].resources.length != 1) {\n            this.setState(SourceState.ERROR);\n            return;\n        }\n        var resource = response.resourceSets[0].resources[0];\n        var maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;\n        var sourceProjection = this.getProjection();\n        var extent = extentFromProjection(sourceProjection);\n        var scale = this.hidpi_ ? 2 : 1;\n        var tileSize = resource.imageWidth == resource.imageHeight\n            ? resource.imageWidth / scale\n            : [resource.imageWidth / scale, resource.imageHeight / scale];\n        var tileGrid = createXYZ({\n            extent: extent,\n            minZoom: resource.zoomMin,\n            maxZoom: maxZoom,\n            tileSize: tileSize,\n        });\n        this.tileGrid = tileGrid;\n        var culture = this.culture_;\n        var hidpi = this.hidpi_;\n        this.tileUrlFunction = createFromTileUrlFunctions(resource.imageUrlSubd
 omains.map(function (subdomain) {\n            /** @type {import('../tilecoord.js').TileCoord} */\n            var quadKeyTileCoord = [0, 0, 0];\n            var imageUrl = resource.imageUrl\n                .replace('{subdomain}', subdomain)\n                .replace('{culture}', culture);\n            return (\n            /**\n             * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n             * @param {number} pixelRatio Pixel ratio.\n             * @param {import(\"../proj/Projection.js\").default} projection Projection.\n             * @return {string|undefined} Tile URL.\n             */\n            function (tileCoord, pixelRatio, projection) {\n                if (!tileCoord) {\n                    return undefined;\n                }\n                else {\n                    createOrUpdate(tileCoord[0], tileCoord[1], tileCoord[2], quadKeyTileCoord);\n                    var url = imageUrl;\n                    if (hidpi) {\n          
               url += '&dpi=d1&device=mobile';\n                    }\n                    return url.replace('{quadkey}', quadKey(quadKeyTileCoord));\n                }\n            });\n        }));\n        if (resource.imageryProviders) {\n            var transform_1 = getTransformFromProjections(getProjection('EPSG:4326'), this.getProjection());\n            this.setAttributions(function (frameState) {\n                var attributions = [];\n                var viewState = frameState.viewState;\n                var tileGrid = this.getTileGrid();\n                var z = tileGrid.getZForResolution(viewState.resolution, this.zDirection);\n                var tileCoord = tileGrid.getTileCoordForCoordAndZ(viewState.center, z);\n                var zoom = tileCoord[0];\n                resource.imageryProviders.map(function (imageryProvider) {\n                    var intersecting = false;\n                    var coverageAreas = imageryProvider.coverageAreas;\n                    f
 or (var i = 0, ii = coverageAreas.length; i < ii; ++i) {\n                        var coverageArea = coverageAreas[i];\n                        if (zoom >= coverageArea.zoomMin &&\n                            zoom <= coverageArea.zoomMax) {\n                            var bbox = coverageArea.bbox;\n                            var epsg4326Extent = [bbox[1], bbox[0], bbox[3], bbox[2]];\n                            var extent_1 = applyTransform(epsg4326Extent, transform_1);\n                            if (intersects(extent_1, frameState.extent)) {\n                                intersecting = true;\n                                break;\n                            }\n                        }\n                    }\n                    if (intersecting) {\n                        attributions.push(imageryProvider.attribution);\n                    }\n                });\n                attributions.push(TOS_ATTRIBUTION);\n                return attributions;\n            }.bind(
 this));\n        }\n        this.setState(SourceState.READY);\n    };\n    return BingMaps;\n}(TileImage));\nexport default BingMaps;\n//# sourceMappingURL=BingMaps.js.map","/**\n * @module ol/source/XYZ\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileImage from './TileImage.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").Attribu
 tionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {number} [maxZoom=42
 ] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Not used if `tileGri
 d` is provided.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get\n * tile URL given a tile coordinate and the projection.\n * Required if `url` or `urls` are not provided.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,\n * and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,\n * may be used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number} [zDirection=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lo
 wer resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n/**\n * @classdesc\n * Layer source for tile data with URLs in a set XYZ format that are\n * defined in a URL template. By default, this follows the widely-used\n * Google grid where `x` 0 and `y` 0 are in the top left. Grids like\n * TMS where `x` 0 and `y` 0 are in the bottom left can be used by\n * using the `{-y}` placeholder in the URL template, so long as the\n * source does not have a custom tile grid. In this case,\n * {@link module:ol/source/TileImage} can be used with a `tileUrlFunction`\n * such as:\n *\n *  tileUrlFunction: function(coordinate) {\n *    return 'http://mapserver.com/' + coordinate[0] + '/' +\n *        coordinate[1] + '/' + coordinate[2] + '.png';\n *    }\n *\n * @api\n */\nvar XYZ = /** @class */ (function (_super) {\n    __extends(XYZ, _super);\n    /**\n     * @param {Options=} opt_options XYZ options.\n     */\n    function XYZ(opt_options) {\n        var _this 
 = this;\n        var options = opt_options || {};\n        var projection = options.projection !== undefined ? options.projection : 'EPSG:3857';\n        var tileGrid = options.tileGrid !== undefined\n            ? options.tileGrid\n            : createXYZ({\n                extent: extentFromProjection(projection),\n                maxResolution: options.maxResolution,\n                maxZoom: options.maxZoom,\n                minZoom: options.minZoom,\n                tileSize: options.tileSize,\n            });\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            opaque: options.opaque,\n            projection: projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileGrid: tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n     
        tilePixelRatio: options.tilePixelRatio,\n            tileUrlFunction: options.tileUrlFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n            attributionsCollapsible: options.attributionsCollapsible,\n            zDirection: options.zDirection,\n        }) || this;\n        return _this;\n    }\n    return XYZ;\n}(TileImage));\nexport default XYZ;\n//# sourceMappingURL=XYZ.js.map","/**\n * @module ol/source/CartoDB\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        
 extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport SourceState from './State.js';\nimport XYZ from './XYZ.js';\nimport { assign } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [maxZoom=18] Max zoom.\n * @property {number} [minZoo
 m] Minimum zoom.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {Object} [config] If using anonymous maps, the CartoDB config to use. See\n * http://docs.cartodb.com/cartodb-platform/maps-api/anonymous-maps/\n * for more detail.\n * If using named maps, a key-value lookup with the template parameters.\n * See http://docs.cartodb.com/cartodb-platform/maps-api/named-maps/\n * for more detail.\n * @property {string} [map] If using named maps, this will be the name of the template to load.\n * See http://docs.cartodb.com/cartodb-platform/maps-api/named-maps/\n * for more detail.\n * @property {string} account If using named maps, this will be the name of the template to load.\n */\n/**\n * @typedef {Object} CartoDBLayerInfo\n * @property {string} layergroupid The layer group ID\n * @property {{https: string}} cdn_url The CDN URL\n */\n/**\n * @classdesc\n * Layer source for the CartoDB Maps API.\n * @api\n */\nvar CartoDB = /** @class */ (func
 tion (_super) {\n    __extends(CartoDB, _super);\n    /**\n     * @param {Options} options CartoDB options.\n     */\n    function CartoDB(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18,\n            minZoom: options.minZoom,\n            projection: options.projection,\n            wrapX: options.wrapX,\n        }) || this;\n        /**\n         * @type {string}\n         * @private\n         */\n        _this.account_ = options.account;\n        /**\n         * @type {string}\n         * @private\n         */\n        _this.mapId_ = options.map || '';\n        /**\n         * @type {!Object}\n         * @private\n         */\n        _this.config_ = options.config || {};\n        /**\n         * @type {!Object<string, CartoDBLayerInfo>}\n         * @private\n      
    */\n        _this.templateCache_ = {};\n        _this.initializeMap_();\n        return _this;\n    }\n    /**\n     * Returns the current config.\n     * @return {!Object} The current configuration.\n     * @api\n     */\n    CartoDB.prototype.getConfig = function () {\n        return this.config_;\n    };\n    /**\n     * Updates the carto db config.\n     * @param {Object} config a key-value lookup. Values will replace current values\n     *     in the config.\n     * @api\n     */\n    CartoDB.prototype.updateConfig = function (config) {\n        assign(this.config_, config);\n        this.initializeMap_();\n    };\n    /**\n     * Sets the CartoDB config\n     * @param {Object} config In the case of anonymous maps, a CartoDB configuration\n     *     object.\n     * If using named maps, a key-value lookup with the template parameters.\n     * @api\n     */\n    CartoDB.prototype.setConfig = function (config) {\n        this.config_ = config || {};\n        this.initializeMap
 _();\n    };\n    /**\n     * Issue a request to initialize the CartoDB map.\n     * @private\n     */\n    CartoDB.prototype.initializeMap_ = function () {\n        var paramHash = JSON.stringify(this.config_);\n        if (this.templateCache_[paramHash]) {\n            this.applyTemplate_(this.templateCache_[paramHash]);\n            return;\n        }\n        var mapUrl = 'https://' + this.account_ + '.carto.com/api/v1/map';\n        if (this.mapId_) {\n            mapUrl += '/named/' + this.mapId_;\n        }\n        var client = new XMLHttpRequest();\n        client.addEventListener('load', this.handleInitResponse_.bind(this, paramHash));\n        client.addEventListener('error', this.handleInitError_.bind(this));\n        client.open('POST', mapUrl);\n        client.setRequestHeader('Content-type', 'application/json');\n        client.send(JSON.stringify(this.config_));\n    };\n    /**\n     * Handle map initialization response.\n     * @param {string} paramHash a hash repr
 esenting the parameter set that was used\n     *     for the request\n     * @param {Event} event Event.\n     * @private\n     */\n    CartoDB.prototype.handleInitResponse_ = function (paramHash, event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 && client.status < 300)) {\n            var response = void 0;\n            try {\n                response = /** @type {CartoDBLayerInfo} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.setState(SourceState.ERROR);\n                return;\n            }\n            this.applyTemplate_(response);\n            this.templateCache_[paramHash] = response;\n            this.setState(SourceState.READY);\n        }\n        else {\n            this.setState(SourceState.ERROR);\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event Event.\n     */\n  
   CartoDB.prototype.handleInitError_ = function (event) {\n        this.setState(SourceState.ERROR);\n    };\n    /**\n     * Apply the new tile urls returned by carto db\n     * @param {CartoDBLayerInfo} data Result of carto db call.\n     * @private\n     */\n    CartoDB.prototype.applyTemplate_ = function (data) {\n        var tilesUrl = 'https://' +\n            data.cdn_url.https +\n            '/' +\n            this.account_ +\n            '/api/v1/map/' +\n            data.layergroupid +\n            '/{z}/{x}/{y}.png';\n        this.setUrl(tilesUrl);\n    };\n    return CartoDB;\n}(XYZ));\nexport default CartoDB;\n//# sourceMappingURL=CartoDB.js.map","/**\n * @module ol/structs/RBush\n */\nimport RBush_ from 'rbush/rbush.js';\nimport { createOrUpdate, equals } from '../extent.js';\nimport { getUid } from '../util.js';\nimport { isEmpty } from '../obj.js';\n/**\n * @typedef {Object} Entry\n * @property {number} minX\n * @property {number} minY\n * @property {number} maxX\n *
  @property {number} maxY\n * @property {Object} [value]\n */\n/**\n * @classdesc\n * Wrapper around the RBush by Vladimir Agafonkin.\n * See https://github.com/mourner/rbush.\n *\n * @template T\n */\nvar RBush = /** @class */ (function () {\n    /**\n     * @param {number=} opt_maxEntries Max entries.\n     */\n    function RBush(opt_maxEntries) {\n        /**\n         * @private\n         */\n        this.rbush_ = new RBush_(opt_maxEntries);\n        /**\n         * A mapping between the objects added to this rbush wrapper\n         * and the objects that are actually added to the internal rbush.\n         * @private\n         * @type {Object<string, Entry>}\n         */\n        this.items_ = {};\n    }\n    /**\n     * Insert a value into the RBush.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {T} value Value.\n     */\n    RBush.prototype.insert = function (extent, value) {\n        /** @type {Entry} */\n        var item = {\n            minX:
  extent[0],\n            minY: extent[1],\n            maxX: extent[2],\n            maxY: extent[3],\n            value: value,\n        };\n        this.rbush_.insert(item);\n        this.items_[getUid(value)] = item;\n    };\n    /**\n     * Bulk-insert values into the RBush.\n     * @param {Array<import(\"../extent.js\").Extent>} extents Extents.\n     * @param {Array<T>} values Values.\n     */\n    RBush.prototype.load = function (extents, values) {\n        var items = new Array(values.length);\n        for (var i = 0, l = values.length; i < l; i++) {\n            var extent = extents[i];\n            var value = values[i];\n            /** @type {Entry} */\n            var item = {\n                minX: extent[0],\n                minY: extent[1],\n                maxX: extent[2],\n                maxY: extent[3],\n                value: value,\n            };\n            items[i] = item;\n            this.items_[getUid(value)] = item;\n        }\n        this.rbush_.load(
 items);\n    };\n    /**\n     * Remove a value from the RBush.\n     * @param {T} value Value.\n     * @return {boolean} Removed.\n     */\n    RBush.prototype.remove = function (value) {\n        var uid = getUid(value);\n        // get the object in which the value was wrapped when adding to the\n        // internal rbush. then use that object to do the removal.\n        var item = this.items_[uid];\n        delete this.items_[uid];\n        return this.rbush_.remove(item) !== null;\n    };\n    /**\n     * Update the extent of a value in the RBush.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {T} value Value.\n     */\n    RBush.prototype.update = function (extent, value) {\n        var item = this.items_[getUid(value)];\n        var bbox = [item.minX, item.minY, item.maxX, item.maxY];\n        if (!equals(bbox, extent)) {\n            this.remove(value);\n            this.insert(extent, value);\n        }\n    };\n    /**\n     * Return all val
 ues in the RBush.\n     * @return {Array<T>} All.\n     */\n    RBush.prototype.getAll = function () {\n        var items = this.rbush_.all();\n        return items.map(function (item) {\n            return item.value;\n        });\n    };\n    /**\n     * Return all values in the given extent.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {Array<T>} All in extent.\n     */\n    RBush.prototype.getInExtent = function (extent) {\n        /** @type {Entry} */\n        var bbox = {\n            minX: extent[0],\n            minY: extent[1],\n            maxX: extent[2],\n            maxY: extent[3],\n        };\n        var items = this.rbush_.search(bbox);\n        return items.map(function (item) {\n            return item.value;\n        });\n    };\n    /**\n     * Calls a callback function with each value in the tree.\n     * If the callback returns a truthy value, this value is returned without\n     * checking the rest of the tree.\n     * @para
 m {function(T): *} callback Callback.\n     * @return {*} Callback return value.\n     */\n    RBush.prototype.forEach = function (callback) {\n        return this.forEach_(this.getAll(), callback);\n    };\n    /**\n     * Calls a callback function with each value in the provided extent.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {function(T): *} callback Callback.\n     * @return {*} Callback return value.\n     */\n    RBush.prototype.forEachInExtent = function (extent, callback) {\n        return this.forEach_(this.getInExtent(extent), callback);\n    };\n    /**\n     * @param {Array<T>} values Values.\n     * @param {function(T): *} callback Callback.\n     * @private\n     * @return {*} Callback return value.\n     */\n    RBush.prototype.forEach_ = function (values, callback) {\n        var result;\n        for (var i = 0, l = values.length; i < l; i++) {\n            result = callback(values[i]);\n            if (result) {\n              
   return result;\n            }\n        }\n        return result;\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    RBush.prototype.isEmpty = function () {\n        return isEmpty(this.items_);\n    };\n    /**\n     * Remove all values from the RBush.\n     */\n    RBush.prototype.clear = function () {\n        this.rbush_.clear();\n        this.items_ = {};\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent=} opt_extent Extent.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     */\n    RBush.prototype.getExtent = function (opt_extent) {\n        var data = this.rbush_.toJSON();\n        return createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, opt_extent);\n    };\n    /**\n     * @param {RBush} rbush R-Tree.\n     */\n    RBush.prototype.concat = function (rbush) {\n        this.rbush_.load(rbush.rbush_.all());\n        for (var i in rbush.items_) {\n            this.items_[i] = rbush.items_[i];\n        }\n    };\n    return R
 Bush;\n}());\nexport default RBush;\n//# sourceMappingURL=RBush.js.map","/**\n * @module ol/source/VectorEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered when a feature is added to the source.\n     * @event module:ol/source/Vector.VectorSourceEvent#addfeature\n     * @api\n     */\n    ADDFEATURE: 'addfeature',\n    /**\n     * Triggered when a feature is updated.\n     * @event module:ol/source/Vector.VectorSourceEvent#changefeature\n     * @api\n     */\n    CHANGEFEATURE: 'changefeature',\n    /**\n     * Triggered when the clear method is called on the source.\n     * @event module:ol/source/Vector.VectorSourceEvent#clear\n     * @api\n     */\n    CLEAR: 'clear',\n    /**\n     * Triggered when a feature is removed from the source.\n     * See {@link module:ol/source/Vector#clear source.clear()} for exceptions.\n     * @event module:ol/source/Vector.VectorSourceEvent#removefeature\n     * @api\n     */\n    REMOVEFEATURE: 'removefeature'
 ,\n};\n//# sourceMappingURL=VectorEventType.js.map","/**\n * @module ol/source/Vector\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RBush from '../structs/RBush.js';\nimport Source 
 from './Source.js';\nimport SourceState from './State.js';\nimport VectorEventType from './VectorEventType.js';\nimport { TRUE, VOID } from '../functions.js';\nimport { all as allStrategy } from '../loadingstrategy.js';\nimport { assert } from '../asserts.js';\nimport { containsExtent, equals } from '../extent.js';\nimport { extend } from '../array.js';\nimport { getUid } from '../util.js';\nimport { getValues, isEmpty } from '../obj.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { xhr } from '../featureloader.js';\n/**\n * A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and\n * returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this\n * is one of the standard {@link module:ol/loadingstrategy} strategies.\n *\n * @typedef {function(import(\"../extent.js\").Extent, number): Array<import(\"../extent.js\").Extent>} LoadingStrategy\n * @api\n */\n/**\n * @classdesc\n * Events emitted by {@lin
 k module:ol/source/Vector} instances are instances of this\n * type.\n * @template {import(\"../geom/Geometry.js\").default} Geometry\n */\nvar VectorSourceEvent = /** @class */ (function (_super) {\n    __extends(VectorSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../Feature.js\").default<Geometry>=} opt_feature Feature.\n     */\n    function VectorSourceEvent(type, opt_feature) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The feature being added or removed.\n         * @type {import(\"../Feature.js\").default<Geometry>|undefined}\n         * @api\n         */\n        _this.feature = opt_feature;\n        return _this;\n    }\n    return VectorSourceEvent;\n}(Event));\nexport { VectorSourceEvent };\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {Array<import(\"../Feature.js\").default>|Collection<import(\"../Featur
 e.js\").default>} [features]\n * Features. If provided as {@link module:ol/Collection}, the features in the source\n * and the collection will stay in sync.\n * @property {import(\"../format/Feature.js\").default} [format] The feature format used by the XHR\n * feature loader when `url` is set. Required if `url` is set, otherwise ignored.\n * @property {import(\"../featureloader.js\").FeatureLoader} [loader]\n * The loader function used to load features, from a remote source for example.\n * If this is not set and `url` is set, the source will create and use an XHR\n * feature loader.\n *\n * Example:\n *\n * ```js\n * import {Vector} from 'ol/source';\n * import {GeoJSON} from 'ol/format';\n * import {bbox} from 'ol/loadingstrategy';\n *\n * var vectorSource = new Vector({\n *   format: new GeoJSON(),\n *   loader: function(extent, resolution, projection) {\n *      var proj = projection.getCode();\n *      var url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +\n *          
 'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +\n *          'outputFormat=application/json&srsname=' + proj + '&' +\n *          'bbox=' + extent.join(',') + ',' + proj;\n *      var xhr = new XMLHttpRequest();\n *      xhr.open('GET', url);\n *      var onError = function() {\n *        vectorSource.removeLoadedExtent(extent);\n *      }\n *      xhr.onerror = onError;\n *      xhr.onload = function() {\n *        if (xhr.status == 200) {\n *          vectorSource.addFeatures(\n *              vectorSource.getFormat().readFeatures(xhr.responseText));\n *        } else {\n *          onError();\n *        }\n *      }\n *      xhr.send();\n *    },\n *    strategy: bbox\n *  });\n * ```\n * @property {boolean} [overlaps=true] This source may have overlapping geometries.\n * Setting this to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @prope
 rty {LoadingStrategy} [strategy] The loading strategy to use.\n * By default an {@link module:ol/loadingstrategy~all}\n * strategy is used, a one-off strategy which loads all features at once.\n * @property {string|import(\"../featureloader.js\").FeatureUrlFunction} [url]\n * Setting this option instructs the source to load features using an XHR loader\n * (see {@link module:ol/featureloader~xhr}). Use a `string` and an\n * {@link module:ol/loadingstrategy~all} for a one-off download of all features from\n * the given URL. Use a {@link module:ol/featureloader~FeatureUrlFunction} to generate the url with\n * other loading strategies.\n * Requires `format` to be set as well.\n * When default XHR feature loader is provided, the features will\n * be transformed from the data projection to the view projection\n * during parsing. If your remote data source does not advertise its projection\n * properly, this transformation will be incorrect. For some formats, the\n * default projection (u
 sually EPSG:4326) can be overridden by setting the\n * dataProjection constructor option on the format.\n * Note that if a source contains non-feature data, such as a GeoJSON geometry\n * or a KML NetworkLink, these will be ignored. Use a custom loader to load these.\n * @property {boolean} [useSpatialIndex=true]\n * By default, an RTree is used as spatial index. When features are removed and\n * added frequently, and the total number of features is low, setting this to\n * `false` may improve performance.\n *\n * Note that\n * {@link module:ol/source/Vector~VectorSource#getFeaturesInExtent},\n * {@link module:ol/source/Vector~VectorSource#getClosestFeatureToCoordinate} and\n * {@link module:ol/source/Vector~VectorSource#getExtent} cannot be used when `useSpatialIndex` is\n * set to `false`, and {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent} will loop\n * through all features.\n *\n * When set to `false`, the features will be maintained in an\n * {@link module:o
 l/Collection}, which can be retrieved through\n * {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.\n * @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the\n * -180° and 180° meridians to work properly, this should be set to `false`. The\n * resulting geometry coordinates will then exceed the world bounds.\n */\n/**\n * @classdesc\n * Provides a source of features for vector layers. Vector features provided\n * by this source are suitable for editing. See {@link module:ol/source/VectorTile~VectorTile} for\n * vector data that is optimized for rendering.\n *\n * @fires VectorSourceEvent\n * @api\n * @template {import(\"../geom/Geometry.js\").default} Geometry\n */\nvar VectorSource = /** @class */ (function (_super) {\n    __extends(VectorSource, _super);\n    /**\n     * @param {Options=} opt_options Vector source options.\n     */\n    function VectorSource(opt_options) {\n        var _this = this;\n        var options = o
 pt_options || {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            projection: undefined,\n            state: SourceState.READY,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n        }) || this;\n        /**\n         * @private\n         * @type {import(\"../featureloader.js\").FeatureLoader}\n         */\n        _this.loader_ = VOID;\n        /**\n         * @private\n         * @type {import(\"../format/Feature.js\").default|undefined}\n         */\n        _this.format_ = options.format;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.overlaps_ = options.overlaps === undefined ? true : options.overlaps;\n        /**\n         * @private\n         * @type {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined}\n         */\n        _this.url_ = options.url;\n        if (options.loader !== undefined) {\n            _this.loader_ = options.loader;\n 
        }\n        else if (_this.url_ !== undefined) {\n            assert(_this.format_, 7); // `format` must be set when `url` is set\n            // create a XHR feature loader for \"url\" and \"format\"\n            _this.loader_ = xhr(_this.url_, \n            /** @type {import(\"../format/Feature.js\").default} */ (_this.format_));\n        }\n        /**\n         * @private\n         * @type {LoadingStrategy}\n         */\n        _this.strategy_ =\n            options.strategy !== undefined ? options.strategy : allStrategy;\n        var useSpatialIndex = options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;\n        /**\n         * @private\n         * @type {RBush<import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.featuresRtree_ = useSpatialIndex ? new RBush() : null;\n        /**\n         * @private\n         * @type {RBush<{extent: import(\"../extent.js\").Extent}>}\n         */\n        _this.loadedExtentsRtree_ = new RBush();\n
         /**\n         * @private\n         * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.nullGeometryFeatures_ = {};\n        /**\n         * A lookup of features by id (the return from feature.getId()).\n         * @private\n         * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.idIndex_ = {};\n        /**\n         * A lookup of features by uid (using getUid(feature)).\n         * @private\n         * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.uidIndex_ = {};\n        /**\n         * @private\n         * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n         */\n        _this.featureChangeKeys_ = {};\n        /**\n         * @private\n         * @type {Collection<import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.featuresCollection_ = null;\n        var collection, features;\n    
     if (Array.isArray(options.features)) {\n            features = options.features;\n        }\n        else if (options.features) {\n            collection = options.features;\n            features = collection.getArray();\n        }\n        if (!useSpatialIndex && collection === undefined) {\n            collection = new Collection(features);\n        }\n        if (features !== undefined) {\n            _this.addFeaturesInternal(features);\n        }\n        if (collection !== undefined) {\n            _this.bindFeaturesCollection_(collection);\n        }\n        return _this;\n    }\n    /**\n     * Add a single feature to the source.  If you want to add a batch of features\n     * at once, call {@link module:ol/source/Vector~VectorSource#addFeatures #addFeatures()}\n     * instead. A feature will not be added to the source if feature with\n     * the same id is already there. The reason for this behavior is to avoid\n     * feature duplication when using bbox or tile loadin
 g strategies.\n     * Note: this also applies if an {@link module:ol/Collection} is used for features,\n     * meaning that if a feature with a duplicate id is added in the collection, it will\n     * be removed from it right away.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature to add.\n     * @api\n     */\n    VectorSource.prototype.addFeature = function (feature) {\n        this.addFeatureInternal(feature);\n        this.changed();\n    };\n    /**\n     * Add a feature without firing a `change` event.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n     * @protected\n     */\n    VectorSource.prototype.addFeatureInternal = function (feature) {\n        var featureKey = getUid(feature);\n        if (!this.addToIndex_(featureKey, feature)) {\n            if (this.featuresCollection_) {\n                this.featuresCollection_.remove(feature);\n            }\n            return;\n        }\n        this.setupChangeEvents
 _(featureKey, feature);\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            var extent = geometry.getExtent();\n            if (this.featuresRtree_) {\n                this.featuresRtree_.insert(extent, feature);\n            }\n        }\n        else {\n            this.nullGeometryFeatures_[featureKey] = feature;\n        }\n        this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE, feature));\n    };\n    /**\n     * @param {string} featureKey Unique identifier for the feature.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n     * @private\n     */\n    VectorSource.prototype.setupChangeEvents_ = function (featureKey, feature) {\n        this.featureChangeKeys_[featureKey] = [\n            listen(feature, EventType.CHANGE, this.handleFeatureChange_, this),\n            listen(feature, ObjectEventType.PROPERTYCHANGE, this.handleFeatureChange_, this),\n        ];\n    };\n    /**\n     * @param 
 {string} featureKey Unique identifier for the feature.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n     * @return {boolean} The feature is \"valid\", in the sense that it is also a\n     *     candidate for insertion into the Rtree.\n     * @private\n     */\n    VectorSource.prototype.addToIndex_ = function (featureKey, feature) {\n        var valid = true;\n        var id = feature.getId();\n        if (id !== undefined) {\n            if (!(id.toString() in this.idIndex_)) {\n                this.idIndex_[id.toString()] = feature;\n            }\n            else {\n                valid = false;\n            }\n        }\n        if (valid) {\n            assert(!(featureKey in this.uidIndex_), 30); // The passed `feature` was already added to the source\n            this.uidIndex_[featureKey] = feature;\n        }\n        return valid;\n    };\n    /**\n     * Add a batch of features to the source.\n     * @param {Array<import(\"../Featur
 e.js\").default<Geometry>>} features Features to add.\n     * @api\n     */\n    VectorSource.prototype.addFeatures = function (features) {\n        this.addFeaturesInternal(features);\n        this.changed();\n    };\n    /**\n     * Add features without firing a `change` event.\n     * @param {Array<import(\"../Feature.js\").default<Geometry>>} features Features.\n     * @protected\n     */\n    VectorSource.prototype.addFeaturesInternal = function (features) {\n        var extents = [];\n        var newFeatures = [];\n        var geometryFeatures = [];\n        for (var i = 0, length_1 = features.length; i < length_1; i++) {\n            var feature = features[i];\n            var featureKey = getUid(feature);\n            if (this.addToIndex_(featureKey, feature)) {\n                newFeatures.push(feature);\n            }\n        }\n        for (var i = 0, length_2 = newFeatures.length; i < length_2; i++) {\n            var feature = newFeatures[i];\n            var featureKe
 y = getUid(feature);\n            this.setupChangeEvents_(featureKey, feature);\n            var geometry = feature.getGeometry();\n            if (geometry) {\n                var extent = geometry.getExtent();\n                extents.push(extent);\n                geometryFeatures.push(feature);\n            }\n            else {\n                this.nullGeometryFeatures_[featureKey] = feature;\n            }\n        }\n        if (this.featuresRtree_) {\n            this.featuresRtree_.load(extents, geometryFeatures);\n        }\n        for (var i = 0, length_3 = newFeatures.length; i < length_3; i++) {\n            this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE, newFeatures[i]));\n        }\n    };\n    /**\n     * @param {!Collection<import(\"../Feature.js\").default<Geometry>>} collection Collection.\n     * @private\n     */\n    VectorSource.prototype.bindFeaturesCollection_ = function (collection) {\n        var modifyingCollection = false;\n       
  this.addEventListener(VectorEventType.ADDFEATURE, \n        /**\n         * @param {VectorSourceEvent<Geometry>} evt The vector source event\n         */\n        function (evt) {\n            if (!modifyingCollection) {\n                modifyingCollection = true;\n                collection.push(evt.feature);\n                modifyingCollection = false;\n            }\n        });\n        this.addEventListener(VectorEventType.REMOVEFEATURE, \n        /**\n         * @param {VectorSourceEvent<Geometry>} evt The vector source event\n         */\n        function (evt) {\n            if (!modifyingCollection) {\n                modifyingCollection = true;\n                collection.remove(evt.feature);\n                modifyingCollection = false;\n            }\n        });\n        collection.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"../Collection.js\").CollectionEvent} evt The collection event\n         */\n        function (evt) {\n 
            if (!modifyingCollection) {\n                modifyingCollection = true;\n                this.addFeature(\n                /** @type {import(\"../Feature.js\").default<Geometry>} */ (evt.element));\n                modifyingCollection = false;\n            }\n        }.bind(this));\n        collection.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"../Collection.js\").CollectionEvent} evt The collection event\n         */\n        function (evt) {\n            if (!modifyingCollection) {\n                modifyingCollection = true;\n                this.removeFeature(\n                /** @type {import(\"../Feature.js\").default<Geometry>} */ (evt.element));\n                modifyingCollection = false;\n            }\n        }.bind(this));\n        this.featuresCollection_ = collection;\n    };\n    /**\n     * Remove all features from the source.\n     * @param {boolean=} opt_fast Skip dispatching of {@link module:ol/source/Vect
 or.VectorSourceEvent#removefeature} events.\n     * @api\n     */\n    VectorSource.prototype.clear = function (opt_fast) {\n        if (opt_fast) {\n            for (var featureId in this.featureChangeKeys_) {\n                var keys = this.featureChangeKeys_[featureId];\n                keys.forEach(unlistenByKey);\n            }\n            if (!this.featuresCollection_) {\n                this.featureChangeKeys_ = {};\n                this.idIndex_ = {};\n                this.uidIndex_ = {};\n            }\n        }\n        else {\n            if (this.featuresRtree_) {\n                this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this));\n                for (var id in this.nullGeometryFeatures_) {\n                    this.removeFeatureInternal(this.nullGeometryFeatures_[id]);\n                }\n            }\n        }\n        if (this.featuresCollection_) {\n            this.featuresCollection_.clear();\n        }\n        if (this.featuresRtree_) {\n  
           this.featuresRtree_.clear();\n        }\n        this.nullGeometryFeatures_ = {};\n        var clearEvent = new VectorSourceEvent(VectorEventType.CLEAR);\n        this.dispatchEvent(clearEvent);\n        this.changed();\n    };\n    /**\n     * Iterate through all features on the source, calling the provided callback\n     * with each one.  If the callback returns any \"truthy\" value, iteration will\n     * stop and the function will return the same value.\n     * Note: this function only iterate through the feature that have a defined geometry.\n     *\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     *     on the source.  Return a truthy value to stop iteration.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     * @api\n     */\n    VectorSource.prototype.forEachFeature = function (callback) {\n        if (this.featuresRtree_) {\n            return t
 his.featuresRtree_.forEach(callback);\n        }\n        else if (this.featuresCollection_) {\n            this.featuresCollection_.forEach(callback);\n        }\n    };\n    /**\n     * Iterate through all features whose geometries contain the provided\n     * coordinate, calling the callback with each feature.  If the callback returns\n     * a \"truthy\" value, iteration will stop and the function will return the same\n     * value.\n     *\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     *     whose goemetry contains the provided coordinate.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     */\n    VectorSource.prototype.forEachFeatureAtCoordinateDirect = function (coordinate, callback) {\n        var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];\n     
    return this.forEachFeatureInExtent(extent, function (feature) {\n            var geometry = feature.getGeometry();\n            if (geometry.intersectsCoordinate(coordinate)) {\n                return callback(feature);\n            }\n            else {\n                return undefined;\n            }\n        });\n    };\n    /**\n     * Iterate through all features whose bounding box intersects the provided\n     * extent (note that the feature's geometry may not intersect the extent),\n     * calling the callback with each feature.  If the callback returns a \"truthy\"\n     * value, iteration will stop and the function will return the same value.\n     *\n     * If you are interested in features whose geometry intersects an extent, call\n     * the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent #forEachFeatureIntersectingExtent()} method instead.\n     *\n     * When `useSpatialIndex` is set to false, this method will loop through all\n     * f
 eatures, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature()}.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     *     whose bounding box intersects the provided extent.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     * @api\n     */\n    VectorSource.prototype.forEachFeatureInExtent = function (extent, callback) {\n        if (this.featuresRtree_) {\n            return this.featuresRtree_.forEachInExtent(extent, callback);\n        }\n        else if (this.featuresCollection_) {\n            this.featuresCollection_.forEach(callback);\n        }\n    };\n    /**\n     * Iterate through all features whose geometry intersects the provided extent,\n     * calling the callback with each feature.  If the callback returns a \"truthy\"\n     * value, iterat
 ion will stop and the function will return the same value.\n     *\n     * If you only want to test for bounding box intersection, call the\n     * {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent()} method instead.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     *     whose geometry intersects the provided extent.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     * @api\n     */\n    VectorSource.prototype.forEachFeatureIntersectingExtent = function (extent, callback) {\n        return this.forEachFeatureInExtent(extent, \n        /**\n         * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n         * @return {T|undefined} The return value from the last call to the callback.\n         */\n        function (feature) {\n   
          var geometry = feature.getGeometry();\n            if (geometry.intersectsExtent(extent)) {\n                var result = callback(feature);\n                if (result) {\n                    return result;\n                }\n            }\n        });\n    };\n    /**\n     * Get the features collection associated with this source. Will be `null`\n     * unless the source was configured with `useSpatialIndex` set to `false`, or\n     * with an {@link module:ol/Collection} as `features`.\n     * @return {Collection<import(\"../Feature.js\").default<Geometry>>} The collection of features.\n     * @api\n     */\n    VectorSource.prototype.getFeaturesCollection = function () {\n        return this.featuresCollection_;\n    };\n    /**\n     * Get all features on the source in random order.\n     * @return {Array<import(\"../Feature.js\").default<Geometry>>} Features.\n     * @api\n     */\n    VectorSource.prototype.getFeatures = function () {\n        var features;\n       
  if (this.featuresCollection_) {\n            features = this.featuresCollection_.getArray();\n        }\n        else if (this.featuresRtree_) {\n            features = this.featuresRtree_.getAll();\n            if (!isEmpty(this.nullGeometryFeatures_)) {\n                extend(features, getValues(this.nullGeometryFeatures_));\n            }\n        }\n        return /** @type {Array<import(\"../Feature.js\").default<Geometry>>} */ (features);\n    };\n    /**\n     * Get all features whose geometry intersects the provided coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {Array<import(\"../Feature.js\").default<Geometry>>} Features.\n     * @api\n     */\n    VectorSource.prototype.getFeaturesAtCoordinate = function (coordinate) {\n        var features = [];\n        this.forEachFeatureAtCoordinateDirect(coordinate, function (feature) {\n            features.push(feature);\n        });\n        return features;\n    };\n 
    /**\n     * Get all features whose bounding box intersects the provided extent.  Note that this returns an array of\n     * all features intersecting the given extent in random order (so it may include\n     * features whose geometries do not intersect the extent).\n     *\n     * When `useSpatialIndex` is set to false, this method will return all\n     * features.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {Array<import(\"../Feature.js\").default<Geometry>>} Features.\n     * @api\n     */\n    VectorSource.prototype.getFeaturesInExtent = function (extent) {\n        if (this.featuresRtree_) {\n            return this.featuresRtree_.getInExtent(extent);\n        }\n        else if (this.featuresCollection_) {\n            return this.featuresCollection_.getArray();\n        }\n        else {\n            return [];\n        }\n    };\n    /**\n     * Get the closest feature to the provided coordinate.\n     *\n     * This method is no
 t available when the source is configured with\n     * `useSpatialIndex` set to `false`.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {function(import(\"../Feature.js\").default<Geometry>):boolean=} opt_filter Feature filter function.\n     *     The filter function will receive one argument, the {@link module:ol/Feature feature}\n     *     and it should return a boolean value. By default, no filtering is made.\n     * @return {import(\"../Feature.js\").default<Geometry>} Closest feature.\n     * @api\n     */\n    VectorSource.prototype.getClosestFeatureToCoordinate = function (coordinate, opt_filter) {\n        // Find the closest feature using branch and bound.  We start searching an\n        // infinite extent, and find the distance from the first feature found.  This\n        // becomes the closest feature.  We then compute a smaller extent which any\n        // closer feature must intersect.  We continue searching with this sm
 aller\n        // extent, trying to find a closer feature.  Every time we find a closer\n        // feature, we update the extent being searched so that any even closer\n        // feature must intersect it.  We continue until we run out of features.\n        var x = coordinate[0];\n        var y = coordinate[1];\n        var closestFeature = null;\n        var closestPoint = [NaN, NaN];\n        var minSquaredDistance = Infinity;\n        var extent = [-Infinity, -Infinity, Infinity, Infinity];\n        var filter = opt_filter ? opt_filter : TRUE;\n        this.featuresRtree_.forEachInExtent(extent, \n        /**\n         * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n         */\n        function (feature) {\n            if (filter(feature)) {\n                var geometry = feature.getGeometry();\n                var previousMinSquaredDistance = minSquaredDistance;\n                minSquaredDistance = geometry.closestPointXY(x, y, closestPoint, minSqua
 redDistance);\n                if (minSquaredDistance < previousMinSquaredDistance) {\n                    closestFeature = feature;\n                    // This is sneaky.  Reduce the extent that it is currently being\n                    // searched while the R-Tree traversal using this same extent object\n                    // is still in progress.  This is safe because the new extent is\n                    // strictly contained by the old extent.\n                    var minDistance = Math.sqrt(minSquaredDistance);\n                    extent[0] = x - minDistance;\n                    extent[1] = y - minDistance;\n                    extent[2] = x + minDistance;\n                    extent[3] = y + minDistance;\n                }\n            }\n        });\n        return closestFeature;\n    };\n    /**\n     * Get the extent of the features currently in the source.\n     *\n     * This method is not available when the source is configured with\n     * `useSpatialIndex` set 
 to `false`.\n     * @param {import(\"../extent.js\").Extent=} opt_extent Destination extent. If provided, no new extent\n     *     will be created. Instead, that extent's coordinates will be overwritten.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    VectorSource.prototype.getExtent = function (opt_extent) {\n        return this.featuresRtree_.getExtent(opt_extent);\n    };\n    /**\n     * Get a feature by its identifier (the value returned by feature.getId()).\n     * Note that the index treats string and numeric identifiers as the same.  So\n     * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.\n     *\n     * @param {string|number} id Feature identifier.\n     * @return {import(\"../Feature.js\").default<Geometry>} The feature (or `null` if not found).\n     * @api\n     */\n    VectorSource.prototype.getFeatureById = function (id) {\n        var feature = this.idIndex_[id.toString()];\n        return feature !== und
 efined ? feature : null;\n    };\n    /**\n     * Get a feature by its internal unique identifier (using `getUid`).\n     *\n     * @param {string} uid Feature identifier.\n     * @return {import(\"../Feature.js\").default<Geometry>} The feature (or `null` if not found).\n     */\n    VectorSource.prototype.getFeatureByUid = function (uid) {\n        var feature = this.uidIndex_[uid];\n        return feature !== undefined ? feature : null;\n    };\n    /**\n     * Get the format associated with this source.\n     *\n     * @return {import(\"../format/Feature.js\").default|undefined} The feature format.\n     * @api\n     */\n    VectorSource.prototype.getFormat = function () {\n        return this.format_;\n    };\n    /**\n     * @return {boolean} The source can have overlapping geometries.\n     */\n    VectorSource.prototype.getOverlaps = function () {\n        return this.overlaps_;\n    };\n    /**\n     * Get the url associated with this source.\n     *\n     * @return {string
 |import(\"../featureloader.js\").FeatureUrlFunction|undefined} The url.\n     * @api\n     */\n    VectorSource.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * @param {Event} event Event.\n     * @private\n     */\n    VectorSource.prototype.handleFeatureChange_ = function (event) {\n        var feature = /** @type {import(\"../Feature.js\").default<Geometry>} */ (event.target);\n        var featureKey = getUid(feature);\n        var geometry = feature.getGeometry();\n        if (!geometry) {\n            if (!(featureKey in this.nullGeometryFeatures_)) {\n                if (this.featuresRtree_) {\n                    this.featuresRtree_.remove(feature);\n                }\n                this.nullGeometryFeatures_[featureKey] = feature;\n            }\n        }\n        else {\n            var extent = geometry.getExtent();\n            if (featureKey in this.nullGeometryFeatures_) {\n                delete this.nullGeometryFeatures_[featureK
 ey];\n                if (this.featuresRtree_) {\n                    this.featuresRtree_.insert(extent, feature);\n                }\n            }\n            else {\n                if (this.featuresRtree_) {\n                    this.featuresRtree_.update(extent, feature);\n                }\n            }\n        }\n        var id = feature.getId();\n        if (id !== undefined) {\n            var sid = id.toString();\n            if (this.idIndex_[sid] !== feature) {\n                this.removeFromIdIndex_(feature);\n                this.idIndex_[sid] = feature;\n            }\n        }\n        else {\n            this.removeFromIdIndex_(feature);\n            this.uidIndex_[featureKey] = feature;\n        }\n        this.changed();\n        this.dispatchEvent(new VectorSourceEvent(VectorEventType.CHANGEFEATURE, feature));\n    };\n    /**\n     * Returns true if the feature is contained within the source.\n     * @param {import(\"../Feature.js\").default<Geometry>} feat
 ure Feature.\n     * @return {boolean} Has feature.\n     * @api\n     */\n    VectorSource.prototype.hasFeature = function (feature) {\n        var id = feature.getId();\n        if (id !== undefined) {\n            return id in this.idIndex_;\n        }\n        else {\n            return getUid(feature) in this.uidIndex_;\n        }\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    VectorSource.prototype.isEmpty = function () {\n        return this.featuresRtree_.isEmpty() && isEmpty(this.nullGeometryFeatures_);\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    VectorSource.prototype.loadFeatures = function (extent, resolution, projection) {\n        var loadedExtentsRtree = this.loadedExtentsRtree_;\n        var extentsToLoad = this.strategy_(extent, resolution);\n        this.loading = fals
 e;\n        var _loop_1 = function (i, ii) {\n            var extentToLoad = extentsToLoad[i];\n            var alreadyLoaded = loadedExtentsRtree.forEachInExtent(extentToLoad, \n            /**\n             * @param {{extent: import(\"../extent.js\").Extent}} object Object.\n             * @return {boolean} Contains.\n             */\n            function (object) {\n                return containsExtent(object.extent, extentToLoad);\n            });\n            if (!alreadyLoaded) {\n                this_1.loader_.call(this_1, extentToLoad, resolution, projection);\n                loadedExtentsRtree.insert(extentToLoad, { extent: extentToLoad.slice() });\n                this_1.loading = this_1.loader_ !== VOID;\n            }\n        };\n        var this_1 = this;\n        for (var i = 0, ii = extentsToLoad.length; i < ii; ++i) {\n            _loop_1(i, ii);\n        }\n    };\n    VectorSource.prototype.refresh = function () {\n        this.clear(true);\n        this.loadedE
 xtentsRtree_.clear();\n        _super.prototype.refresh.call(this);\n    };\n    /**\n     * Remove an extent from the list of loaded extents.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @api\n     */\n    VectorSource.prototype.removeLoadedExtent = function (extent) {\n        var loadedExtentsRtree = this.loadedExtentsRtree_;\n        var obj;\n        loadedExtentsRtree.forEachInExtent(extent, function (object) {\n            if (equals(object.extent, extent)) {\n                obj = object;\n                return true;\n            }\n        });\n        if (obj) {\n            loadedExtentsRtree.remove(obj);\n        }\n    };\n    /**\n     * Remove a single feature from the source.  If you want to remove all features\n     * at once, use the {@link module:ol/source/Vector~VectorSource#clear #clear()} method\n     * instead.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature to remove.\n     * @api\n     */\n    VectorSo
 urce.prototype.removeFeature = function (feature) {\n        var featureKey = getUid(feature);\n        if (featureKey in this.nullGeometryFeatures_) {\n            delete this.nullGeometryFeatures_[featureKey];\n        }\n        else {\n            if (this.featuresRtree_) {\n                this.featuresRtree_.remove(feature);\n            }\n        }\n        this.removeFeatureInternal(feature);\n        this.changed();\n    };\n    /**\n     * Remove feature without firing a `change` event.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n     * @protected\n     */\n    VectorSource.prototype.removeFeatureInternal = function (feature) {\n        var featureKey = getUid(feature);\n        this.featureChangeKeys_[featureKey].forEach(unlistenByKey);\n        delete this.featureChangeKeys_[featureKey];\n        var id = feature.getId();\n        if (id !== undefined) {\n            delete this.idIndex_[id.toString()];\n        }\n        delete this.
 uidIndex_[featureKey];\n        this.dispatchEvent(new VectorSourceEvent(VectorEventType.REMOVEFEATURE, feature));\n    };\n    /**\n     * Remove a feature from the id index.  Called internally when the feature id\n     * may have changed.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n     * @return {boolean} Removed the feature from the index.\n     * @private\n     */\n    VectorSource.prototype.removeFromIdIndex_ = function (feature) {\n        var removed = false;\n        for (var id in this.idIndex_) {\n            if (this.idIndex_[id] === feature) {\n                delete this.idIndex_[id];\n                removed = true;\n                break;\n            }\n        }\n        return removed;\n    };\n    /**\n     * Set the new loader of the source. The next render cycle will use the\n     * new loader.\n     * @param {import(\"../featureloader.js\").FeatureLoader} loader The loader to set.\n     * @api\n     */\n    VectorSource.p
 rototype.setLoader = function (loader) {\n        this.loader_ = loader;\n    };\n    /**\n     * Points the source to a new url. The next render cycle will use the new url.\n     * @param {string|import(\"../featureloader.js\").FeatureUrlFunction} url Url.\n     * @api\n     */\n    VectorSource.prototype.setUrl = function (url) {\n        assert(this.format_, 7); // `format` must be set when `url` is set\n        this.setLoader(xhr(url, this.format_));\n    };\n    return VectorSource;\n}(Source));\nexport default VectorSource;\n//# sourceMappingURL=Vector.js.map","/**\n * @module ol/source/Cluster\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n   
  return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Point from '../geom/Point.js';\nimport VectorSource from './Vector.js';\nimport { add as addCoordinate, scale as scaleCoordinate } from '../coordinate.js';\nimport { assert } from '../asserts.js';\nimport { buffer, createEmpty, createOrUpdateFromCoordinate } from '../extent.js';\nimport { getUid } from '../util.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [distance=20] Minimum distance in pixels between clusters.\n * @property {function(Feature):Point} [geometryFunction]\n * Function that takes an {@link module:ol/Feature} as
  argument and returns an\n * {@link module:ol/geom/Point} as cluster calculation point for the feature. When a\n * feature should not be considered for clustering, the function should return\n * `null`. The default, which works when the underyling source contains point\n * features only, is\n * ```js\n * function(feature) {\n *   return feature.getGeometry();\n * }\n * ```\n * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster\n * calculation point for polygons.\n * @property {VectorSource} [source] Source.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n/**\n * @classdesc\n * Layer source to cluster vector data. Works out of the box with point\n * geometries. For other geometry types, or if not all geometries should be\n * considered for clustering, a custom `geometryFunction` can be defined.\n *\n * If the instance is disposed without also disposing the underlying\n * source `setSource(null)` has to be called t
 o remove the listener reference\n * from the wrapped source.\n * @api\n */\nvar Cluster = /** @class */ (function (_super) {\n    __extends(Cluster, _super);\n    /**\n     * @param {Options} options Cluster options.\n     */\n    function Cluster(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            wrapX: options.wrapX,\n        }) || this;\n        /**\n         * @type {number|undefined}\n         * @protected\n         */\n        _this.resolution = undefined;\n        /**\n         * @type {number}\n         * @protected\n         */\n        _this.distance = options.distance !== undefined ? options.distance : 20;\n        /**\n         * @type {Array<Feature>}\n         * @protected\n         */\n        _this.features = [];\n        /**\n         * @param {Feature} feature Feature.\n         * @return {Point} Cluster calculation point.\n         * @protected\n         */\n        _this.geometryFunction =\n          
   options.geometryFunction ||\n                function (feature) {\n                    var geometry = feature.getGeometry();\n                    assert(geometry.getType() == GeometryType.POINT, 10); // The default `geometryFunction` can only handle `Point` geometries\n                    return geometry;\n                };\n        _this.boundRefresh_ = _this.refresh.bind(_this);\n        _this.setSource(options.source || null);\n        return _this;\n    }\n    /**\n     * Remove all features from the source.\n     * @param {boolean=} opt_fast Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#removefeature} events.\n     * @api\n     */\n    Cluster.prototype.clear = function (opt_fast) {\n        this.features.length = 0;\n        _super.prototype.clear.call(this, opt_fast);\n    };\n    /**\n     * Get the distance in pixels between clusters.\n     * @return {number} Distance.\n     * @api\n     */\n    Cluster.prototype.getDistance = function () {\n      
   return this.distance;\n    };\n    /**\n     * Get a reference to the wrapped source.\n     * @return {VectorSource} Source.\n     * @api\n     */\n    Cluster.prototype.getSource = function () {\n        return this.source;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    Cluster.prototype.loadFeatures = function (extent, resolution, projection) {\n        this.source.loadFeatures(extent, resolution, projection);\n        if (resolution !== this.resolution) {\n            this.clear();\n            this.resolution = resolution;\n            this.cluster();\n            this.addFeatures(this.features);\n        }\n    };\n    /**\n     * Set the distance in pixels between clusters.\n     * @param {number} distance The distance in pixels.\n     * @api\n     */\n    Cluster.prototype.setDistance = function (dis
 tance) {\n        this.distance = distance;\n        this.refresh();\n    };\n    /**\n     * Replace the wrapped source.\n     * @param {VectorSource} source The new source for this instance.\n     * @api\n     */\n    Cluster.prototype.setSource = function (source) {\n        if (this.source) {\n            this.source.removeEventListener(EventType.CHANGE, this.boundRefresh_);\n        }\n        this.source = source;\n        if (source) {\n            source.addEventListener(EventType.CHANGE, this.boundRefresh_);\n        }\n        this.refresh();\n    };\n    /**\n     * Handle the source changing.\n     */\n    Cluster.prototype.refresh = function () {\n        this.clear();\n        this.cluster();\n        this.addFeatures(this.features);\n    };\n    /**\n     * @protected\n     */\n    Cluster.prototype.cluster = function () {\n        if (this.resolution === undefined || !this.source) {\n            return;\n        }\n        var extent = createEmpty();\n        var map
 Distance = this.distance * this.resolution;\n        var features = this.source.getFeatures();\n        /**\n         * @type {!Object<string, boolean>}\n         */\n        var clustered = {};\n        for (var i = 0, ii = features.length; i < ii; i++) {\n            var feature = features[i];\n            if (!(getUid(feature) in clustered)) {\n                var geometry = this.geometryFunction(feature);\n                if (geometry) {\n                    var coordinates = geometry.getCoordinates();\n                    createOrUpdateFromCoordinate(coordinates, extent);\n                    buffer(extent, mapDistance, extent);\n                    var neighbors = this.source.getFeaturesInExtent(extent);\n                    neighbors = neighbors.filter(function (neighbor) {\n                        var uid = getUid(neighbor);\n                        if (!(uid in clustered)) {\n                            clustered[uid] = true;\n                            return true;\n     
                    }\n                        else {\n                            return false;\n                        }\n                    });\n                    this.features.push(this.createCluster(neighbors));\n                }\n            }\n        }\n    };\n    /**\n     * @param {Array<Feature>} features Features\n     * @return {Feature} The cluster feature.\n     * @protected\n     */\n    Cluster.prototype.createCluster = function (features) {\n        var centroid = [0, 0];\n        for (var i = features.length - 1; i >= 0; --i) {\n            var geometry = this.geometryFunction(features[i]);\n            if (geometry) {\n                addCoordinate(centroid, geometry.getCoordinates());\n            }\n            else {\n                features.splice(i, 1);\n            }\n        }\n        scaleCoordinate(centroid, 1 / features.length);\n        var cluster = new Feature(new Point(centroid));\n        cluster.set('features', features);\n        return cl
 uster;\n    };\n    return Cluster;\n}(VectorSource));\nexport default Cluster;\n//# sourceMappingURL=Cluster.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Zoomify\n */\nimport { DEFAULT_TILE_SIZE } from '../tilegrid/common.js';\nimport ImageTile from '../ImageTile.js';\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport TileImage from './TileImage.js';\nimport TileState from '../TileState.js';\nimpor
 t { assert } from '../asserts.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { createFromTileUrlFunctions, expandUrl } from '../tileurlfunction.js';\nimport { getCenter } from '../extent.js';\nimport { toSize } from '../size.js';\n/**\n * @enum {string}\n */\nvar TierSizeCalculation = {\n    DEFAULT: 'default',\n    TRUNCATED: 'truncated',\n};\nvar CustomTile = /** @class */ (function (_super) {\n    __extends(CustomTile, _super);\n    /**\n     * @param {import(\"../size.js\").Size} tileSize Full tile size.\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../TileState.js\").default} state State.\n     * @param {string} src Image source URI.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n     * @param {import(\"../Tile.js\").Options=} opt_options Tile options.\n     */\n    function CustomTile(tileSize, tileCoord, 
 state, src, crossOrigin, tileLoadFunction, opt_options) {\n        var _this = _super.call(this, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) || this;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n         */\n        _this.zoomifyImage_ = null;\n        /**\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.tileSize_ = tileSize;\n        return _this;\n    }\n    /**\n     * Get the image element for this tile.\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     */\n    CustomTile.prototype.getImage = function () {\n        if (this.zoomifyImage_) {\n            return this.zoomifyImage_;\n        }\n        var image = _super.prototype.getImage.call(this);\n        if (this.state == TileState.LOADED) {\n            var tileSize = this.tileSize_;\n            if (image.width == tileSize[0] && image.height == tileSize[1]) {\n                this.
 zoomifyImage_ = image;\n                return image;\n            }\n            else {\n                var context = createCanvasContext2D(tileSize[0], tileSize[1]);\n                context.drawImage(image, 0, 0);\n                this.zoomifyImage_ = context.canvas;\n                return context.canvas;\n            }\n        }\n        else {\n            return image;\n        }\n    };\n    return CustomTile;\n}(ImageTile));\nexport { CustomTile };\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value  you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for mor
 e detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {number} [tilePixelRatio] The pixel ratio used by the tile service. For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px by 512px images (for retina/hidpi devices) then `tilePixelRatio` should be set to `2`\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {string} url URL template or base URL of the Zoomify service.\n * A base URL is the fixed part\n * of the URL, excluding the tile group, z, x, and y folder structure, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/`. A URL template must include\n * `{TileGroup}`, `{x}`, `{y}`, and `{z}` placeholders, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/{TileGroup}/{z}-{x}-{y}.jpg`.\n * Intern
 et Imaging Protocol (IIP) with JTL extension can be also used with\n * `{tileIndex}` and `{z}` placeholders, e.g.\n * `http://my.zoomify.info?FIF=IMAGE.TIF&JTL={z},{tileIndex}`.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {string} [tierSizeCalculation] Tier size calculation method: `default` or `truncated`.\n * @property {import(\"../size.js\").Size} size\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the TileGrid that is created.\n * Default sets the TileGrid in the\n * fourth quadrant, meaning extent is `[0, -height, width, 0]`. To change the\n * extent to the first quadrant (the default for OpenLayers 2) set the extent\n * as `[0, 0, width, height]`.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number} [tileSize=256] Tile siz
 e. Same tile size is used for all zoom levels.\n * @property {number} [zDirection] Indicate which resolution should be used\n * by a renderer if the views resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n/**\n * @classdesc\n * Layer source for tile data in Zoomify format (both Zoomify and Internet\n * Imaging Protocol are supported).\n * @api\n */\nvar Zoomify = /** @class */ (function (_super) {\n    __extends(Zoomify, _super);\n    /**\n     * @param {Options} opt_options Options.\n     */\n    function Zoomify(opt_options) {\n        var _this = this;\n        var options = opt_options;\n        var size = options.size;\n        var tierSizeCalculation = options.tierSizeCalculation !== undefined\n            ? options.tierSizeCalculation\n            : TierSizeCalculation.DEFAULT;\n        var tilePixelRatio = opt
 ions.tilePixelRatio || 1;\n        var imageWidth = size[0];\n        var imageHeight = size[1];\n        var tierSizeInTiles = [];\n        var tileSize = options.tileSize || DEFAULT_TILE_SIZE;\n        var tileSizeForTierSizeCalculation = tileSize * tilePixelRatio;\n        switch (tierSizeCalculation) {\n            case TierSizeCalculation.DEFAULT:\n                while (imageWidth > tileSizeForTierSizeCalculation ||\n                    imageHeight > tileSizeForTierSizeCalculation) {\n                    tierSizeInTiles.push([\n                        Math.ceil(imageWidth / tileSizeForTierSizeCalculation),\n                        Math.ceil(imageHeight / tileSizeForTierSizeCalculation),\n                    ]);\n                    tileSizeForTierSizeCalculation += tileSizeForTierSizeCalculation;\n                }\n                break;\n            case TierSizeCalculation.TRUNCATED:\n                var width = imageWidth;\n                var height = imageHeight;\n      
           while (width > tileSizeForTierSizeCalculation ||\n                    height > tileSizeForTierSizeCalculation) {\n                    tierSizeInTiles.push([\n                        Math.ceil(width / tileSizeForTierSizeCalculation),\n                        Math.ceil(height / tileSizeForTierSizeCalculation),\n                    ]);\n                    width >>= 1;\n                    height >>= 1;\n                }\n                break;\n            default:\n                assert(false, 53); // Unknown `tierSizeCalculation` configured\n                break;\n        }\n        tierSizeInTiles.push([1, 1]);\n        tierSizeInTiles.reverse();\n        var resolutions = [tilePixelRatio];\n        var tileCountUpToTier = [0];\n        for (var i = 1, ii = tierSizeInTiles.length; i < ii; i++) {\n            resolutions.push(tilePixelRatio << i);\n            tileCountUpToTier.push(tierSizeInTiles[i - 1][0] * tierSizeInTiles[i - 1][1] +\n                tileCountUpToTi
 er[i - 1]);\n        }\n        resolutions.reverse();\n        var tileGrid = new TileGrid({\n            tileSize: tileSize,\n            extent: options.extent || [0, -imageHeight, imageWidth, 0],\n            resolutions: resolutions,\n        });\n        var url = options.url;\n        if (url &&\n            url.indexOf('{TileGroup}') == -1 &&\n            url.indexOf('{tileIndex}') == -1) {\n            url += '{TileGroup}/{z}-{x}-{y}.jpg';\n        }\n        var urls = expandUrl(url);\n        var tileWidth = tileSize * tilePixelRatio;\n        /**\n         * @param {string} template Template.\n         * @return {import(\"../Tile.js\").UrlFunction} Tile URL function.\n         */\n        function createFromTemplate(template) {\n            return (\n            /**\n             * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n             * @param {number} pixelRatio Pixel ratio.\n             * @param {import(\"../proj/Projection.js\").defa
 ult} projection Projection.\n             * @return {string|undefined} Tile URL.\n             */\n            function (tileCoord, pixelRatio, projection) {\n                if (!tileCoord) {\n                    return undefined;\n                }\n                else {\n                    var tileCoordZ = tileCoord[0];\n                    var tileCoordX = tileCoord[1];\n                    var tileCoordY = tileCoord[2];\n                    var tileIndex = tileCoordX + tileCoordY * tierSizeInTiles[tileCoordZ][0];\n                    var tileGroup = ((tileIndex + tileCountUpToTier[tileCoordZ]) / tileWidth) | 0;\n                    var localContext_1 = {\n                        'z': tileCoordZ,\n                        'x': tileCoordX,\n                        'y': tileCoordY,\n                        'tileIndex': tileIndex,\n                        'TileGroup': 'TileGroup' + tileGroup,\n                    };\n                    return template.replace(/\\{(\\w+?)\\}/g, fu
 nction (m, p) {\n                        return localContext_1[p];\n                    });\n                }\n            });\n        }\n        var tileUrlFunction = createFromTileUrlFunctions(urls.map(createFromTemplate));\n        var ZoomifyTileClass = CustomTile.bind(null, toSize(tileSize * tilePixelRatio));\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            tilePixelRatio: tilePixelRatio,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileClass: ZoomifyTileClass,\n            tileGrid: tileGrid,\n            tileUrlFunction: tileUrlFunction,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @type {number}\n         */\n        _this.zDirection = options.zDirec
 tion;\n        // Server retina tile detection (non-standard):\n        // Try loading the center tile for the highest resolution. If it is not\n        // available, we are dealing with retina tiles, and need to adjust the\n        // tile url calculation.\n        var tileUrl = tileGrid.getTileCoordForCoordAndResolution(getCenter(tileGrid.getExtent()), resolutions[resolutions.length - 1]);\n        var testTileUrl = tileUrlFunction(tileUrl, 1, null);\n        var image = new Image();\n        image.addEventListener('error', function () {\n            tileWidth = tileSize;\n            this.changed();\n        }.bind(_this));\n        image.src = testTileUrl;\n        return _this;\n    }\n    return Zoomify;\n}(TileImage));\nexport default Zoomify;\n//# sourceMappingURL=Zoomify.js.map","/**\n * @module ol/format/IIIFInfo\n */\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length
 ;\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n            r[k] = a[j];\n    return r;\n};\nimport { assert } from '../asserts.js';\n/**\n * @typedef {Object} PreferredOptions\n * @property {string} [format] Preferred image format. Will be used if the image information\n * indicates support for that format.\n * @property {string} [quality] IIIF image qualitiy.  Will be used if the image information\n * indicates support for that quality.\n */\n/**\n * @typedef {Object} SupportedFeatures\n * @property {Array<string>} [supports] Supported IIIF image size and region\n * calculation features.\n * @property {Array<string>} [formats] Supported image formats.\n * @property {Array<string>} [qualities] Supported IIIF image qualities.\n */\n/**\n * @typedef {Object} TileInfo\n * @property {Array<number>} scaleFactors Supported resolution scaling factors.\n * @property {number} width Tile width in pixels.\n 
 * @property {number} [height] Tile height in pixels. Same as tile width if height is\n * not given.\n */\n/**\n * @typedef {Object} IiifProfile\n * @property {Array<string>} [formats] Supported image formats for the image service.\n * @property {Array<string>} [qualities] Supported IIIF image qualities.\n * @property {Array<string>} [supports] Supported features.\n * @property {number} [maxArea] Maximum area (pixels) available for this image service.\n * @property {number} [maxHeight] Maximum height.\n * @property {number} [maxWidth] Maximum width.\n */\n/**\n * @typedef {Object<string,string|number|Array<number|string|IiifProfile>|Object<string, number>|TileInfo>}\n *    ImageInformationResponse\n */\n/**\n * Enum representing the major IIIF Image API versions\n * @enum {string}\n */\nexport var Versions = {\n    VERSION1: 'version1',\n    VERSION2: 'version2',\n    VERSION3: 'version3',\n};\n/**\n * Supported image formats, qualities and supported region / size calculation feature
 s\n * for different image API versions and compliance levels\n * @const\n * @type {Object<string, Object<string, SupportedFeatures>>}\n */\nvar IIIF_PROFILE_VALUES = {};\nIIIF_PROFILE_VALUES[Versions.VERSION1] = {\n    'level0': {\n        supports: [],\n        formats: [],\n        qualities: ['native'],\n    },\n    'level1': {\n        supports: ['regionByPx', 'sizeByW', 'sizeByH', 'sizeByPct'],\n        formats: ['jpg'],\n        qualities: ['native'],\n    },\n    'level2': {\n        supports: [\n            'regionByPx',\n            'regionByPct',\n            'sizeByW',\n            'sizeByH',\n            'sizeByPct',\n            'sizeByConfinedWh',\n            'sizeByWh',\n        ],\n        formats: ['jpg', 'png'],\n        qualities: ['native', 'color', 'grey', 'bitonal'],\n    },\n};\nIIIF_PROFILE_VALUES[Versions.VERSION2] = {\n    'level0': {\n        supports: [],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level1': {\n        suppor
 ts: ['regionByPx', 'sizeByW', 'sizeByH', 'sizeByPct'],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level2': {\n        supports: [\n            'regionByPx',\n            'regionByPct',\n            'sizeByW',\n            'sizeByH',\n            'sizeByPct',\n            'sizeByConfinedWh',\n            'sizeByDistortedWh',\n            'sizeByWh',\n        ],\n        formats: ['jpg', 'png'],\n        qualities: ['default', 'bitonal'],\n    },\n};\nIIIF_PROFILE_VALUES[Versions.VERSION3] = {\n    'level0': {\n        supports: [],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level1': {\n        supports: ['regionByPx', 'regionSquare', 'sizeByW', 'sizeByH', 'sizeByWh'],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level2': {\n        supports: [\n            'regionByPx',\n            'regionSquare',\n            'regionByPct',\n            'sizeByW',\n            'sizeByH',\n            'sizeByP
 ct',\n            'sizeByConfinedWh',\n            'sizeByWh',\n        ],\n        formats: ['jpg', 'png'],\n        qualities: ['default'],\n    },\n};\nIIIF_PROFILE_VALUES['none'] = {\n    'none': {\n        supports: [],\n        formats: [],\n        qualities: [],\n    },\n};\nvar COMPLIANCE_VERSION1 = /^https?:\\/\\/library\\.stanford\\.edu\\/iiif\\/image-api\\/(?:1\\.1\\/)?compliance\\.html#level[0-2]$/;\nvar COMPLIANCE_VERSION2 = /^https?:\\/\\/iiif\\.io\\/api\\/image\\/2\\/level[0-2](?:\\.json)?$/;\nvar COMPLIANCE_VERSION3 = /(^https?:\\/\\/iiif\\.io\\/api\\/image\\/3\\/level[0-2](?:\\.json)?$)|(^level[0-2]$)/;\nfunction generateVersion1Options(iiifInfo) {\n    var levelProfile = iiifInfo.getComplianceLevelSupportedFeatures();\n    // Version 1.0 and 1.1 do not require a profile.\n    if (levelProfile === undefined) {\n        levelProfile = IIIF_PROFILE_VALUES[Versions.VERSION1]['level0'];\n    }\n    return {\n        url: iiifInfo.imageInfo['@id'] === undefined\n       
      ? undefined\n            : iiifInfo.imageInfo['@id'].replace(/\\/?(?:info\\.json)?$/g, ''),\n        supports: levelProfile.supports,\n        formats: __spreadArrays(levelProfile.formats, [\n            iiifInfo.imageInfo.formats === undefined\n                ? []\n                : iiifInfo.imageInfo.formats,\n        ]),\n        qualities: __spreadArrays(levelProfile.qualities, [\n            iiifInfo.imageInfo.qualities === undefined\n                ? []\n                : iiifInfo.imageInfo.qualities,\n        ]),\n        resolutions: iiifInfo.imageInfo.scale_factors,\n        tileSize: iiifInfo.imageInfo.tile_width !== undefined\n            ? iiifInfo.imageInfo.tile_height !== undefined\n                ? [iiifInfo.imageInfo.tile_width, iiifInfo.imageInfo.tile_height]\n                : [iiifInfo.imageInfo.tile_width, iiifInfo.imageInfo.tile_width]\n            : iiifInfo.imageInfo.tile_height != undefined\n                ? [iiifInfo.imageInfo.tile_height, iiifInfo.
 imageInfo.tile_height]\n                : undefined,\n    };\n}\nfunction generateVersion2Options(iiifInfo) {\n    var levelProfile = iiifInfo.getComplianceLevelSupportedFeatures(), additionalProfile = Array.isArray(iiifInfo.imageInfo.profile) &&\n        iiifInfo.imageInfo.profile.length > 1, profileSupports = additionalProfile && iiifInfo.imageInfo.profile[1].supports\n        ? iiifInfo.imageInfo.profile[1].supports\n        : [], profileFormats = additionalProfile && iiifInfo.imageInfo.profile[1].formats\n        ? iiifInfo.imageInfo.profile[1].formats\n        : [], profileQualities = additionalProfile && iiifInfo.imageInfo.profile[1].qualities\n        ? iiifInfo.imageInfo.profile[1].qualities\n        : [];\n    return {\n        url: iiifInfo.imageInfo['@id'].replace(/\\/?(?:info\\.json)?$/g, ''),\n        sizes: iiifInfo.imageInfo.sizes === undefined\n            ? undefined\n            : iiifInfo.imageInfo.sizes.map(function (size) {\n                return [size.width, s
 ize.height];\n            }),\n        tileSize: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : [\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.width;\n                })[0],\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.height === undefined ? tile.width : tile.height;\n                })[0],\n            ],\n        resolutions: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : iiifInfo.imageInfo.tiles.map(function (tile) {\n                return tile.scaleFactors;\n            })[0],\n        supports: __spreadArrays(levelProfile.supports, profileSupports),\n        formats: __spreadArrays(levelProfile.formats, profileFormats),\n        qualities: __spreadArrays(levelProfile.qualities, profileQualities),\n    };\n}\nfunction generateVersion3Options(iiifInfo) {\n    var levelProfile = iiifInfo.getComplianceLevelSupported
 Features(), formats = iiifInfo.imageInfo.extraFormats === undefined\n        ? levelProfile.formats\n        : __spreadArrays(levelProfile.formats, iiifInfo.imageInfo.extraFormats), preferredFormat = iiifInfo.imageInfo.preferredFormats !== undefined &&\n        Array.isArray(iiifInfo.imageInfo.preferredFormats) &&\n        iiifInfo.imageInfo.preferredFormats.length > 0\n        ? iiifInfo.imageInfo.preferredFormats\n            .filter(function (format) {\n            return ['jpg', 'png', 'gif'].includes(format);\n        })\n            .reduce(function (acc, format) {\n            return acc === undefined && formats.includes(format)\n                ? format\n                : acc;\n        }, undefined)\n        : undefined;\n    return {\n        url: iiifInfo.imageInfo['id'],\n        sizes: iiifInfo.imageInfo.sizes === undefined\n            ? undefined\n            : iiifInfo.imageInfo.sizes.map(function (size) {\n                return [size.width, size.height];\n          
   }),\n        tileSize: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : [\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.width;\n                })[0],\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.height;\n                })[0],\n            ],\n        resolutions: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : iiifInfo.imageInfo.tiles.map(function (tile) {\n                return tile.scaleFactors;\n            })[0],\n        supports: iiifInfo.imageInfo.extraFeatures === undefined\n            ? levelProfile.supports\n            : __spreadArrays(levelProfile.supports, iiifInfo.imageInfo.extraFeatures),\n        formats: formats,\n        qualities: iiifInfo.imageInfo.extraQualities === undefined\n            ? levelProfile.qualities\n            : __spreadArrays(levelProfile.qualities, iiifInfo.imageInfo.extraQuali
 ties),\n        preferredFormat: preferredFormat,\n    };\n}\nvar versionFunctions = {};\nversionFunctions[Versions.VERSION1] = generateVersion1Options;\nversionFunctions[Versions.VERSION2] = generateVersion2Options;\nversionFunctions[Versions.VERSION3] = generateVersion3Options;\n/**\n * @classdesc\n * Format for transforming IIIF Image API image information responses into\n * IIIF tile source ready options\n *\n * @api\n */\nvar IIIFInfo = /** @class */ (function () {\n    /**\n     * @param {string|ImageInformationResponse} imageInfo\n     * Deserialized image information JSON response object or JSON response as string\n     */\n    function IIIFInfo(imageInfo) {\n        this.setImageInfo(imageInfo);\n    }\n    /**\n     * @param {string|ImageInformationResponse} imageInfo\n     * Deserialized image information JSON response object or JSON response as string\n     * @api\n     */\n    IIIFInfo.prototype.setImageInfo = function (imageInfo) {\n        if (typeof imageInfo == 'str
 ing') {\n            this.imageInfo = JSON.parse(imageInfo);\n        }\n        else {\n            this.imageInfo = imageInfo;\n        }\n    };\n    /**\n     * @returns {Versions} Major IIIF version.\n     * @api\n     */\n    IIIFInfo.prototype.getImageApiVersion = function () {\n        if (this.imageInfo === undefined) {\n            return;\n        }\n        var context = this.imageInfo['@context'] || 'ol-no-context';\n        if (typeof context == 'string') {\n            context = [context];\n        }\n        for (var i = 0; i < context.length; i++) {\n            switch (context[i]) {\n                case 'http://library.stanford.edu/iiif/image-api/1.1/context.json':\n                case 'http://iiif.io/api/image/1/context.json':\n                    return Versions.VERSION1;\n                case 'http://iiif.io/api/image/2/context.json':\n                    return Versions.VERSION2;\n                case 'http://iiif.io/api/image/3/context.json':\n              
       return Versions.VERSION3;\n                case 'ol-no-context':\n                    // Image API 1.0 has no '@context'\n                    if (this.getComplianceLevelEntryFromProfile(Versions.VERSION1) &&\n                        this.imageInfo.identifier) {\n                        return Versions.VERSION1;\n                    }\n                    break;\n                default:\n            }\n        }\n        assert(false, 61);\n    };\n    /**\n     * @param {Versions} version Optional IIIF image API version\n     * @returns {string} Compliance level as it appears in the IIIF image information\n     * response.\n     */\n    IIIFInfo.prototype.getComplianceLevelEntryFromProfile = function (version) {\n        if (this.imageInfo === undefined || this.imageInfo.profile === undefined) {\n            return;\n        }\n        if (version === undefined) {\n            version = this.getImageApiVersion();\n        }\n        switch (version) {\n            case Versio
 ns.VERSION1:\n                if (COMPLIANCE_VERSION1.test(this.imageInfo.profile)) {\n                    return this.imageInfo.profile;\n                }\n                break;\n            case Versions.VERSION3:\n                if (COMPLIANCE_VERSION3.test(this.imageInfo.profile)) {\n                    return this.imageInfo.profile;\n                }\n                break;\n            case Versions.VERSION2:\n                if (typeof this.imageInfo.profile === 'string' &&\n                    COMPLIANCE_VERSION2.test(this.imageInfo.profile)) {\n                    return this.imageInfo.profile;\n                }\n                if (Array.isArray(this.imageInfo.profile) &&\n                    this.imageInfo.profile.length > 0 &&\n                    typeof this.imageInfo.profile[0] === 'string' &&\n                    COMPLIANCE_VERSION2.test(this.imageInfo.profile[0])) {\n                    return this.imageInfo.profile[0];\n                }\n                break;
 \n            default:\n        }\n    };\n    /**\n     * @param {Versions} version Optional IIIF image API version\n     * @returns {string} Compliance level, on of 'level0', 'level1' or 'level2' or undefined\n     */\n    IIIFInfo.prototype.getComplianceLevelFromProfile = function (version) {\n        var complianceLevel = this.getComplianceLevelEntryFromProfile(version);\n        if (complianceLevel === undefined) {\n            return undefined;\n        }\n        var level = complianceLevel.match(/level[0-2](?:\\.json)?$/g);\n        return Array.isArray(level) ? level[0].replace('.json', '') : undefined;\n    };\n    /**\n     * @returns {SupportedFeatures} Image formats, qualities and region / size calculation\n     * methods that are supported by the IIIF service.\n     */\n    IIIFInfo.prototype.getComplianceLevelSupportedFeatures = function () {\n        if (this.imageInfo === undefined) {\n            return;\n        }\n        var version = this.getImageApiVersion();\
 n        var level = this.getComplianceLevelFromProfile(version);\n        if (level === undefined) {\n            return IIIF_PROFILE_VALUES['none']['none'];\n        }\n        return IIIF_PROFILE_VALUES[version][level];\n    };\n    /**\n     * @param {PreferredOptions=} opt_preferredOptions Optional options for preferred format and quality.\n     * @returns {import(\"../source/IIIF.js\").Options} IIIF tile source ready constructor options.\n     * @api\n     */\n    IIIFInfo.prototype.getTileSourceOptions = function (opt_preferredOptions) {\n        var options = opt_preferredOptions || {}, version = this.getImageApiVersion();\n        if (version === undefined) {\n            return;\n        }\n        var imageOptions = version === undefined ? undefined : versionFunctions[version](this);\n        if (imageOptions === undefined) {\n            return;\n        }\n        return {\n            url: imageOptions.url,\n            version: version,\n            size: [this.imageI
 nfo.width, this.imageInfo.height],\n            sizes: imageOptions.sizes,\n            format: options.format !== undefined &&\n                imageOptions.formats.includes(options.format)\n                ? options.format\n                : imageOptions.preferredFormat !== undefined\n                    ? imageOptions.preferredFormat\n                    : 'jpg',\n            supports: imageOptions.supports,\n            quality: options.quality && imageOptions.qualities.includes(options.quality)\n                ? options.quality\n                : imageOptions.qualities.includes('native')\n                    ? 'native'\n                    : 'default',\n            resolutions: Array.isArray(imageOptions.resolutions)\n                ? imageOptions.resolutions.sort(function (a, b) {\n                    return b - a;\n                })\n                : undefined,\n            tileSize: imageOptions.tileSize,\n        };\n    };\n    return IIIFInfo;\n}());\nexport default I
 IIFInfo;\n//# sourceMappingURL=IIIFInfo.js.map","/**\n * @module ol/source/IIIF\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport TileImage from './TileImage.js';\nimport { CustomTile } from './Zoomify.js';\nimport { DEFAULT_TILE_SIZE } from '../tilegrid/common.js';\nimport { Versions } from '../format/IIIFInfo.js';\nimport { assert } from '../asserts.js';\nimport { getTopLeft } from
  '../extent.js';\nimport { toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {null|string} [crossOrigin]\n * @property {import(\"../extent.js\").Extent} [extent=[0, -height, width, 0]]\n * @property {string} [format='jpg'] Requested image format.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {string} [quality] Requested IIIF image quality. Default is 'native'\n * for version 1, 'default' for versions 2 and 3.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {Array<number>} [resolutions] Supported resoluti
 ons as given in IIIF 'scaleFactors'\n * @property {import(\"../size.js\").Size} size Size of the image [width, height].\n * @property {Array<import(\"../size.js\").Size>} [sizes] Supported scaled image sizes.\n * Content of the IIIF info.json 'sizes' property, but as array of Size objects.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {Array<string>} [supports=[]] Supported IIIF region and size calculation\n * features.\n * @property {number} [tilePixelRatio]\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Same tile size is used for all zoom levels. If tile size is a number,\n * a square tile is assumed. If the IIIF image service supports arbitrary\n * tiling (sizeByH, sizeByW, sizeByWh or sizeByPct as well as regionByPx or regionByPct\n * are supported), the default tilesize is 256.\n * @property {number} [transition]\n * @property {string} [url] Base URL of the IIIF Image service.\n * This should be the same as the 
 IIIF Image ID.\n * @property {import(\"../format/IIIFInfo.js\").Versions} [version=Versions.VERSION2] Service's IIIF Image API version.\n * @property {number} [zDirection=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\nfunction formatPercentage(percentage) {\n    return percentage.toLocaleString('en', { maximumFractionDigits: 10 });\n}\n/**\n * @classdesc\n * Layer source for IIIF Image API services.\n * @api\n */\nvar IIIF = /** @class */ (function (_super) {\n    __extends(IIIF, _super);\n    /**\n     * @param {Options=} opt_options Tile source options. Use {@link import(\"../format/IIIFInfo.js\").IIIFInfo}\n     * to parse Image API service information responses into constructor options.\n     * @api\n     */\n    function IIIF(opt_options
 ) {\n        var _this = this;\n        /**\n         * @type {Partial<Options>}\n         */\n        var options = opt_options || {};\n        var baseUrl = options.url || '';\n        baseUrl =\n            baseUrl +\n                (baseUrl.lastIndexOf('/') === baseUrl.length - 1 || baseUrl === ''\n                    ? ''\n                    : '/');\n        var version = options.version || Versions.VERSION2;\n        var sizes = options.sizes || [];\n        var size = options.size;\n        assert(size != undefined &&\n            Array.isArray(size) &&\n            size.length == 2 &&\n            !isNaN(size[0]) &&\n            size[0] > 0 &&\n            !isNaN(size[1]) &&\n            size[1] > 0, 60);\n        var width = size[0];\n        var height = size[1];\n        var tileSize = options.tileSize;\n        var tilePixelRatio = options.tilePixelRatio || 1;\n        var format = options.format || 'jpg';\n        var quality = options.quality ||\n            (options
 .version == Versions.VERSION1 ? 'native' : 'default');\n        var resolutions = options.resolutions || [];\n        var supports = options.supports || [];\n        var extent = options.extent || [0, -height, width, 0];\n        var supportsListedSizes = sizes != undefined && Array.isArray(sizes) && sizes.length > 0;\n        var supportsListedTiles = tileSize !== undefined &&\n            ((typeof tileSize === 'number' &&\n                Number.isInteger(tileSize) &&\n                tileSize > 0) ||\n                (Array.isArray(tileSize) && tileSize.length > 0));\n        var supportsArbitraryTiling = supports != undefined &&\n            Array.isArray(supports) &&\n            (supports.includes('regionByPx') || supports.includes('regionByPct')) &&\n            (supports.includes('sizeByWh') ||\n                supports.includes('sizeByH') ||\n                supports.includes('sizeByW') ||\n                supports.includes('sizeByPct'));\n        var tileWidth, tileHeight,
  maxZoom;\n        resolutions.sort(function (a, b) {\n            return b - a;\n        });\n        if (supportsListedTiles || supportsArbitraryTiling) {\n            if (tileSize != undefined) {\n                if (typeof tileSize === 'number' &&\n                    Number.isInteger(tileSize) &&\n                    tileSize > 0) {\n                    tileWidth = tileSize;\n                    tileHeight = tileSize;\n                }\n                else if (Array.isArray(tileSize) && tileSize.length > 0) {\n                    if (tileSize.length == 1 ||\n                        (tileSize[1] == undefined && Number.isInteger(tileSize[0]))) {\n                        tileWidth = tileSize[0];\n                        tileHeight = tileSize[0];\n                    }\n                    if (tileSize.length == 2) {\n                        if (Number.isInteger(tileSize[0]) &&\n                            Number.isInteger(tileSize[1])) {\n                            tileWidth = 
 tileSize[0];\n                            tileHeight = tileSize[1];\n                        }\n                        else if (tileSize[0] == undefined &&\n                            Number.isInteger(tileSize[1])) {\n                            tileWidth = tileSize[1];\n                            tileHeight = tileSize[1];\n                        }\n                    }\n                }\n            }\n            if (tileWidth === undefined || tileHeight === undefined) {\n                tileWidth = DEFAULT_TILE_SIZE;\n                tileHeight = DEFAULT_TILE_SIZE;\n            }\n            if (resolutions.length == 0) {\n                maxZoom = Math.max(Math.ceil(Math.log(width / tileWidth) / Math.LN2), Math.ceil(Math.log(height / tileHeight) / Math.LN2));\n                for (var i = maxZoom; i >= 0; i--) {\n                    resolutions.push(Math.pow(2, i));\n                }\n            }\n            else {\n                var maxScaleFactor = Math.max.apply(
 Math, resolutions);\n                // TODO maxScaleFactor might not be a power to 2\n                maxZoom = Math.round(Math.log(maxScaleFactor) / Math.LN2);\n            }\n        }\n        else {\n            // No tile support.\n            tileWidth = width;\n            tileHeight = height;\n            resolutions = [];\n            if (supportsListedSizes) {\n                /*\n                 * 'sizes' provided. Use full region in different resolutions. Every\n                 * resolution has only one tile.\n                 */\n                sizes.sort(function (a, b) {\n                    return a[0] - b[0];\n                });\n                maxZoom = -1;\n                var ignoredSizesIndex = [];\n                for (var i = 0; i < sizes.length; i++) {\n                    var resolution = width / sizes[i][0];\n                    if (resolutions.length > 0 &&\n                        resolutions[resolutions.length - 1] == resolution) {\n               
          ignoredSizesIndex.push(i);\n                        continue;\n                    }\n                    resolutions.push(resolution);\n                    maxZoom++;\n                }\n                if (ignoredSizesIndex.length > 0) {\n                    for (var i = 0; i < ignoredSizesIndex.length; i++) {\n                        sizes.splice(ignoredSizesIndex[i] - i, 1);\n                    }\n                }\n            }\n            else {\n                // No useful image information at all. Try pseudo tile with full image.\n                resolutions.push(1);\n                sizes.push([width, height]);\n                maxZoom = 0;\n            }\n        }\n        var tileGrid = new TileGrid({\n            tileSize: [tileWidth, tileHeight],\n            extent: extent,\n            origin: getTopLeft(extent),\n            resolutions: resolutions,\n        });\n        var tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n            
 var regionParam, sizeParam;\n            var zoom = tileCoord[0];\n            if (zoom > maxZoom) {\n                return;\n            }\n            var tileX = tileCoord[1], tileY = tileCoord[2], scale = resolutions[zoom];\n            if (tileX === undefined ||\n                tileY === undefined ||\n                scale === undefined ||\n                tileX < 0 ||\n                Math.ceil(width / scale / tileWidth) <= tileX ||\n                tileY < 0 ||\n                Math.ceil(height / scale / tileHeight) <= tileY) {\n                return;\n            }\n            if (supportsArbitraryTiling || supportsListedTiles) {\n                var regionX = tileX * tileWidth * scale, regionY = tileY * tileHeight * scale;\n                var regionW = tileWidth * scale, regionH = tileHeight * scale, sizeW = tileWidth, sizeH = tileHeight;\n                if (regionX + regionW > width) {\n                    regionW = width - regionX;\n                }\n              
   if (regionY + regionH > height) {\n                    regionH = height - regionY;\n                }\n                if (regionX + tileWidth * scale > width) {\n                    sizeW = Math.floor((width - regionX + scale - 1) / scale);\n                }\n                if (regionY + tileHeight * scale > height) {\n                    sizeH = Math.floor((height - regionY + scale - 1) / scale);\n                }\n                if (regionX == 0 &&\n                    regionW == width &&\n                    regionY == 0 &&\n                    regionH == height) {\n                    // canonical full image region parameter is 'full', not 'x,y,w,h'\n                    regionParam = 'full';\n                }\n                else if (!supportsArbitraryTiling ||\n                    supports.includes('regionByPx')) {\n                    regionParam = regionX + ',' + regionY + ',' + regionW + ',' + regionH;\n                }\n                else if (supports.includes('
 regionByPct')) {\n                    var pctX = formatPercentage((regionX / width) * 100), pctY = formatPercentage((regionY / height) * 100), pctW = formatPercentage((regionW / width) * 100), pctH = formatPercentage((regionH / height) * 100);\n                    regionParam = 'pct:' + pctX + ',' + pctY + ',' + pctW + ',' + pctH;\n                }\n                if (version == Versions.VERSION3 &&\n                    (!supportsArbitraryTiling || supports.includes('sizeByWh'))) {\n                    sizeParam = sizeW + ',' + sizeH;\n                }\n                else if (!supportsArbitraryTiling || supports.includes('sizeByW')) {\n                    sizeParam = sizeW + ',';\n                }\n                else if (supports.includes('sizeByH')) {\n                    sizeParam = ',' + sizeH;\n                }\n                else if (supports.includes('sizeByWh')) {\n                    sizeParam = sizeW + ',' + sizeH;\n                }\n                else if (sup
 ports.includes('sizeByPct')) {\n                    sizeParam = 'pct:' + formatPercentage(100 / scale);\n                }\n            }\n            else {\n                regionParam = 'full';\n                if (supportsListedSizes) {\n                    var regionWidth = sizes[zoom][0], regionHeight = sizes[zoom][1];\n                    if (version == Versions.VERSION3) {\n                        if (regionWidth == width && regionHeight == height) {\n                            sizeParam = 'max';\n                        }\n                        else {\n                            sizeParam = regionWidth + ',' + regionHeight;\n                        }\n                    }\n                    else {\n                        if (regionWidth == width) {\n                            sizeParam = 'full';\n                        }\n                        else {\n                            sizeParam = regionWidth + ',';\n                        }\n                    }\n  
               }\n                else {\n                    sizeParam = version == Versions.VERSION3 ? 'max' : 'full';\n                }\n            }\n            return (baseUrl + regionParam + '/' + sizeParam + '/0/' + quality + '.' + format);\n        };\n        var IiifTileClass = CustomTile.bind(null, toSize(tileSize || 256).map(function (size) {\n            return size * tilePixelRatio;\n        }));\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            state: options.state,\n            tileClass: IiifTileClass,\n            tileGrid: tileGrid,\n            tilePixelRatio: options.tilePixelRatio,
 \n            tileUrlFunction: tileUrlFunction,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @type {number}\n         */\n        _this.zDirection = options.zDirection;\n        return _this;\n    }\n    return IIIF;\n}(TileImage));\nexport default IIIF;\n//# sourceMappingURL=IIIF.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/reproj/Image\n */\nimport { ERROR_THRESHOL
 D } from './common.js';\nimport EventType from '../events/EventType.js';\nimport ImageBase from '../ImageBase.js';\nimport ImageState from '../ImageState.js';\nimport Triangulation from './Triangulation.js';\nimport { calculateSourceResolution, render as renderReprojected, } from '../reproj.js';\nimport { getCenter, getHeight, getIntersection, getWidth } from '../extent.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {function(import(\"../extent.js\").Extent, number, number) : import(\"../ImageBase.js\").default} FunctionType\n */\n/**\n * @classdesc\n * Class encapsulating single reprojected image.\n * See {@link module:ol/source/Image~ImageSource}.\n */\nvar ReprojImage = /** @class */ (function (_super) {\n    __extends(ReprojImage, _super);\n    /**\n     * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection (of the data).\n     * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n     * @pa
 ram {import(\"../extent.js\").Extent} targetExtent Target extent.\n     * @param {number} targetResolution Target resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {FunctionType} getImageFunction\n     *     Function returning source images (extent, resolution, pixelRatio).\n     * @param {object=} opt_contextOptions Properties to set on the canvas context.\n     */\n    function ReprojImage(sourceProj, targetProj, targetExtent, targetResolution, pixelRatio, getImageFunction, opt_contextOptions) {\n        var _this = this;\n        var maxSourceExtent = sourceProj.getExtent();\n        var maxTargetExtent = targetProj.getExtent();\n        var limitedTargetExtent = maxTargetExtent\n            ? getIntersection(targetExtent, maxTargetExtent)\n            : targetExtent;\n        var targetCenter = getCenter(limitedTargetExtent);\n        var sourceResolution = calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution);\n        var er
 rorThresholdInPixels = ERROR_THRESHOLD;\n        var triangulation = new Triangulation(sourceProj, targetProj, limitedTargetExtent, maxSourceExtent, sourceResolution * errorThresholdInPixels, targetResolution);\n        var sourceExtent = triangulation.calculateSourceExtent();\n        var sourceImage = getImageFunction(sourceExtent, sourceResolution, pixelRatio);\n        var state = sourceImage ? ImageState.IDLE : ImageState.EMPTY;\n        var sourcePixelRatio = sourceImage ? sourceImage.getPixelRatio() : 1;\n        _this = _super.call(this, targetExtent, targetResolution, sourcePixelRatio, state) || this;\n        /**\n         * @private\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.targetProj_ = targetProj;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.maxSourceExtent_ = maxSourceExtent;\n        /**\n         * @private\n         * @type {!import(\"./Triangulation.
 js\").default}\n         */\n        _this.triangulation_ = triangulation;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.targetResolution_ = targetResolution;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.targetExtent_ = targetExtent;\n        /**\n         * @private\n         * @type {import(\"../ImageBase.js\").default}\n         */\n        _this.sourceImage_ = sourceImage;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.sourcePixelRatio_ = sourcePixelRatio;\n        /**\n         * @private\n         * @type {object}\n         */\n        _this.contextOptions_ = opt_contextOptions;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = null;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\n        _this.sourceListenerKey
 _ = null;\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    ReprojImage.prototype.disposeInternal = function () {\n        if (this.state == ImageState.LOADING) {\n            this.unlistenSource_();\n        }\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * @return {HTMLCanvasElement} Image.\n     */\n    ReprojImage.prototype.getImage = function () {\n        return this.canvas_;\n    };\n    /**\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    ReprojImage.prototype.getProjection = function () {\n        return this.targetProj_;\n    };\n    /**\n     * @private\n     */\n    ReprojImage.prototype.reproject_ = function () {\n        var sourceState = this.sourceImage_.getState();\n        if (sourceState == ImageState.LOADED) {\n            var width = getWidth(this.targetExtent_) / this.targetResolution_;\n            var height = getHeight(this.targetExtent_) / this.targetResolution_;\n     
        this.canvas_ = renderReprojected(width, height, this.sourcePixelRatio_, this.sourceImage_.getResolution(), this.maxSourceExtent_, this.targetResolution_, this.targetExtent_, this.triangulation_, [\n                {\n                    extent: this.sourceImage_.getExtent(),\n                    image: this.sourceImage_.getImage(),\n                },\n            ], 0, undefined, this.contextOptions_);\n        }\n        this.state = sourceState;\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    ReprojImage.prototype.load = function () {\n        if (this.state == ImageState.IDLE) {\n            this.state = ImageState.LOADING;\n            this.changed();\n            var sourceState = this.sourceImage_.getState();\n            if (sourceState == ImageState.LOADED || sourceState == ImageState.ERROR) {\n                this.reproject_();\n            }\n            else {\n                this.sourceListenerKey_ = listen(this.sourceIma
 ge_, EventType.CHANGE, function (e) {\n                    var sourceState = this.sourceImage_.getState();\n                    if (sourceState == ImageState.LOADED ||\n                        sourceState == ImageState.ERROR) {\n                        this.unlistenSource_();\n                        this.reproject_();\n                    }\n                }, this);\n                this.sourceImage_.load();\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    ReprojImage.prototype.unlistenSource_ = function () {\n        unlistenByKey(\n        /** @type {!import(\"../events.js\").EventsKey} */ (this.sourceListenerKey_));\n        this.sourceListenerKey_ = null;\n    };\n    return ReprojImage;\n}(ImageBase));\nexport default ReprojImage;\n//# sourceMappingURL=Image.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } ins
 tanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Image\n */\nimport Event from '../events/Event.js';\nimport ImageState from '../ImageState.js';\nimport ReprojImage from '../reproj/Image.js';\nimport Source from './Source.js';\nimport { ENABLE_RASTER_REPROJECTION } from '../reproj/common.js';\nimport { IMAGE_SMOOTHING_DISABLED } from './common.js';\nimport { abstract } from '../util.js';\nimport { equals } from '../extent.js';\nimport { equivalent } from '../proj.js';\nimport { linearFindNearest } from '../array.js';\n/**\n * @enum {string}\n */\nexport var ImageSourceEventType = {\n    /**\n     * Tr
 iggered when an image starts loading.\n     * @event module:ol/source/Image.ImageSourceEvent#imageloadstart\n     * @api\n     */\n    IMAGELOADSTART: 'imageloadstart',\n    /**\n     * Triggered when an image finishes loading.\n     * @event module:ol/source/Image.ImageSourceEvent#imageloadend\n     * @api\n     */\n    IMAGELOADEND: 'imageloadend',\n    /**\n     * Triggered if image loading results in an error.\n     * @event module:ol/source/Image.ImageSourceEvent#imageloaderror\n     * @api\n     */\n    IMAGELOADERROR: 'imageloaderror',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Image~ImageSource} instances are instances of this\n * type.\n */\nvar ImageSourceEvent = /** @class */ (function (_super) {\n    __extends(ImageSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../Image.js\").default} image The image.\n     */\n    function ImageSourceEvent(type, image) {\n        var _this = _super.call(this, type) |
 | this;\n        /**\n         * The image related to the event.\n         * @type {import(\"../Image.js\").default}\n         * @api\n         */\n        _this.image = image;\n        return _this;\n    }\n    return ImageSourceEvent;\n}(Event));\nexport { ImageSourceEvent };\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {Array<number>} [resolutions]\n * @property {import(\"./State.js\").default} [state]\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing a single image.\n * @abstract\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageSource = /** @class */ (function (_super) {\n    __extends(ImageSource, _super);\n    /**\n     * @param {O
 ptions} options Single image source options.\n     */\n    function ImageSource(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            projection: options.projection,\n            state: options.state,\n        }) || this;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.resolutions_ =\n            options.resolutions !== undefined ? options.resolutions : null;\n        /**\n         * @private\n         * @type {import(\"../reproj/Image.js\").default}\n         */\n        _this.reprojectedImage_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.reprojectedRevision_ = 0;\n        /**\n         * @private\n         * @type {object|undefined}\n         */\n        _this.contextOptions_ =\n            options.imageSmoothing === false ? IMAGE_SMOOTHING_DISABLED : undefined;\n        return _this;\n    }\n    /**\n     * @return {Array<
 number>} Resolutions.\n     */\n    ImageSource.prototype.getResolutions = function () {\n        return this.resolutions_;\n    };\n    /**\n     * @return {Object|undefined} Context options.\n     */\n    ImageSource.prototype.getContextOptions = function () {\n        return this.contextOptions_;\n    };\n    /**\n     * @protected\n     * @param {number} resolution Resolution.\n     * @return {number} Resolution.\n     */\n    ImageSource.prototype.findNearestResolution = function (resolution) {\n        if (this.resolutions_) {\n            var idx = linearFindNearest(this.resolutions_, resolution, 0);\n            resolution = this.resolutions_[idx];\n        }\n        return resolution;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageB
 ase.js\").default} Single image.\n     */\n    ImageSource.prototype.getImage = function (extent, resolution, pixelRatio, projection) {\n        var sourceProjection = this.getProjection();\n        if (!ENABLE_RASTER_REPROJECTION ||\n            !sourceProjection ||\n            !projection ||\n            equivalent(sourceProjection, projection)) {\n            if (sourceProjection) {\n                projection = sourceProjection;\n            }\n            return this.getImageInternal(extent, resolution, pixelRatio, projection);\n        }\n        else {\n            if (this.reprojectedImage_) {\n                if (this.reprojectedRevision_ == this.getRevision() &&\n                    equivalent(this.reprojectedImage_.getProjection(), projection) &&\n                    this.reprojectedImage_.getResolution() == resolution &&\n                    equals(this.reprojectedImage_.getExtent(), extent)) {\n                    return this.reprojectedImage_;\n                }\n    
             this.reprojectedImage_.dispose();\n                this.reprojectedImage_ = null;\n            }\n            this.reprojectedImage_ = new ReprojImage(sourceProjection, projection, extent, resolution, pixelRatio, function (extent, resolution, pixelRatio) {\n                return this.getImageInternal(extent, resolution, pixelRatio, sourceProjection);\n            }.bind(this), this.contextOptions_);\n            this.reprojectedRevision_ = this.getRevision();\n            return this.reprojectedImage_;\n        }\n    };\n    /**\n     * @abstract\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageBase.js\").default} Single image.\n     * @protected\n     */\n    ImageSource.prototype.getImageInternal = function (extent, resolution, pixelRatio, proje
 ction) {\n        return abstract();\n    };\n    /**\n     * Handle image change events.\n     * @param {import(\"../events/Event.js\").default} event Event.\n     * @protected\n     */\n    ImageSource.prototype.handleImageChange = function (event) {\n        var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n        switch (image.getState()) {\n            case ImageState.LOADING:\n                this.loading = true;\n                this.dispatchEvent(new ImageSourceEvent(ImageSourceEventType.IMAGELOADSTART, image));\n                break;\n            case ImageState.LOADED:\n                this.loading = false;\n                this.dispatchEvent(new ImageSourceEvent(ImageSourceEventType.IMAGELOADEND, image));\n                break;\n            case ImageState.ERROR:\n                this.loading = false;\n                this.dispatchEvent(new ImageSourceEvent(ImageSourceEventType.IMAGELOADERROR, image));\n                break;\n            defa
 ult:\n            // pass\n        }\n    };\n    return ImageSource;\n}(Source));\n/**\n * Default image load function for image sources that use import(\"../Image.js\").Image image\n * instances.\n * @param {import(\"../Image.js\").default} image Image.\n * @param {string} src Source.\n */\nexport function defaultImageLoadFunction(image, src) {\n    /** @type {HTMLImageElement|HTMLVideoElement} */ (image.getImage()).src = src;\n}\nexport default ImageSource;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/uri\n */\n/**\n * Appends query parameters to a URI.\n *\n * @param {string} uri The original URI, which may already have query data.\n * @param {!Object} params An object where keys are URI-encoded parameter keys,\n *     and the values are arbitrary types or arrays.\n * @return {string} The new URI.\n */\nexport function appendParams(uri, params) {\n    var keyParams = [];\n    // Skip any null or undefined parameter values\n    Object.keys(params).forEach(function (k) 
 {\n        if (params[k] !== null && params[k] !== undefined) {\n            keyParams.push(k + '=' + encodeURIComponent(params[k]));\n        }\n    });\n    var qs = keyParams.join('&');\n    // remove any trailing ? or &\n    uri = uri.replace(/[?&]$/, '');\n    // append ? or & depending on whether uri has existing parameters\n    uri = uri.indexOf('?') === -1 ? uri + '?' : uri + '&';\n    return uri + qs;\n}\n//# sourceMappingURL=uri.js.map","/**\n * @module ol/source/ImageArcGISRest\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        
 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport { appendParams } from '../uri.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { containsExtent, getHeight, getWidth } from '../extent.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting the image from\n * the remote server.\n * @p
 roperty {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given\n * a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} [params] ArcGIS Rest parameters. This field is optional. Service\n * defaults will be used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is\n * `IMAGE` by default. `TRANSPARENT` is `true` by default.  `BBOX`, `SIZE`, `BBOXSR`, and `IMAGESR`\n * will be set dynamically. Set `LAYERS` to override the default service layer visibility. See\n * {@link http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/}\n * for further reference.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport,\n * `2` means twice the size of the map viewport, and so on.\n * @proper
 ty {Array<number>} [resolutions] Resolutions. If specified, requests will be made for\n * these resolutions only.\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The url\n * should include /MapServer or /ImageServer.\n */\n/**\n * @classdesc\n * Source for data from ArcGIS Rest services providing single, untiled images.\n * Useful when underlying map service has labels.\n *\n * If underlying map service is not using labels,\n * take advantage of ol image caching and use\n * {@link module:ol/source/TileArcGISRest} data source.\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageArcGISRest = /** @class */ (function (_super) {\n    __extends(ImageArcGISRest, _super);\n    /**\n     * @param {Options=} opt_options Image ArcGIS Rest Options.\n     */\n    function ImageArcGISRest(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n        
     attributions: options.attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n        }) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.url_ = options.url;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").LoadFunction}\n         */\n        _this.imageLoadFunction_ =\n            options.imageLoadFunction !== undefined\n                ? options.imageLoadFunction\n                : defaultImageLoadFunction;\n        /**\n         * @private\n         * @type {!Ob
 ject}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.imageSize_ = [0, 0];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n        return _this;\n    }\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    ImageArcGISRest.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Exten
 t} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../Image.js\").default} Single image.\n     */\n    ImageArcGISRest.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        if (this.url_ === undefined) {\n            return null;\n        }\n        resolution = this.findNearestResolution(resolution);\n        pixelRatio = this.hidpi_ ? pixelRatio : 1;\n        var image = this.image_;\n        if (image &&\n            this.renderedRevision_ == this.getRevision() &&\n            image.getResolution() == resolution &&\n            image.getPixelRatio() == pixelRatio &&\n            containsExtent(image.getExtent(), extent)) {\n            return image;\n        }\n        var params = {\n            'F': 'image',\n            'FORMAT': 'PNG32',\n            'TRANSPARENT': true
 ,\n        };\n        assign(params, this.params_);\n        extent = extent.slice();\n        var centerX = (extent[0] + extent[2]) / 2;\n        var centerY = (extent[1] + extent[3]) / 2;\n        if (this.ratio_ != 1) {\n            var halfWidth = (this.ratio_ * getWidth(extent)) / 2;\n            var halfHeight = (this.ratio_ * getHeight(extent)) / 2;\n            extent[0] = centerX - halfWidth;\n            extent[1] = centerY - halfHeight;\n            extent[2] = centerX + halfWidth;\n            extent[3] = centerY + halfHeight;\n        }\n        var imageResolution = resolution / pixelRatio;\n        // Compute an integer width and height.\n        var width = Math.ceil(getWidth(extent) / imageResolution);\n        var height = Math.ceil(getHeight(extent) / imageResolution);\n        // Modify the extent to match the integer width and height.\n        extent[0] = centerX - (imageResolution * width) / 2;\n        extent[2] = centerX + (imageResolution * width) / 2;\n   
      extent[1] = centerY - (imageResolution * height) / 2;\n        extent[3] = centerY + (imageResolution * height) / 2;\n        this.imageSize_[0] = width;\n        this.imageSize_[1] = height;\n        var url = this.getRequestUrl_(extent, this.imageSize_, pixelRatio, projection, params);\n        this.image_ = new ImageWrapper(extent, resolution, pixelRatio, url, this.crossOrigin_, this.imageLoadFunction_);\n        this.renderedRevision_ = this.getRevision();\n        this.image_.addEventListener(EventType.CHANGE, this.handleImageChange.bind(this));\n        return this.image_;\n    };\n    /**\n     * Return the image load function of the source.\n     * @return {import(\"../Image.js\").LoadFunction} The image load function.\n     * @api\n     */\n    ImageArcGISRest.prototype.getImageLoadFunction = function () {\n        return this.imageLoadFunction_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../size.js\").Size
 } size Size.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string} Request URL.\n     * @private\n     */\n    ImageArcGISRest.prototype.getRequestUrl_ = function (extent, size, pixelRatio, projection, params) {\n        // ArcGIS Server only wants the numeric portion of the projection ID.\n        var srid = projection.getCode().split(':').pop();\n        params['SIZE'] = size[0] + ',' + size[1];\n        params['BBOX'] = extent.join(',');\n        params['BBOXSR'] = srid;\n        params['IMAGESR'] = srid;\n        params['DPI'] = Math.round(90 * pixelRatio);\n        var url = this.url_;\n        var modifiedUrl = url\n            .replace(/MapServer\\/?$/, 'MapServer/export')\n            .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n        if (modifiedUrl == url) {\n            assert(false, 50); // `options.featureTypes` shoul
 d be an Array\n        }\n        return appendParams(modifiedUrl, params);\n    };\n    /**\n     * Return the URL used for this ArcGIS source.\n     * @return {string|undefined} URL.\n     * @api\n     */\n    ImageArcGISRest.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * Set the image load function of the source.\n     * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n     * @api\n     */\n    ImageArcGISRest.prototype.setImageLoadFunction = function (imageLoadFunction) {\n        this.image_ = null;\n        this.imageLoadFunction_ = imageLoadFunction;\n        this.changed();\n    };\n    /**\n     * Set the URL to use for requests.\n     * @param {string|undefined} url URL.\n     * @api\n     */\n    ImageArcGISRest.prototype.setUrl = function (url) {\n        if (url != this.url_) {\n            this.url_ = url;\n            this.image_ = null;\n            this.changed();\n        }\n    };\n    /**\
 n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    ImageArcGISRest.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.image_ = null;\n        this.changed();\n    };\n    return ImageArcGISRest;\n}(ImageSource));\nexport default ImageArcGISRest;\n//# sourceMappingURL=ImageArcGISRest.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/*
 *\n * @module ol/ImageCanvas\n */\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\n/**\n * A function that is called to trigger asynchronous canvas drawing.  It is\n * called with a \"done\" callback that should be called when drawing is done.\n * If any error occurs during drawing, the \"done\" callback should be called with\n * that error.\n *\n * @typedef {function(function(Error=): void): void} Loader\n */\nvar ImageCanvas = /** @class */ (function (_super) {\n    __extends(ImageCanvas, _super);\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {HTMLCanvasElement} canvas Canvas.\n     * @param {Loader=} opt_loader Optional loader function to\n     *     support asynchronous canvas drawing.\n     */\n    function ImageCanvas(extent, resolution, pixelRatio, canvas, opt_loader) {\n        var _this = this;\n        v
 ar state = opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED;\n        _this = _super.call(this, extent, resolution, pixelRatio, state) || this;\n        /**\n         * Optional canvas loader function.\n         * @type {?Loader}\n         * @private\n         */\n        _this.loader_ = opt_loader !== undefined ? opt_loader : null;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = canvas;\n        /**\n         * @private\n         * @type {?Error}\n         */\n        _this.error_ = null;\n        return _this;\n    }\n    /**\n     * Get any error associated with asynchronous rendering.\n     * @return {?Error} Any error that occurred during rendering.\n     */\n    ImageCanvas.prototype.getError = function () {\n        return this.error_;\n    };\n    /**\n     * Handle async drawing complete.\n     * @param {Error=} err Any error during drawing.\n     * @private\n     */\n    ImageCanvas.prototype.handl
 eLoad_ = function (err) {\n        if (err) {\n            this.error_ = err;\n            this.state = ImageState.ERROR;\n        }\n        else {\n            this.state = ImageState.LOADED;\n        }\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    ImageCanvas.prototype.load = function () {\n        if (this.state == ImageState.IDLE) {\n            this.state = ImageState.LOADING;\n            this.changed();\n            this.loader_(this.handleLoad_.bind(this));\n        }\n    };\n    /**\n     * @return {HTMLCanvasElement} Canvas element.\n     */\n    ImageCanvas.prototype.getImage = function () {\n        return this.canvas_;\n    };\n    return ImageCanvas;\n}(ImageBase));\nexport default ImageCanvas;\n//# sourceMappingURL=ImageCanvas.js.map","/**\n * @module ol/source/ImageCanvas\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeO
 f ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport ImageCanvas from '../ImageCanvas.js';\nimport ImageSource from './Image.js';\nimport { containsExtent, getHeight, getWidth, scaleFromCenter, } from '../extent.js';\n/**\n * A function returning the canvas element (`{HTMLCanvasElement}`)\n * used by the source as an image. The arguments passed to the function are:\n * {@link module:ol/extent~Extent} the image extent, `{number}` the image resolution,\n * `{number}` the device pixel ratio, {@link module:ol/size~Size} the image size, and\n * {@link module:ol/proj/Projection} the image p
 rojection. The canvas returned by\n * this function is cached by the source. The this keyword inside the function\n * references the {@link module:ol/source/ImageCanvas}.\n *\n * @typedef {function(this:import(\"../ImageCanvas.js\").default, import(\"../extent.js\").Extent, number,\n *     number, import(\"../size.js\").Size, import(\"../proj/Projection.js\").default): HTMLCanvasElement} FunctionType\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {FunctionType} [canvasFunction] Canvas function.\n * The function returning the canvas element used by the source\n * as an image. The arguments passed to the function are: `{import(\"../extent.js\").Extent}` the\n * image extent, `{number}` the image resolution, `{number}` the device pixel\n * ratio, `{import(\"../size.js\").Size}` the image size, and `{import(\"../proj/Projection.js\").Projection}` the image\n * projection. The canvas returned by t
 his function is cached by the source. If\n * the value returned by the function is later changed then\n * `changed` should be called on the source for the source to\n * invalidate the current cached image. See: {@link module:ol/Observable~Observable#changed}\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. 1 means canvases are the size of the map viewport, 2 means twice the\n * width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, new canvases will be created for these resolutions\n * @property {import(\"./State.js\").default} [state] Source state.\n */\n/**\n * @classdesc\n * Base class for image sources where a canvas element is the image.\n * @api\n */\nvar ImageCanvasSource = /** @class */ (function (_super) {\n    _
 _extends(ImageCanvasSource, _super);\n    /**\n     * @param {Options=} opt_options ImageCanvas options.\n     */\n    function ImageCanvasSource(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n            state: options.state,\n        }) || this;\n        /**\n         * @private\n         * @type {FunctionType}\n         */\n        _this.canvasFunction_ = options.canvasFunction;\n        /**\n         * @private\n         * @type {import(\"../ImageCanvas.js\").default}\n         */\n        _this.canvas_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n       
  _this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n        return _this;\n    }\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageCanvas.js\").default} Single image.\n     */\n    ImageCanvasSource.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        resolution = this.findNearestResolution(resolution);\n        var canvas = this.canvas_;\n        if (canvas &&\n            this.renderedRevision_ == this.getRevision() &&\n            canvas.getResolution() == resolution &&\n            canvas.getPixelRatio() == pixelRatio &&\n            containsExtent(canvas.getExtent(), extent)) {\n            return canvas;\n        }\n        extent = extent.slice();\n        scaleFromCenter(extent, this.ratio
 _);\n        var width = getWidth(extent) / resolution;\n        var height = getHeight(extent) / resolution;\n        var size = [width * pixelRatio, height * pixelRatio];\n        var canvasElement = this.canvasFunction_.call(this, extent, resolution, pixelRatio, size, projection);\n        if (canvasElement) {\n            canvas = new ImageCanvas(extent, resolution, pixelRatio, canvasElement);\n        }\n        this.canvas_ = canvas;\n        this.renderedRevision_ = this.getRevision();\n        return canvas;\n    };\n    return ImageCanvasSource;\n}(ImageSource));\nexport default ImageCanvasSource;\n//# sourceMappingURL=ImageCanvas.js.map","/**\n * @module ol/source/ImageMapGuide\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) i
 f (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport { appendParams } from '../uri.js';\nimport { assign } from '../obj.js';\nimport { containsExtent, getCenter, getHeight, getWidth, scaleFromCenter, } from '../extent.js';\n/**\n * @typedef {Object} Options\n * @property {string} [url] The mapagent url.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_i
 mage for more detail.\n * @property {number} [displayDpi=96] The display resolution.\n * @property {number} [metersPerUnit=1] The meters-per-unit value.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {boolean} [useOverlay] If `true`, will use `GETDYNAMICMAPOVERLAYIMAGE`.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @proper
 ty {Object} [params] Additional parameters.\n */\n/**\n * @classdesc\n * Source for images from Mapguide servers\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageMapGuide = /** @class */ (function (_super) {\n    __extends(ImageMapGuide, _super);\n    /**\n     * @param {Options} options ImageMapGuide options.\n     */\n    function ImageMapGuide(options) {\n        var _this = _super.call(this, {\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n        }) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.displayDpi_ =\n            options.displayDpi !== undefined ? options.displayDpi : 96;\n        /**\n         * @private\n       
   * @type {!Object}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.url_ = options.url;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").LoadFunction}\n         */\n        _this.imageLoadFunction_ =\n            options.imageLoadFunction !== undefined\n                ? options.imageLoadFunction\n                : defaultImageLoadFunction;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.metersPerUnit_ =\n            options.metersPerUnit !== undefined ? options.metersPerUnit : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.ratio_ = options.ratio !== undefined ? options.ratio : 1;\n        /**\n         * @private
 \n         * @type {boolean}\n         */\n        _this.useOverlay_ =\n            options.useOverlay !== undefined ? options.useOverlay : false;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        return _this;\n    }\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    ImageMapGuide.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     
 * @return {import(\"../Image.js\").default} Single image.\n     */\n    ImageMapGuide.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        resolution = this.findNearestResolution(resolution);\n        pixelRatio = this.hidpi_ ? pixelRatio : 1;\n        var image = this.image_;\n        if (image &&\n            this.renderedRevision_ == this.getRevision() &&\n            image.getResolution() == resolution &&\n            image.getPixelRatio() == pixelRatio &&\n            containsExtent(image.getExtent(), extent)) {\n            return image;\n        }\n        if (this.ratio_ != 1) {\n            extent = extent.slice();\n            scaleFromCenter(extent, this.ratio_);\n        }\n        var width = getWidth(extent) / resolution;\n        var height = getHeight(extent) / resolution;\n        var size = [width * pixelRatio, height * pixelRatio];\n        if (this.url_ !== undefined) {\n            var imageUrl = this.getUrl(this.url_, th
 is.params_, extent, size, projection);\n            image = new ImageWrapper(extent, resolution, pixelRatio, imageUrl, this.crossOrigin_, this.imageLoadFunction_);\n            image.addEventListener(EventType.CHANGE, this.handleImageChange.bind(this));\n        }\n        else {\n            image = null;\n        }\n        this.image_ = image;\n        this.renderedRevision_ = this.getRevision();\n        return image;\n    };\n    /**\n     * Return the image load function of the source.\n     * @return {import(\"../Image.js\").LoadFunction} The image load function.\n     * @api\n     */\n    ImageMapGuide.prototype.getImageLoadFunction = function () {\n        return this.imageLoadFunction_;\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    ImageMapGuide.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.changed();\n    };\n    /**\n     * @param {string} bas
 eUrl The mapagent url.\n     * @param {Object<string, string|number>} params Request parameters.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../size.js\").Size} size Size.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {string} The mapagent map image request URL.\n     */\n    ImageMapGuide.prototype.getUrl = function (baseUrl, params, extent, size, projection) {\n        var scale = getScale(extent, size, this.metersPerUnit_, this.displayDpi_);\n        var center = getCenter(extent);\n        var baseParams = {\n            'OPERATION': this.useOverlay_\n                ? 'GETDYNAMICMAPOVERLAYIMAGE'\n                : 'GETMAPIMAGE',\n            'VERSION': '2.0.0',\n            'LOCALE': 'en',\n            'CLIENTAGENT': 'ol/source/ImageMapGuide source',\n            'CLIP': '1',\n            'SETDISPLAYDPI': this.displayDpi_,\n            'SETDISPLAYWIDTH': Math.round(size[0]),\n      
       'SETDISPLAYHEIGHT': Math.round(size[1]),\n            'SETVIEWSCALE': scale,\n            'SETVIEWCENTERX': center[0],\n            'SETVIEWCENTERY': center[1],\n        };\n        assign(baseParams, params);\n        return appendParams(baseUrl, baseParams);\n    };\n    /**\n     * Set the image load function of the MapGuide source.\n     * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n     * @api\n     */\n    ImageMapGuide.prototype.setImageLoadFunction = function (imageLoadFunction) {\n        this.image_ = null;\n        this.imageLoadFunction_ = imageLoadFunction;\n        this.changed();\n    };\n    return ImageMapGuide;\n}(ImageSource));\n/**\n * @param {import(\"../extent.js\").Extent} extent The map extents.\n * @param {import(\"../size.js\").Size} size The viewport size.\n * @param {number} metersPerUnit The meters-per-unit value.\n * @param {number} dpi The display resolution.\n * @return {number} The computed map scale.\n
  */\nfunction getScale(extent, size, metersPerUnit, dpi) {\n    var mcsW = getWidth(extent);\n    var mcsH = getHeight(extent);\n    var devW = size[0];\n    var devH = size[1];\n    var mpp = 0.0254 / dpi;\n    if (devH * mcsW > devW * mcsH) {\n        return (mcsW * metersPerUnit) / (devW * mpp); // width limited\n    }\n    else {\n        return (mcsH * metersPerUnit) / (devH * mpp); // height limited\n    }\n}\nexport default ImageMapGuide;\n//# sourceMappingURL=ImageMapGuide.js.map","/**\n * @module ol/source/ImageStatic\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function _
 _() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageState from '../ImageState.js';\nimport ImageWrapper from '../Image.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { getHeight, getWidth, intersects } from '../extent.js';\nimport { get as getProjection } from '../proj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../extent.js\").Extent} [imageExtent] Extent 
 of the image in map coordinates.\n * This is the [left, bottom, right, top] map coordinates of your image.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"../size.js\").Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this\n * only needs to be set if auto-detection fails for some reason.\n * @property {string} url Image URL.\n */\n/**\n * @classdesc\n * A layer source for displaying a single, static image.\n * @api\n */\nvar Static = /** @class */ (function (_super) {\n    __extends(Static, _super);\n    /**\n     * @param {Options} options ImageStatic options.\n     */\n    function Static(options) {\n        var _this = this;\n        var crossOrigin = options.crossO
 rigin !== undefined ? options.crossOrigin : null;\n        var /** @type {import(\"../Image.js\").LoadFunction} */ imageLoadFunction = options.imageLoadFunction !== undefined\n            ? options.imageLoadFunction\n            : defaultImageLoadFunction;\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: getProjection(options.projection),\n        }) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.url_ = options.url;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.imageExtent_ = options.imageExtent;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = new ImageWrapper(_this.imageExtent_, undefined, 1, _this.url_, crossOrigin, imageLoadFunction);\n        /**\n         * @private\n       
   * @type {import(\"../size.js\").Size}\n         */\n        _this.imageSize_ = options.imageSize ? options.imageSize : null;\n        _this.image_.addEventListener(EventType.CHANGE, _this.handleImageChange.bind(_this));\n        return _this;\n    }\n    /**\n     * Returns the image extent\n     * @return {import(\"../extent.js\").Extent} image extent.\n     * @api\n     */\n    Static.prototype.getImageExtent = function () {\n        return this.imageExtent_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../Image.js\").default} Single image.\n     */\n    Static.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        if (intersects(extent, this.image_.getExtent())) {\n            return this.image_;\n       
  }\n        return null;\n    };\n    /**\n     * Return the URL used for this image source.\n     * @return {string} URL.\n     * @api\n     */\n    Static.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * @param {import(\"../events/Event.js\").default} evt Event.\n     */\n    Static.prototype.handleImageChange = function (evt) {\n        if (this.image_.getState() == ImageState.LOADED) {\n            var imageExtent = this.image_.getExtent();\n            var image = this.image_.getImage();\n            var imageWidth = void 0, imageHeight = void 0;\n            if (this.imageSize_) {\n                imageWidth = this.imageSize_[0];\n                imageHeight = this.imageSize_[1];\n            }\n            else {\n                imageWidth = image.width;\n                imageHeight = image.height;\n            }\n            var resolution = getHeight(imageExtent) / imageHeight;\n            var targetWidth = Math.ceil(getWidth(imageExten
 t) / resolution);\n            if (targetWidth != imageWidth) {\n                var context = createCanvasContext2D(targetWidth, imageHeight);\n                var canvas = context.canvas;\n                context.drawImage(image, 0, 0, imageWidth, imageHeight, 0, 0, canvas.width, canvas.height);\n                this.image_.setImage(canvas);\n            }\n        }\n        _super.prototype.handleImageChange.call(this, evt);\n    };\n    return Static;\n}(ImageSource));\nexport default Static;\n//# sourceMappingURL=ImageStatic.js.map","/**\n * @module ol/source/WMSServerType\n */\n/**\n * Available server types: `'carmentaserver'`, `'geoserver'`, `'mapserver'`,\n *     `'qgis'`. These are servers that have vendor parameters beyond the WMS\n *     specification that OpenLayers can make use of.\n * @enum {string}\n */\nexport default {\n    /**\n     * HiDPI support for [Carmenta Server](https://www.carmenta.com/en/products/carmenta-server)\n     * @api\n     */\n    CARMENTA_SERV
 ER: 'carmentaserver',\n    /**\n     * HiDPI support for [GeoServer](https://geoserver.org/)\n     * @api\n     */\n    GEOSERVER: 'geoserver',\n    /**\n     * HiDPI support for [MapServer](https://mapserver.org/)\n     * @api\n     */\n    MAPSERVER: 'mapserver',\n    /**\n     * HiDPI support for [QGIS](https://qgis.org/)\n     * @api\n     */\n    QGIS: 'qgis',\n};\n//# sourceMappingURL=WMSServerType.js.map","/**\n * @module ol/source/ImageWMS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b
 ) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport { DEFAULT_WMS_VERSION } from './common.js';\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport WMSServerType from './WMSServerType.js';\nimport { appendParams } from '../uri.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { calculateSourceResolution } from '../reproj.js';\nimport { compareVersions } from '../string.js';\nimport { containsExtent, getCenter, getForViewAndSize, getHeight, getWidth, } from '../extent.js';\nimport { get as getProjection, transform } from '../proj.js';\n/**\n * @const\n * @type {import(\"../size.js\").Size}\n */\nvar GETFEATUREINFO_IMAGE_SIZE = [101, 101];\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` 
 attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"./WMSServerType.js\").default|string} [serverType] The type of\n * the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} params WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (`SRS` for WMS version < 1.3.0) will be set dyna
 mically.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or\n * higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {string} url WMS service URL.\n */\n/**\n * @classdesc\n * Source for WMS servers providing single, untiled images.\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageWMS = /** @class */ (function (_super) {\n    __extends(ImageWMS, _super);\n    /**\n     * @param {Options=} [opt_options] ImageWMS options.\n     */\n    function ImageWMS(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            attributions: options
 .attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n        }) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.url_ = options.url;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").LoadFunction}\n         */\n        _this.imageLoadFunction_ =\n            options.imageLoadFunction !== undefined\n                ? options.imageLoadFunction\n                : defaultImageLoadFunction;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.v13_ = true;\n      
   _this.updateV13_();\n        /**\n         * @private\n         * @type {import(\"./WMSServerType.js\").default|undefined}\n         */\n        _this.serverType_ = /** @type {import(\"./WMSServerType.js\").default|undefined} */ (options.serverType);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.imageSize_ = [0, 0];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n        return _this;\n    }\n    /**\n     * Return the GetFeatureInfo
  URL for the passed coordinate, resolution, and\n     * projection. Return `undefined` if the GetFeatureInfo URL cannot be\n     * constructed.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n     * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n     *     be provided. If `QUERY_LAYERS` is not provided then the layers specified\n     *     in the `LAYERS` parameter will be used. `VERSION` should not be\n     *     specified here.\n     * @return {string|undefined} GetFeatureInfo URL.\n     * @api\n     */\n    ImageWMS.prototype.getFeatureInfoUrl = function (coordinate, resolution, projection, params) {\n        if (this.url_ === undefined) {\n            return undefined;\n        }\n        var projectionObj = getProjection(projection);\n        var sourceProjectionObj = this.getProjection();\n 
        if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n            resolution = calculateSourceResolution(sourceProjectionObj, projectionObj, coordinate, resolution);\n            coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n        }\n        var extent = getForViewAndSize(coordinate, resolution, 0, GETFEATUREINFO_IMAGE_SIZE);\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetFeatureInfo',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n            'QUERY_LAYERS': this.params_['LAYERS'],\n        };\n        assign(baseParams, this.params_, params);\n        var x = Math.floor((coordinate[0] - extent[0]) / resolution);\n        var y = Math.floor((extent[3] - coordinate[1]) / resolution);\n        baseParams[this.v13_ ? 'I' : 'X'] = x;\n        baseParams[this.v13_ ? 'J' : 'Y'] = y;\n        return this.getRequestUrl_(extent, GETF
 EATUREINFO_IMAGE_SIZE, 1, sourceProjectionObj || projectionObj, baseParams);\n    };\n    /**\n     * Return the GetLegendGraphic URL, optionally optimized for the passed\n     * resolution and possibly including any passed specific parameters. Returns\n     * `undefined` if the GetLegendGraphic URL cannot be constructed.\n     *\n     * @param {number} [resolution] Resolution. If set to undefined, `SCALE`\n     *     will not be calculated and included in URL.\n     * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the\n     *     request is generated for this wms layer, else it will try to use the\n     *     configured wms layer. Default `FORMAT` is `image/png`.\n     *     `VERSION` should not be specified here.\n     * @return {string|undefined} GetLegendGraphic URL.\n     * @api\n     */\n    ImageWMS.prototype.getLegendUrl = function (resolution, params) {\n        if (this.url_ === undefined) {\n            return undefined;\n        }\n        var baseP
 arams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetLegendGraphic',\n            'FORMAT': 'image/png',\n        };\n        if (params === undefined || params['LAYER'] === undefined) {\n            var layers = this.params_.LAYERS;\n            var isSingleLayer = !Array.isArray(layers) || layers.length === 1;\n            if (!isSingleLayer) {\n                return undefined;\n            }\n            baseParams['LAYER'] = layers;\n        }\n        if (resolution !== undefined) {\n            var mpu = this.getProjection()\n                ? this.getProjection().getMetersPerUnit()\n                : 1;\n            var dpi = 25.4 / 0.28;\n            var inchesPerMeter = 39.37;\n            baseParams['SCALE'] = resolution * mpu * inchesPerMeter * dpi;\n        }\n        assign(baseParams, params);\n        return appendParams(/** @type {string} */ (this.url_), baseParams);\n    };\n    /**\n     * Get the user-p
 rovided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    ImageWMS.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../Image.js\").default} Single image.\n     */\n    ImageWMS.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        if (this.url_ === undefined) {\n            return null;\n        }\n        resolution = this.findNearestResolution(resolution);\n        if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n            pixelRatio = 1;\n        }\n        var imageResolut
 ion = resolution / pixelRatio;\n        var center = getCenter(extent);\n        var viewWidth = Math.ceil(getWidth(extent) / imageResolution);\n        var viewHeight = Math.ceil(getHeight(extent) / imageResolution);\n        var viewExtent = getForViewAndSize(center, imageResolution, 0, [\n            viewWidth,\n            viewHeight,\n        ]);\n        var requestWidth = Math.ceil((this.ratio_ * getWidth(extent)) / imageResolution);\n        var requestHeight = Math.ceil((this.ratio_ * getHeight(extent)) / imageResolution);\n        var requestExtent = getForViewAndSize(center, imageResolution, 0, [\n            requestWidth,\n            requestHeight,\n        ]);\n        var image = this.image_;\n        if (image &&\n            this.renderedRevision_ == this.getRevision() &&\n            image.getResolution() == resolution &&\n            image.getPixelRatio() == pixelRatio &&\n            containsExtent(image.getExtent(), viewExtent)) {\n            return image;\n   
      }\n        var params = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetMap',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n        };\n        assign(params, this.params_);\n        this.imageSize_[0] = Math.round(getWidth(requestExtent) / imageResolution);\n        this.imageSize_[1] = Math.round(getHeight(requestExtent) / imageResolution);\n        var url = this.getRequestUrl_(requestExtent, this.imageSize_, pixelRatio, projection, params);\n        this.image_ = new ImageWrapper(requestExtent, resolution, pixelRatio, url, this.crossOrigin_, this.imageLoadFunction_);\n        this.renderedRevision_ = this.getRevision();\n        this.image_.addEventListener(EventType.CHANGE, this.handleImageChange.bind(this));\n        return this.image_;\n    };\n    /**\n     * Return the image load function of the source.\n     * @return {import(\"../Image.js\").LoadFunction} The image load function.\n    
  * @api\n     */\n    ImageWMS.prototype.getImageLoadFunction = function () {\n        return this.imageLoadFunction_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../size.js\").Size} size Size.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string} Request URL.\n     * @private\n     */\n    ImageWMS.prototype.getRequestUrl_ = function (extent, size, pixelRatio, projection, params) {\n        assert(this.url_ !== undefined, 9); // `url` must be configured or set using `#setUrl()`\n        params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n        if (!('STYLES' in this.params_)) {\n            params['STYLES'] = '';\n        }\n        if (pixelRatio != 1) {\n            switch (this.serverType_) {\n                case WMSServerType.GEOSERVER:\n                    var dpi = (9
 0 * pixelRatio + 0.5) | 0;\n                    if ('FORMAT_OPTIONS' in params) {\n                        params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n                    }\n                    else {\n                        params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n                    }\n                    break;\n                case WMSServerType.MAPSERVER:\n                    params['MAP_RESOLUTION'] = 90 * pixelRatio;\n                    break;\n                case WMSServerType.CARMENTA_SERVER:\n                case WMSServerType.QGIS:\n                    params['DPI'] = 90 * pixelRatio;\n                    break;\n                default:\n                    assert(false, 8); // Unknown `serverType` configured\n                    break;\n            }\n        }\n        params['WIDTH'] = size[0];\n        params['HEIGHT'] = size[1];\n        var axisOrientation = projection.getAxisOrientation();\n        var bbox;\n        if (this.v13_ && axisOrientation.substr(0, 
 2) == 'ne') {\n            bbox = [extent[1], extent[0], extent[3], extent[2]];\n        }\n        else {\n            bbox = extent;\n        }\n        params['BBOX'] = bbox.join(',');\n        return appendParams(/** @type {string} */ (this.url_), params);\n    };\n    /**\n     * Return the URL used for this WMS source.\n     * @return {string|undefined} URL.\n     * @api\n     */\n    ImageWMS.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * Set the image load function of the source.\n     * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n     * @api\n     */\n    ImageWMS.prototype.setImageLoadFunction = function (imageLoadFunction) {\n        this.image_ = null;\n        this.imageLoadFunction_ = imageLoadFunction;\n        this.changed();\n    };\n    /**\n     * Set the URL to use for requests.\n     * @param {string|undefined} url URL.\n     * @api\n     */\n    ImageWMS.prototype.setUrl = function 
 (url) {\n        if (url != this.url_) {\n            this.url_ = url;\n            this.image_ = null;\n            this.changed();\n        }\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    ImageWMS.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.updateV13_();\n        this.image_ = null;\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    ImageWMS.prototype.updateV13_ = function () {\n        var version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;\n        this.v13_ = compareVersions(version, '1.3') >= 0;\n    };\n    return ImageWMS;\n}(ImageSource));\nexport default ImageWMS;\n//# sourceMappingURL=ImageWMS.js.map","/**\n * @module ol/source/OSM\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [
 ] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport XYZ from './XYZ.js';\n/**\n * The attribution containing a link to the OpenStreetMap Copyright and License\n * page.\n * @const\n * @type {string}\n * @api\n */\nexport var ATTRIBUTION = '© ' +\n    '<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap</a> ' +\n    'contributors.';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n *
  @property {null|string} [crossOrigin='anonymous'] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {number} [maxZoom=19] Max zoom.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url='https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'] URL template.\
 n * Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n/**\n * @classdesc\n * Layer source for the OpenStreetMap tile server.\n * @api\n */\nvar OSM = /** @class */ (function (_super) {\n    __extends(OSM, _super);\n    /**\n     * @param {Options=} [opt_options] Open Street Map options.\n     */\n    function OSM(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        var attributions;\n        if (options.attributions !== undefined) {\n            attributions = options.attributions;\n        }\n        else {\n            attributions = [ATTRIBUTION];\n        }\n        var crossOrigin = options.crossOrigin !== undefined ? options.crossOrigin : 'anonymous';\n        var url = options.url !== undefined\n            ? options.url\n            : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n        _this = _super.call(this, {\n            attr
 ibutions: attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            opaque: options.opaque !== undefined ? options.opaque : true,\n            maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileLoadFunction: options.tileLoadFunction,\n            url: url,\n            wrapX: options.wrapX,\n            attributionsCollapsible: false,\n        }) || this;\n        return _this;\n    }\n    return OSM;\n}(XYZ));\nexport default OSM;\n//# sourceMappingURL=OSM.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)
 ) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/BaseImage\n */\nimport Layer from './Layer.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` c
 ollection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {import(\"../source/Image.js\").default} [source] Source for this layer.\n */\n/**\n 
 * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends {Layer<import(\"../source/Image.js\").default>}\n * @api\n */\nvar BaseImageLayer = /** @class */ (function (_super) {\n    __extends(BaseImageLayer, _super);\n    /**\n     * @param {Options=} opt_options Layer options.\n     */\n    function BaseImageLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, options) || this;\n        return _this;\n    }\n    return BaseImageLayer;\n}(Layer));\nexport default BaseImageLayer;\n//# sourceMappingURL=BaseImage.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendSta
 tics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Layer\n */\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport SourceState from '../source/State.js';\nimport { abstract } from '../util.js';\n/**\n * @template {import(\"../layer/Layer.js\").default} LayerType\n */\nvar LayerRenderer = /** @class */ (function (_super) {\n    __extends(LayerRenderer, _super);\n    /**\n     * @param {LayerType} layer L
 ayer.\n     */\n    function LayerRenderer(layer) {\n        var _this = _super.call(this) || this;\n        /** @private */\n        _this.boundHandleImageChange_ = _this.handleImageChange_.bind(_this);\n        /**\n         * @protected\n         * @type {LayerType}\n         */\n        _this.layer_ = layer;\n        return _this;\n    }\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with\n     * an array of features.\n     */\n    LayerRenderer.prototype.getFeatures = function (pixel) {\n        return abstract();\n    };\n    /**\n     * Determine whether render should be called.\n     * @abstract\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    LayerRenderer.prototype.prepareFrame = function (frameState) {\n        ret
 urn abstract();\n    };\n    /**\n     * Render the layer.\n     * @abstract\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    LayerRenderer.prototype.renderFrame = function (frameState, target) {\n        return abstract();\n    };\n    /**\n     * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @param {number} zoom Zoom level.\n     * @param {import(\"../Tile.js\").default} tile Tile.\n     * @return {boolean|void} If `false`, the tile will not be considered loaded.\n     */\n    LayerRenderer.prototype.loadedTileCallback = function (tiles, zoom, tile) {\n        if (!tiles[zoom]) {\n            tiles[zoom] = {};\n        }\n        tiles[zoom][tile.tileCoord.toString()] = tile;\n        return undefined;\n    };\n    /**\n     
 * Create a function that adds loaded tiles to the tile lookup.\n     * @param {import(\"../source/Tile.js\").default} source Tile source.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection of the tiles.\n     * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @return {function(number, import(\"../TileRange.js\").default):boolean} A function that can be\n     *     called with a zoom level and a tile range to add loaded tiles to the lookup.\n     * @protected\n     */\n    LayerRenderer.prototype.createLoadedTileFinder = function (source, projection, tiles) {\n        return (\n        /**\n         * @param {number} zoom Zoom level.\n         * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n         * @return {boolean} The tile range is fully loaded.\n         * @this {LayerRenderer}\n         */\n        function (zoom, tileRange) {\n            var callback
  = this.loadedTileCallback.bind(this, tiles, zoom);\n            return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n        }.bind(this));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {Array<import(\"../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n     * @return {T|void} Callback result.\n     * @template T\n     */\n    LayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, declutteredFeatures) { };\n    /**\n     * @abstract\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableM
 ap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @return {Uint8ClampedArray|Uint8Array} The result.  If there is no data at the pixel\n     *    location, null will be returned.  If there is data, but pixel values cannot be\n     *    returned, and empty array will be returned.\n     */\n    LayerRenderer.prototype.getDataAtPixel = function (pixel, frameState, hitTolerance) {\n        return abstract();\n    };\n    /**\n     * @return {LayerType} Layer.\n     */\n    LayerRenderer.prototype.getLayer = function () {\n        return this.layer_;\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     * @abstract\n     */\n    LayerRenderer.prototype.handleFontsChanged = function () { };\n    /**\n     * Handle changes in image state.\n     * @param {import(\"../events/Event.js\").default} event Image change event.\n     * @private\n     */\n    LayerRenderer.prototyp
 e.handleImageChange_ = function (event) {\n        var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n        if (image.getState() === ImageState.LOADED) {\n            this.renderIfReadyAndVisible();\n        }\n    };\n    /**\n     * Load the image if not already loaded, and register the image change\n     * listener if needed.\n     * @param {import(\"../ImageBase.js\").default} image Image.\n     * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n     * @protected\n     */\n    LayerRenderer.prototype.loadImage = function (image) {\n        var imageState = image.getState();\n        if (imageState != ImageState.LOADED && imageState != ImageState.ERROR) {\n            image.addEventListener(EventType.CHANGE, this.boundHandleImageChange_);\n        }\n        if (imageState == ImageState.IDLE) {\n            image.load();\n            imageState = image.getState();\n        }\n        return imageState == ImageState.LOADED;\n 
    };\n    /**\n     * @protected\n     */\n    LayerRenderer.prototype.renderIfReadyAndVisible = function () {\n        var layer = this.getLayer();\n        if (layer.getVisible() && layer.getSourceState() == SourceState.READY) {\n            layer.changed();\n        }\n    };\n    return LayerRenderer;\n}(Observable));\nexport default LayerRenderer;\n//# sourceMappingURL=Layer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n
  * @module ol/renderer/canvas/Layer\n */\nimport LayerRenderer from '../Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport { apply as applyTransform, compose as composeTransform, create as createTransform, } from '../../transform.js';\nimport { createCanvasContext2D } from '../../dom.js';\nimport { getBottomLeft, getBottomRight, getTopLeft, getTopRight, } from '../../extent.js';\nimport { rotateAtOffset } from '../../render/canvas.js';\n/**\n * @abstract\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n */\nvar CanvasLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasLayerRenderer, _super);\n    /**\n     * @param {LayerType} layer Layer.\n     */\n    function CanvasLayerRenderer(layer) {\n        var _this = _super.call(this, layer) || this;\n        /**\n         * @protected\n         * @type {HTMLElement}\n         */\n        _this.container = null;\n        /**\
 n         * @protected\n         * @type {number}\n         */\n        _this.renderedResolution;\n        /**\n         * A temporary transform.  The values in this transform should only be used in a\n         * function that sets the values.\n         * @protected\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.tempTransform = createTransform();\n        /**\n         * The transform for rendered pixels to viewport CSS pixels.  This transform must\n         * be set when rendering a frame and may be used by other functions after rendering.\n         * @protected\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.pixelTransform = createTransform();\n        /**\n         * The transform for viewport CSS pixels to rendered pixels.  This transform must\n         * be set when rendering a frame and may be used by other functions after rendering.\n         * @protected\n         * @type {import(\"../../trans
 form.js\").Transform}\n         */\n        _this.inversePixelTransform = createTransform();\n        /**\n         * @type {CanvasRenderingContext2D}\n         */\n        _this.context = null;\n        /**\n         * @type {boolean}\n         */\n        _this.containerReused = false;\n        return _this;\n    }\n    /**\n     * Get a rendering container from an existing target, if compatible.\n     * @param {HTMLElement} target Potential render target.\n     * @param {string} transform CSS Transform.\n     * @param {number} opacity Opacity.\n     */\n    CanvasLayerRenderer.prototype.useContainer = function (target, transform, opacity) {\n        var layerClassName = this.getLayer().getClassName();\n        var container, context;\n        if (target &&\n            target.style.opacity === '' &&\n            target.className === layerClassName) {\n            var canvas = target.firstElementChild;\n            if (canvas instanceof HTMLCanvasElement) {\n                contex
 t = canvas.getContext('2d');\n            }\n        }\n        if (context &&\n            (context.canvas.width === 0 ||\n                context.canvas.style.transform === transform)) {\n            // Container of the previous layer renderer can be used.\n            this.container = target;\n            this.context = context;\n            this.containerReused = true;\n        }\n        else if (this.containerReused) {\n            // Previously reused container cannot be used any more.\n            this.container = null;\n            this.context = null;\n            this.containerReused = false;\n        }\n        if (!this.container) {\n            container = document.createElement('div');\n            container.className = layerClassName;\n            var style = container.style;\n            style.position = 'absolute';\n            style.width = '100%';\n            style.height = '100%';\n            context = createCanvasContext2D();\n            var canvas = context
 .canvas;\n            container.appendChild(canvas);\n            style = canvas.style;\n            style.position = 'absolute';\n            style.left = '0';\n            style.transformOrigin = 'top left';\n            this.container = container;\n            this.context = context;\n        }\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.clip = function (context, frameState, extent) {\n        var pixelRatio = frameState.pixelRatio;\n        var halfWidth = (frameState.size[0] * pixelRatio) / 2;\n        var halfHeight = (frameState.size[1] * pixelRatio) / 2;\n        var rotation = frameState.viewState.rotation;\n        var topLeft = getTopLeft(extent);\n        var topRight = getTopRight(extent);\n        var bottomRight = getBo
 ttomRight(extent);\n        var bottomLeft = getBottomLeft(extent);\n        applyTransform(frameState.coordinateToPixelTransform, topLeft);\n        applyTransform(frameState.coordinateToPixelTransform, topRight);\n        applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n        applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n        context.save();\n        rotateAtOffset(context, -rotation, halfWidth, halfHeight);\n        context.beginPath();\n        context.moveTo(topLeft[0] * pixelRatio, topLeft[1] * pixelRatio);\n        context.lineTo(topRight[0] * pixelRatio, topRight[1] * pixelRatio);\n        context.lineTo(bottomRight[0] * pixelRatio, bottomRight[1] * pixelRatio);\n        context.lineTo(bottomLeft[0] * pixelRatio, bottomLeft[1] * pixelRatio);\n        context.clip();\n        rotateAtOffset(context, rotation, halfWidth, halfHeight);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import
 (\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.clipUnrotated = function (context, frameState, extent) {\n        var topLeft = getTopLeft(extent);\n        var topRight = getTopRight(extent);\n        var bottomRight = getBottomRight(extent);\n        var bottomLeft = getBottomLeft(extent);\n        applyTransform(frameState.coordinateToPixelTransform, topLeft);\n        applyTransform(frameState.coordinateToPixelTransform, topRight);\n        applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n        applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n        var inverted = this.inversePixelTransform;\n        applyTransform(inverted, topLeft);\n        applyTransform(inverted, topRight);\n        applyTransform(inverted, bottomRight);\n        applyTransform(inverted, bottomLeft);\n        context.
 save();\n        context.beginPath();\n        context.moveTo(Math.round(topLeft[0]), Math.round(topLeft[1]));\n        context.lineTo(Math.round(topRight[0]), Math.round(topRight[1]));\n        context.lineTo(Math.round(bottomRight[0]), Math.round(bottomRight[1]));\n        context.lineTo(Math.round(bottomLeft[0]), Math.round(bottomLeft[1]));\n        context.clip();\n    };\n    /**\n     * @param {import(\"../../render/EventType.js\").default} type Event type.\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    CanvasLayerRenderer.prototype.dispatchRenderEvent_ = function (type, context, frameState) {\n        var layer = this.getLayer();\n        if (layer.hasListener(type)) {\n            var event_1 = new RenderEvent(type, this.inversePixelTransform, frameState, context);\n            layer.dispatchEvent(event_1);\n        }\n    };\n    /**\n     * @para
 m {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.preRender = function (context, frameState) {\n        this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.postRender = function (context, frameState) {\n        this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n    };\n    /**\n     * Creates a transform for rendering to an element that will be rotated after rendering.\n     * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n     * @param {number} resolution Resolution.\n     * @param {number} rotation Rotation.\n     * @param {number} pixelRatio Pixel 
 ratio.\n     * @param {number} width Width of the rendered element (in pixels).\n     * @param {number} height Height of the rendered element (in pixels).\n     * @param {number} offsetX Offset on the x-axis in view coordinates.\n     * @protected\n     * @return {!import(\"../../transform.js\").Transform} Transform.\n     */\n    CanvasLayerRenderer.prototype.getRenderTransform = function (center, resolution, rotation, pixelRatio, width, height, offsetX) {\n        var dx1 = width / 2;\n        var dy1 = height / 2;\n        var sx = pixelRatio / resolution;\n        var sy = -sx;\n        var dx2 = -center[0] + offsetX;\n        var dy2 = -center[1];\n        return composeTransform(this.tempTransform, dx1, dy1, sx, sy, -rotation, dx2, dy2);\n    };\n    /**\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @return 
 {Uint8ClampedArray|Uint8Array} The result.  If there is no data at the pixel\n     *    location, null will be returned.  If there is data, but pixel values cannot be\n     *    returned, and empty array will be returned.\n     */\n    CanvasLayerRenderer.prototype.getDataAtPixel = function (pixel, frameState, hitTolerance) {\n        var renderPixel = applyTransform(this.inversePixelTransform, pixel.slice());\n        var context = this.context;\n        var data;\n        try {\n            var x = Math.round(renderPixel[0]);\n            var y = Math.round(renderPixel[1]);\n            var newCanvas = document.createElement('canvas');\n            var newContext = newCanvas.getContext('2d');\n            newCanvas.width = 1;\n            newCanvas.height = 1;\n            newContext.clearRect(0, 0, 1, 1);\n            newContext.drawImage(context.canvas, x, y, 1, 1, 0, 0, 1, 1);\n            data = newContext.getImageData(0, 0, 1, 1).data;\n        }\n        catch (err) {\n     
        if (err.name === 'SecurityError') {\n                // tainted canvas, we assume there is data at the given pixel (although there might not be)\n                return new Uint8Array();\n            }\n            return data;\n        }\n        if (data[3] === 0) {\n            return null;\n        }\n        return data;\n    };\n    return CanvasLayerRenderer;\n}(LayerRenderer));\nexport default CanvasLayerRenderer;\n//# sourceMappingURL=Layer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Obj
 ect.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/ImageLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport ViewHint from '../../ViewHint.js';\nimport { ENABLE_RASTER_REPROJECTION } from '../../reproj/common.js';\nimport { assign } from '../../obj.js';\nimport { compose as composeTransform, makeInverse } from '../../transform.js';\nimport { containsExtent, intersects } from '../../extent.js';\nimport { createTransformString } from '../../render/canvas.js';\nimport { fromUserExtent } from '../../proj.js';\nimport { getIntersection, isEmpty } from '../../extent.js';\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nvar CanvasImageLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasImageLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/Image.js\").default} imageLayer Image layer.\n     */\n    function CanvasImageLayerRenderer(imageLayer) {\n        var _
 this = _super.call(this, imageLayer) || this;\n        /**\n         * @protected\n         * @type {?import(\"../../ImageBase.js\").default}\n         */\n        _this.image_ = null;\n        return _this;\n    }\n    /**\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     */\n    CanvasImageLayerRenderer.prototype.getImage = function () {\n        return !this.image_ ? null : this.image_.getImage();\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasImageLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var viewResolution = viewState.resolution;\n        var imageSource = this.get
 Layer().getSource();\n        var hints = frameState.viewHints;\n        var renderedExtent = frameState.extent;\n        if (layerState.extent !== undefined) {\n            renderedExtent = getIntersection(renderedExtent, fromUserExtent(layerState.extent, viewState.projection));\n        }\n        if (!hints[ViewHint.ANIMATING] &&\n            !hints[ViewHint.INTERACTING] &&\n            !isEmpty(renderedExtent)) {\n            if (imageSource) {\n                var projection = viewState.projection;\n                if (!ENABLE_RASTER_REPROJECTION) {\n                    var sourceProjection = imageSource.getProjection();\n                    if (sourceProjection) {\n                        projection = sourceProjection;\n                    }\n                }\n                var image = imageSource.getImage(renderedExtent, viewResolution, pixelRatio, projection);\n                if (image && this.loadImage(image)) {\n                    this.image_ = image;\n               
  }\n            }\n            else {\n                this.image_ = null;\n            }\n        }\n        return !!this.image_;\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasImageLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var image = this.image_;\n        var imageExtent = image.getExtent();\n        var imageResolution = image.getResolution();\n        var imagePixelRatio = image.getPixelRatio();\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var viewCenter = viewState.center;\n        var viewResolution = viewState.resolution;\n        var size = frameState.size;\n        var
  scale = (pixelRatio * imageResolution) / (viewResolution * imagePixelRatio);\n        var width = Math.round(size[0] * pixelRatio);\n        var height = Math.round(size[1] * pixelRatio);\n        var rotation = viewState.rotation;\n        if (rotation) {\n            var size_1 = Math.round(Math.sqrt(width * width + height * height));\n            width = size_1;\n            height = size_1;\n        }\n        // set forward and inverse pixel transforms\n        composeTransform(this.pixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / pixelRatio, 1 / pixelRatio, rotation, -width / 2, -height / 2);\n        makeInverse(this.inversePixelTransform, this.pixelTransform);\n        var canvasTransform = createTransformString(this.pixelTransform);\n        this.useContainer(target, canvasTransform, layerState.opacity);\n        var context = this.context;\n        var canvas = context.canvas;\n        if (canvas.width != width || canvas.height != height) {\n           
  canvas.width = width;\n            canvas.height = height;\n        }\n        else if (!this.containerReused) {\n            context.clearRect(0, 0, width, height);\n        }\n        // clipped rendering if layer extent is set\n        var clipped = false;\n        if (layerState.extent) {\n            var layerExtent = fromUserExtent(layerState.extent, viewState.projection);\n            clipped =\n                !containsExtent(layerExtent, frameState.extent) &&\n                    intersects(layerExtent, frameState.extent);\n            if (clipped) {\n                this.clipUnrotated(context, frameState, layerExtent);\n            }\n        }\n        var img = image.getImage();\n        var transform = composeTransform(this.tempTransform, width / 2, height / 2, scale, scale, 0, (imagePixelRatio * (imageExtent[0] - viewCenter[0])) / imageResolution, (imagePixelRatio * (viewCenter[1] - imageExtent[3])) / imageResolution);\n        this.renderedResolution = (imageResoluti
 on * pixelRatio) / imagePixelRatio;\n        var dx = transform[4];\n        var dy = transform[5];\n        var dw = img.width * transform[0];\n        var dh = img.height * transform[3];\n        assign(context, this.getLayer().getSource().getContextOptions());\n        this.preRender(context, frameState);\n        if (dw >= 0.5 && dh >= 0.5) {\n            var opacity = layerState.opacity;\n            var previousAlpha = void 0;\n            if (opacity !== 1) {\n                previousAlpha = this.context.globalAlpha;\n                this.context.globalAlpha = opacity;\n            }\n            this.context.drawImage(img, 0, 0, +img.width, +img.height, Math.round(dx), Math.round(dy), Math.round(dw), Math.round(dh));\n            if (opacity !== 1) {\n                this.context.globalAlpha = previousAlpha;\n            }\n        }\n        this.postRender(context, frameState);\n        if (clipped) {\n            context.restore();\n        }\n        if (canvasTransform 
 !== canvas.style.transform) {\n            canvas.style.transform = canvasTransform;\n        }\n        return this.container;\n    };\n    return CanvasImageLayerRenderer;\n}(CanvasLayerRenderer));\nexport default CanvasImageLayerRenderer;\n//# sourceMappingURL=ImageLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Image\n */\nimport BaseImageLayer from './BaseImage.js';\nimport CanvasImageLayerRenderer
  from '../renderer/canvas/ImageLayer.js';\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @api\n */\nvar ImageLayer = /** @class */ (function (_super) {\n    __extends(ImageLayer, _super);\n    /**\n     * @param {import(\"./BaseImage.js\").Options=} opt_options Layer options.\n     */\n    function ImageLayer(opt_options) {\n        return _super.call(this, opt_options) || this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     */\n    ImageLayer.prototype.createRenderer = function () {\n        return new CanvasImageLayerRenderer(this);\n    };\n    return ImageLayer;\n}(BaseImag
 eLayer));\nexport default ImageLayer;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/layer/TileProperty\n */\n/**\n * @enum {string}\n */\nexport default {\n    PRELOAD: 'preload',\n    USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError',\n};\n//# sourceMappingURL=TileProperty.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/BaseTile\n */\nimport Layer from './Layer.js';\nimport TileProperty from './
 TileProperty.js';\nimport { assign } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be vis
 ible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {import(\"../source/Tile.js\").default} [source] Source for this layer.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * 
 organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends {Layer<import(\"../source/Tile.js\").default>}\n * @api\n */\nvar BaseTileLayer = /** @class */ (function (_super) {\n    __extends(BaseTileLayer, _super);\n    /**\n     * @param {Options=} opt_options Tile layer options.\n     */\n    function BaseTileLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({}, options);\n        delete baseOptions.preload;\n        delete baseOptions.useInterimTilesOnError;\n        _this = _super.call(this, baseOptions) || this;\n        _this.setPreload(options.preload !== undefined ? options.preload : 0);\n        _this.setUseInterimTilesOnError(options.
 useInterimTilesOnError !== undefined\n            ? options.useInterimTilesOnError\n            : true);\n        return _this;\n    }\n    /**\n     * Return the level as number to which we will preload tiles up to.\n     * @return {number} The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.getPreload = function () {\n        return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n    };\n    /**\n     * Set the level as number to which we will preload tiles up to.\n     * @param {number} preload The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.setPreload = function (preload) {\n        this.set(TileProperty.PRELOAD, preload);\n    };\n    /**\n     * Whether we use interim tiles on error.\n     * @return {boolean} Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.getUseInterimTilesOnError = function () {\n        ret
 urn /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));\n    };\n    /**\n     * Set whether we use interim tiles on error.\n     * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.setUseInterimTilesOnError = function (useInterimTilesOnError) {\n        this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n    };\n    return BaseTileLayer;\n}(Layer));\nexport default BaseTileLayer;\n//# sourceMappingURL=BaseTile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b
 );\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport { apply as applyTransform, compose as composeTransform, makeInverse, } from '../../transform.js';\nimport { assign } from '../../obj.js';\nimport { createEmpty, equals, getIntersection, getTopLeft, } from '../../extent.js';\nimport { createTransformString } from '../../render/canvas.js';\nimport { fromUserExtent } from '../../proj.js';\nimport { getUid } from '../../util.js';\nimport { numberSafeCompareFunction } from '../../array.js';\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n */\nvar CanvasTileLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasTileLayerRenderer, _super);\n    /**\n   
   * @param {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default} tileLayer Tile layer.\n     */\n    function CanvasTileLayerRenderer(tileLayer) {\n        var _this = _super.call(this, tileLayer) || this;\n        /**\n         * Rendered extent has changed since the previous `renderFrame()` call\n         * @type {boolean}\n         */\n        _this.extentChanged = true;\n        /**\n         * @private\n         * @type {?import(\"../../extent.js\").Extent}\n         */\n        _this.renderedExtent_ = null;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.renderedPixelRatio;\n        /**\n         * @protected\n         * @type {import(\"../../proj/Projection.js\").default}\n         */\n        _this.renderedProjection = null;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.renderedRevision;\n        /**\n         * @protected\n         * @type {!Array<import
 (\"../../Tile.js\").default>}\n         */\n        _this.renderedTiles = [];\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.newTiles_ = false;\n        /**\n         * @protected\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.tmpExtent = createEmpty();\n        /**\n         * @private\n         * @type {import(\"../../TileRange.js\").default}\n         */\n        _this.tmpTileRange_ = new TileRange(0, 0, 0, 0);\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {import(\"../../Tile.js\").default} tile Tile.\n     * @return {boolean} Tile is drawable.\n     */\n    CanvasTileLayerRenderer.prototype.isDrawableTile = function (tile) {\n        var tileLayer = this.getLayer();\n        var tileState = tile.getState();\n        var useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n        return (tileState == TileState.LOADED ||\n            tileState == TileState.EMPTY 
 ||\n            (tileState == TileState.ERROR && !useInterimTilesOnError));\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {!import(\"../../Tile.js\").default} Tile.\n     */\n    CanvasTileLayerRenderer.prototype.getTile = function (z, x, y, frameState) {\n        var pixelRatio = frameState.pixelRatio;\n        var projection = frameState.viewState.projection;\n        var tileLayer = this.getLayer();\n        var tileSource = tileLayer.getSource();\n        var tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n        if (tile.getState() == TileState.ERROR) {\n            if (!tileLayer.getUseInterimTilesOnError()) {\n                // When useInterimTilesOnError is false, we consider the error tile as loaded.\n                tile.setState(TileState.LOADED);\n    
         }\n            else if (tileLayer.getPreload() > 0) {\n                // Preloaded tiles for lower resolutions might have finished loading.\n                this.newTiles_ = true;\n            }\n        }\n        if (!this.isDrawableTile(tile)) {\n            tile = tile.getInterimTile();\n        }\n        return tile;\n    };\n    /**\n     * @param {Object<number, Object<string, import(\"../../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @param {number} zoom Zoom level.\n     * @param {import(\"../../Tile.js\").default} tile Tile.\n     * @return {boolean|void} If `false`, the tile will not be considered loaded.\n     */\n    CanvasTileLayerRenderer.prototype.loadedTileCallback = function (tiles, zoom, tile) {\n        if (this.isDrawableTile(tile)) {\n            return _super.prototype.loadedTileCallback.call(this, tiles, zoom, tile);\n        }\n        return false;\n    };\n    /**\n     * Determine whether render should be called.\n 
     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasTileLayerRenderer.prototype.prepareFrame = function (frameState) {\n        return !!this.getLayer().getSource();\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasTileLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        var viewResolution = viewState.resolution;\n        var viewCenter = viewState.center;\n        var rotation = viewState.rotation;\n        var pixelRatio = frameState.pixelRatio;\n  
       var tileLayer = this.getLayer();\n        var tileSource = tileLayer.getSource();\n        var sourceRevision = tileSource.getRevision();\n        var tileGrid = tileSource.getTileGridForProjection(projection);\n        var z = tileGrid.getZForResolution(viewResolution, tileSource.zDirection);\n        var tileResolution = tileGrid.getResolution(z);\n        var extent = frameState.extent;\n        var layerExtent = layerState.extent && fromUserExtent(layerState.extent, projection);\n        if (layerExtent) {\n            extent = getIntersection(extent, fromUserExtent(layerState.extent, projection));\n        }\n        var tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);\n        // desired dimensions of the canvas in pixels\n        var width = Math.round(frameState.size[0] * tilePixelRatio);\n        var height = Math.round(frameState.size[1] * tilePixelRatio);\n        if (rotation) {\n            var size = Math.round(Math.sqrt(width * width + height * height)
 );\n            width = size;\n            height = size;\n        }\n        var dx = (tileResolution * width) / 2 / tilePixelRatio;\n        var dy = (tileResolution * height) / 2 / tilePixelRatio;\n        var canvasExtent = [\n            viewCenter[0] - dx,\n            viewCenter[1] - dy,\n            viewCenter[0] + dx,\n            viewCenter[1] + dy,\n        ];\n        var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n        /**\n         * @type {Object<number, Object<string, import(\"../../Tile.js\").default>>}\n         */\n        var tilesToDrawByZ = {};\n        tilesToDrawByZ[z] = {};\n        var findLoadedTiles = this.createLoadedTileFinder(tileSource, projection, tilesToDrawByZ);\n        var tmpExtent = this.tmpExtent;\n        var tmpTileRange = this.tmpTileRange_;\n        this.newTiles_ = false;\n        for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {\n            for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {\n             
    var tile = this.getTile(z, x, y, frameState);\n                if (this.isDrawableTile(tile)) {\n                    var uid = getUid(this);\n                    if (tile.getState() == TileState.LOADED) {\n                        tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n                        var inTransition = tile.inTransition(uid);\n                        if (!this.newTiles_ &&\n                            (inTransition || this.renderedTiles.indexOf(tile) === -1)) {\n                            this.newTiles_ = true;\n                        }\n                    }\n                    if (tile.getAlpha(uid, frameState.time) === 1) {\n                        // don't look for alt tiles if alpha is 1\n                        continue;\n                    }\n                }\n                var childTileRange = tileGrid.getTileCoordChildTileRange(tile.tileCoord, tmpTileRange, tmpExtent);\n                var covered = false;\n                if (childTileRange
 ) {\n                    covered = findLoadedTiles(z + 1, childTileRange);\n                }\n                if (!covered) {\n                    tileGrid.forEachTileCoordParentTileRange(tile.tileCoord, findLoadedTiles, tmpTileRange, tmpExtent);\n                }\n            }\n        }\n        var canvasScale = tileResolution / viewResolution;\n        // set forward and inverse pixel transforms\n        composeTransform(this.pixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / tilePixelRatio, 1 / tilePixelRatio, rotation, -width / 2, -height / 2);\n        var canvasTransform = createTransformString(this.pixelTransform);\n        this.useContainer(target, canvasTransform, layerState.opacity);\n        var context = this.context;\n        var canvas = context.canvas;\n        makeInverse(this.inversePixelTransform, this.pixelTransform);\n        // set scale transform for calculating tile positions on the canvas\n        composeTransform(this.tempTransform, wid
 th / 2, height / 2, canvasScale, canvasScale, 0, -width / 2, -height / 2);\n        if (canvas.width != width || canvas.height != height) {\n            canvas.width = width;\n            canvas.height = height;\n        }\n        else if (!this.containerReused) {\n            context.clearRect(0, 0, width, height);\n        }\n        if (layerExtent) {\n            this.clipUnrotated(context, frameState, layerExtent);\n        }\n        assign(context, tileSource.getContextOptions());\n        this.preRender(context, frameState);\n        this.renderedTiles.length = 0;\n        /** @type {Array<number>} */\n        var zs = Object.keys(tilesToDrawByZ).map(Number);\n        zs.sort(numberSafeCompareFunction);\n        var clips, clipZs, currentClip;\n        if (layerState.opacity === 1 &&\n            (!this.containerReused ||\n                tileSource.getOpaque(frameState.viewState.projection))) {\n            zs = zs.reverse();\n        }\n        else {\n            clips =
  [];\n            clipZs = [];\n        }\n        for (var i = zs.length - 1; i >= 0; --i) {\n            var currentZ = zs[i];\n            var currentTilePixelSize = tileSource.getTilePixelSize(currentZ, pixelRatio, projection);\n            var currentResolution = tileGrid.getResolution(currentZ);\n            var currentScale = currentResolution / tileResolution;\n            var dx_1 = currentTilePixelSize[0] * currentScale * canvasScale;\n            var dy_1 = currentTilePixelSize[1] * currentScale * canvasScale;\n            var originTileCoord = tileGrid.getTileCoordForCoordAndZ(getTopLeft(canvasExtent), currentZ);\n            var originTileExtent = tileGrid.getTileCoordExtent(originTileCoord);\n            var origin_1 = applyTransform(this.tempTransform, [\n                (tilePixelRatio * (originTileExtent[0] - canvasExtent[0])) /\n                    tileResolution,\n                (tilePixelRatio * (canvasExtent[3] - originTileExtent[3])) /\n                    til
 eResolution,\n            ]);\n            var tileGutter = tilePixelRatio * tileSource.getGutterForProjection(projection);\n            var tilesToDraw = tilesToDrawByZ[currentZ];\n            for (var tileCoordKey in tilesToDraw) {\n                var tile = /** @type {import(\"../../ImageTile.js\").default} */ (tilesToDraw[tileCoordKey]);\n                var tileCoord = tile.tileCoord;\n                // Calculate integer positions and sizes so that tiles align\n                var floatX = origin_1[0] - (originTileCoord[1] - tileCoord[1]) * dx_1;\n                var nextX = Math.round(floatX + dx_1);\n                var floatY = origin_1[1] - (originTileCoord[2] - tileCoord[2]) * dy_1;\n                var nextY = Math.round(floatY + dy_1);\n                var x = Math.round(floatX);\n                var y = Math.round(floatY);\n                var w = nextX - x;\n                var h = nextY - y;\n                var transition = z === currentZ;\n                var inTr
 ansition = transition && tile.getAlpha(getUid(this), frameState.time) !== 1;\n                if (!inTransition) {\n                    if (clips) {\n                        // Clip mask for regions in this tile that already filled by a higher z tile\n                        context.save();\n                        currentClip = [x, y, x + w, y, x + w, y + h, x, y + h];\n                        for (var i_1 = 0, ii = clips.length; i_1 < ii; ++i_1) {\n                            if (z !== currentZ && currentZ < clipZs[i_1]) {\n                                var clip = clips[i_1];\n                                context.beginPath();\n                                // counter-clockwise (outer ring) for current tile\n                                context.moveTo(currentClip[0], currentClip[1]);\n                                context.lineTo(currentClip[2], currentClip[3]);\n                                context.lineTo(currentClip[4], currentClip[5]);\n                            
     context.lineTo(currentClip[6], currentClip[7]);\n                                // clockwise (inner ring) for higher z tile\n                                context.moveTo(clip[6], clip[7]);\n                                context.lineTo(clip[4], clip[5]);\n                                context.lineTo(clip[2], clip[3]);\n                                context.lineTo(clip[0], clip[1]);\n                                context.clip();\n                            }\n                        }\n                        clips.push(currentClip);\n                        clipZs.push(currentZ);\n                    }\n                    else {\n                        context.clearRect(x, y, w, h);\n                    }\n                }\n                this.drawTileImage(tile, frameState, x, y, w, h, tileGutter, transition, layerState.opacity);\n                if (clips && !inTransition) {\n                    context.restore();\n                }\n                this.rendere
 dTiles.push(tile);\n                this.updateUsedTiles(frameState.usedTiles, tileSource, tile);\n            }\n        }\n        this.renderedRevision = sourceRevision;\n        this.renderedResolution = tileResolution;\n        this.extentChanged =\n            !this.renderedExtent_ || !equals(this.renderedExtent_, canvasExtent);\n        this.renderedExtent_ = canvasExtent;\n        this.renderedPixelRatio = pixelRatio;\n        this.renderedProjection = projection;\n        this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio, projection, extent, z, tileLayer.getPreload());\n        this.scheduleExpireCache(frameState, tileSource);\n        this.postRender(context, frameState);\n        if (layerState.extent) {\n            context.restore();\n        }\n        if (canvasTransform !== canvas.style.transform) {\n            canvas.style.transform = canvasTransform;\n        }\n        return this.container;\n    };\n    /**\n     * @param {import(\"../../ImageT
 ile.js\").default} tile Tile.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} x Left of the tile.\n     * @param {number} y Top of the tile.\n     * @param {number} w Width of the tile.\n     * @param {number} h Height of the tile.\n     * @param {number} gutter Tile gutter.\n     * @param {boolean} transition Apply an alpha transition.\n     * @param {number} opacity Opacity.\n     */\n    CanvasTileLayerRenderer.prototype.drawTileImage = function (tile, frameState, x, y, w, h, gutter, transition, opacity) {\n        var image = this.getTileImage(tile);\n        if (!image) {\n            return;\n        }\n        var uid = getUid(this);\n        var tileAlpha = transition ? tile.getAlpha(uid, frameState.time) : 1;\n        var alpha = opacity * tileAlpha;\n        var alphaChanged = alpha !== this.context.globalAlpha;\n        if (alphaChanged) {\n            this.context.save();\n            this.context.globalAlpha 
 = alpha;\n        }\n        this.context.drawImage(image, gutter, gutter, image.width - 2 * gutter, image.height - 2 * gutter, x, y, w, h);\n        if (alphaChanged) {\n            this.context.restore();\n        }\n        if (tileAlpha !== 1) {\n            frameState.animate = true;\n        }\n        else if (transition) {\n            tile.endTransition(uid);\n        }\n    };\n    /**\n     * @return {HTMLCanvasElement} Image\n     */\n    CanvasTileLayerRenderer.prototype.getImage = function () {\n        var context = this.context;\n        return context ? context.canvas : null;\n    };\n    /**\n     * Get the image from a tile.\n     * @param {import(\"../../ImageTile.js\").default} tile Tile.\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.getTileImage = function (tile) {\n        return tile.getImage();\n    };\n    /**\n     * @param {import(\"../../PluggableMap.js\").F
 rameState} frameState Frame state.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.scheduleExpireCache = function (frameState, tileSource) {\n        if (tileSource.canExpireCache()) {\n            /**\n             * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n             * @param {import(\"../../PluggableMap.js\").default} map Map.\n             * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n             */\n            var postRenderFunction = function (tileSource, map, frameState) {\n                var tileSourceKey = getUid(tileSource);\n                if (tileSourceKey in frameState.usedTiles) {\n                    tileSource.expireCache(frameState.viewState.projection, frameState.usedTiles[tileSourceKey]);\n                }\n            }.bind(null, tileSource);\n            frameState.postRenderFunctions.pu
 sh(\n            /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction));\n        }\n    };\n    /**\n     * @param {!Object<string, !Object<string, boolean>>} usedTiles Used tiles.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @param {import('../../Tile.js').default} tile Tile.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.updateUsedTiles = function (usedTiles, tileSource, tile) {\n        // FIXME should we use tilesToDrawByZ instead?\n        var tileSourceKey = getUid(tileSource);\n        if (!(tileSourceKey in usedTiles)) {\n            usedTiles[tileSourceKey] = {};\n        }\n        usedTiles[tileSourceKey][tile.getKey()] = true;\n    };\n    /**\n     * Manage tile pyramid.\n     * This function performs a number of functions related to the tiles at the\n     * current zoom and lower zoom levels:\n     * - registers idle tiles in frameState.wantedTiles so that they are not\
 n     *   discarded by the tile queue\n     * - enqueues missing tiles\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n     * @param {import(\"../../extent.js\").Extent} extent Extent.\n     * @param {number} currentZ Current Z.\n     * @param {number} preload Load low resolution tiles up to 'preload' levels.\n     * @param {function(import(\"../../Tile.js\").default)=} opt_tileCallback Tile callback.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.manageTilePyramid = function (frameState, tileSource, tileGrid, pixelRatio, projection, extent, currentZ, preload, opt_tileCallback) {\n        var tileSourceKey = getUid(tileSource);\n  
       if (!(tileSourceKey in frameState.wantedTiles)) {\n            frameState.wantedTiles[tileSourceKey] = {};\n        }\n        var wantedTiles = frameState.wantedTiles[tileSourceKey];\n        var tileQueue = frameState.tileQueue;\n        var minZoom = tileGrid.getMinZoom();\n        var tileCount = 0;\n        var tile, tileRange, tileResolution, x, y, z;\n        for (z = minZoom; z <= currentZ; ++z) {\n            tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);\n            tileResolution = tileGrid.getResolution(z);\n            for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n                for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n                    if (currentZ - z <= preload) {\n                        ++tileCount;\n                        tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n                        if (tile.getState() == TileState.IDLE) {\n                            wantedTiles[tile.getKey()] = true;\n
                             if (!tileQueue.isKeyQueued(tile.getKey())) {\n                                tileQueue.enqueue([\n                                    tile,\n                                    tileSourceKey,\n                                    tileGrid.getTileCoordCenter(tile.tileCoord),\n                                    tileResolution,\n                                ]);\n                            }\n                        }\n                        if (opt_tileCallback !== undefined) {\n                            opt_tileCallback(tile);\n                        }\n                    }\n                    else {\n                        tileSource.useTile(z, x, y, projection);\n                    }\n                }\n            }\n        }\n        tileSource.updateCacheSize(tileCount, projection);\n    };\n    return CanvasTileLayerRenderer;\n}(CanvasLayerRenderer));\n/**\n * @function\n * @return {import(\"../../layer/Tile.js\").default|import(\"../../
 layer/VectorTile.js\").default}\n */\nCanvasTileLayerRenderer.prototype.getLayer;\nexport default CanvasTileLayerRenderer;\n//# sourceMappingURL=TileLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Tile\n */\nimport BaseTileLayer from './BaseTile.js';\nimport CanvasTileLayerRenderer from '../renderer/canvas/TileLayer.js';\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images i
 n grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @api\n */\nvar TileLayer = /** @class */ (function (_super) {\n    __extends(TileLayer, _super);\n    /**\n     * @param {import(\"./BaseTile.js\").Options=} opt_options Tile layer options.\n     */\n    function TileLayer(opt_options) {\n        return _super.call(this, opt_options) || this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     * @protected\n     */\n    TileLayer.prototype.createRenderer = function () {\n        return new CanvasTileLayerRenderer(this);\n    };\n    return TileLayer;\n}(BaseTileLayer));\nexport default TileLayer;\n//# sourceMappingURL=Tile
 .js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Raster\n */\nimport Disposable from '../Disposable.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport ImageCanvas from '../ImageCanvas.js';\nimport ImageLayer from '../layer/Image.js';\nimport ImageSource from './Image.js';\nimport Source from './Source.js';\nimport SourceState from './State.js';\nimport Tile
 Layer from '../layer/Tile.js';\nimport TileQueue from '../TileQueue.js';\nimport TileSource from './Tile.js';\nimport { assign } from '../obj.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { create as createTransform } from '../transform.js';\nimport { equals, getCenter, getHeight, getWidth } from '../extent.js';\nvar hasImageData = true;\ntry {\n    new ImageData(10, 10);\n}\ncatch (_) {\n    hasImageData = false;\n}\nvar context = document.createElement('canvas').getContext('2d');\n/**\n * @param {Uint8ClampedArray} data Image data.\n * @param {number} width Number of columns.\n * @param {number} height Number of rows.\n * @return {ImageData} Image data.\n */\nexport function newImageData(data, width, height) {\n    if (hasImageData) {\n        return new ImageData(data, width, height);\n    }\n    else {\n        var imageData = context.createImageData(width, height);\n        imageData.data.set(data);\n        return imageData;\n    }\n}\n/* istanbul ignore nex
 t */\n/**\n * Create a function for running operations.  This function is serialized for\n * use in a worker.\n * @param {function(Array, Object):*} operation The operation.\n * @return {function(Object):ArrayBuffer} A function that takes an object with\n * buffers, meta, imageOps, width, and height properties and returns an array\n * buffer.\n */\nfunction createMinion(operation) {\n    var workerHasImageData = true;\n    try {\n        new ImageData(10, 10);\n    }\n    catch (_) {\n        workerHasImageData = false;\n    }\n    function newWorkerImageData(data, width, height) {\n        if (workerHasImageData) {\n            return new ImageData(data, width, height);\n        }\n        else {\n            return { data: data, width: width, height: height };\n        }\n    }\n    return function (data) {\n        // bracket notation for minification support\n        var buffers = data['buffers'];\n        var meta = data['meta'];\n        var imageOps = data['imageOps'];\n     
    var width = data['width'];\n        var height = data['height'];\n        var numBuffers = buffers.length;\n        var numBytes = buffers[0].byteLength;\n        var output, b;\n        if (imageOps) {\n            var images = new Array(numBuffers);\n            for (b = 0; b < numBuffers; ++b) {\n                images[b] = newWorkerImageData(new Uint8ClampedArray(buffers[b]), width, height);\n            }\n            output = operation(images, meta).data;\n        }\n        else {\n            output = new Uint8ClampedArray(numBytes);\n            var arrays = new Array(numBuffers);\n            var pixels = new Array(numBuffers);\n            for (b = 0; b < numBuffers; ++b) {\n                arrays[b] = new Uint8ClampedArray(buffers[b]);\n                pixels[b] = [0, 0, 0, 0];\n            }\n            for (var i = 0; i < numBytes; i += 4) {\n                for (var j = 0; j < numBuffers; ++j) {\n                    var array = arrays[j];\n                    pixe
 ls[j][0] = array[i];\n                    pixels[j][1] = array[i + 1];\n                    pixels[j][2] = array[i + 2];\n                    pixels[j][3] = array[i + 3];\n                }\n                var pixel = operation(pixels, meta);\n                output[i] = pixel[0];\n                output[i + 1] = pixel[1];\n                output[i + 2] = pixel[2];\n                output[i + 3] = pixel[3];\n            }\n        }\n        return output.buffer;\n    };\n}\n/**\n * Create a worker for running operations.\n * @param {Object} config Configuration.\n * @param {function(MessageEvent): void} onMessage Called with a message event.\n * @return {Worker} The worker.\n */\nfunction createWorker(config, onMessage) {\n    var lib = Object.keys(config.lib || {}).map(function (name) {\n        return 'var ' + name + ' = ' + config.lib[name].toString() + ';';\n    });\n    var lines = lib.concat([\n        'var __minion__ = (' + createMinion.toString() + ')(',\n        config.op
 eration.toString(),\n        ');',\n        'self.addEventListener(\"message\", function(event) {',\n        '  var buffer = __minion__(event.data);',\n        '  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);',\n        '});',\n    ]);\n    var blob = new Blob(lines, { type: 'text/javascript' });\n    var source = URL.createObjectURL(blob);\n    var worker = new Worker(source);\n    worker.addEventListener('message', onMessage);\n    return worker;\n}\n/**\n * @typedef {Object} FauxMessageEvent\n * @property {Object} data Message data.\n */\n/**\n * Create a faux worker for running operations.\n * @param {ProcessorOptions} config Configuration.\n * @param {function(FauxMessageEvent): void} onMessage Called with a message event.\n * @return {Object} The faux worker.\n */\nfunction createFauxWorker(config, onMessage) {\n    var minion = createMinion(config.operation);\n    var terminated = false;\n    return {\n        postMessage: function (data) {\n           
  setTimeout(function () {\n                if (terminated) {\n                    return;\n                }\n                onMessage({ data: { buffer: minion(data), meta: data['meta'] } });\n            }, 0);\n        },\n        terminate: function () {\n            terminated = true;\n        },\n    };\n}\n/**\n * @typedef {Object} ProcessorOptions\n * @property {number} threads Number of workers to spawn.\n * @property {function(Array, Object):*} operation The operation.\n * @property {Object} [lib] Functions that will be made available to operations run in a worker.\n * @property {number} queue The number of queued jobs to allow.\n * @property {boolean} [imageOps=false] Pass all the image data to the operation instead of a single pixel.\n */\n/**\n * @classdesc\n * A processor runs pixel or image operations in workers.\n */\nvar Processor = /** @class */ (function (_super) {\n    __extends(Processor, _super);\n    /**\n     * @param {ProcessorOptions} config Configuration.\
 n     */\n    function Processor(config) {\n        var _this = _super.call(this) || this;\n        _this._imageOps = !!config.imageOps;\n        var threads;\n        if (config.threads === 0) {\n            threads = 0;\n        }\n        else if (_this._imageOps) {\n            threads = 1;\n        }\n        else {\n            threads = config.threads || 1;\n        }\n        var workers = [];\n        if (threads) {\n            for (var i = 0; i < threads; ++i) {\n                workers[i] = createWorker(config, _this._onWorkerMessage.bind(_this, i));\n            }\n        }\n        else {\n            workers[0] = createFauxWorker(config, _this._onWorkerMessage.bind(_this, 0));\n        }\n        _this._workers = workers;\n        _this._queue = [];\n        _this._maxQueueLength = config.queue || Infinity;\n        _this._running = 0;\n        _this._dataLookup = {};\n        _this._job = null;\n        return _this;\n    }\n    /**\n     * Run operation on input da
 ta.\n     * @param {Array.<Array|ImageData>} inputs Array of pixels or image data\n     *     (depending on the operation type).\n     * @param {Object} meta A user data object.  This is passed to all operations\n     *     and must be serializable.\n     * @param {function(Error, ImageData, Object): void} callback Called when work\n     *     completes.  The first argument is any error.  The second is the ImageData\n     *     generated by operations.  The third is the user data object.\n     */\n    Processor.prototype.process = function (inputs, meta, callback) {\n        this._enqueue({\n            inputs: inputs,\n            meta: meta,\n            callback: callback,\n        });\n        this._dispatch();\n    };\n    /**\n     * Add a job to the queue.\n     * @param {Object} job The job.\n     */\n    Processor.prototype._enqueue = function (job) {\n        this._queue.push(job);\n        while (this._queue.length > this._maxQueueLength) {\n            this._queue.shift(
 ).callback(null, null);\n        }\n    };\n    /**\n     * Dispatch a job.\n     */\n    Processor.prototype._dispatch = function () {\n        if (this._running === 0 && this._queue.length > 0) {\n            var job = this._queue.shift();\n            this._job = job;\n            var width = job.inputs[0].width;\n            var height = job.inputs[0].height;\n            var buffers = job.inputs.map(function (input) {\n                return input.data.buffer;\n            });\n            var threads = this._workers.length;\n            this._running = threads;\n            if (threads === 1) {\n                this._workers[0].postMessage({\n                    buffers: buffers,\n                    meta: job.meta,\n                    imageOps: this._imageOps,\n                    width: width,\n                    height: height,\n                }, buffers);\n            }\n            else {\n                var length_1 = job.inputs[0].data.length;\n                var s
 egmentLength = 4 * Math.ceil(length_1 / 4 / threads);\n                for (var i = 0; i < threads; ++i) {\n                    var offset = i * segmentLength;\n                    var slices = [];\n                    for (var j = 0, jj = buffers.length; j < jj; ++j) {\n                        slices.push(buffers[i].slice(offset, offset + segmentLength));\n                    }\n                    this._workers[i].postMessage({\n                        buffers: slices,\n                        meta: job.meta,\n                        imageOps: this._imageOps,\n                        width: width,\n                        height: height,\n                    }, slices);\n                }\n            }\n        }\n    };\n    /**\n     * Handle messages from the worker.\n     * @param {number} index The worker index.\n     * @param {MessageEvent} event The message event.\n     */\n    Processor.prototype._onWorkerMessage = function (index, event) {\n        if (this.disposed) {\n
             return;\n        }\n        this._dataLookup[index] = event.data;\n        --this._running;\n        if (this._running === 0) {\n            this._resolveJob();\n        }\n    };\n    /**\n     * Resolve a job.  If there are no more worker threads, the processor callback\n     * will be called.\n     */\n    Processor.prototype._resolveJob = function () {\n        var job = this._job;\n        var threads = this._workers.length;\n        var data, meta;\n        if (threads === 1) {\n            data = new Uint8ClampedArray(this._dataLookup[0]['buffer']);\n            meta = this._dataLookup[0]['meta'];\n        }\n        else {\n            var length_2 = job.inputs[0].data.length;\n            data = new Uint8ClampedArray(length_2);\n            meta = new Array(length_2);\n            var segmentLength = 4 * Math.ceil(length_2 / 4 / threads);\n            for (var i = 0; i < threads; ++i) {\n                var buffer = this._dataLookup[i]['buffer'];\n              
   var offset = i * segmentLength;\n                data.set(new Uint8ClampedArray(buffer), offset);\n                meta[i] = this._dataLookup[i]['meta'];\n            }\n        }\n        this._job = null;\n        this._dataLookup = {};\n        job.callback(null, newImageData(data, job.inputs[0].width, job.inputs[0].height), meta);\n        this._dispatch();\n    };\n    /**\n     * Terminate all workers associated with the processor.\n     */\n    Processor.prototype.disposeInternal = function () {\n        for (var i = 0; i < this._workers.length; ++i) {\n            this._workers[i].terminate();\n        }\n        this._workers.length = 0;\n    };\n    return Processor;\n}(Disposable));\nexport { Processor };\n/**\n * A function that takes an array of input data, performs some operation, and\n * returns an array of output data.\n * For `pixel` type operations, the function will be called with an array of\n * pixels, where each pixel is an array of four numbers (`[r, g, b, a
 ]`) in the\n * range of 0 - 255. It should return a single pixel array.\n * For `'image'` type operations, functions will be called with an array of\n * {@link ImageData https://developer.mozilla.org/en-US/docs/Web/API/ImageData}\n * and should return a single {@link ImageData\n * https://developer.mozilla.org/en-US/docs/Web/API/ImageData}.  The operations\n * are called with a second \"data\" argument, which can be used for storage.  The\n * data object is accessible from raster events, where it can be initialized in\n * \"beforeoperations\" and accessed again in \"afteroperations\".\n *\n * @typedef {function((Array<Array<number>>|Array<ImageData>), Object):\n *     (Array<number>|ImageData)} Operation\n */\n/**\n * @enum {string}\n */\nvar RasterEventType = {\n    /**\n     * Triggered before operations are run.\n     * @event module:ol/source/Raster.RasterSourceEvent#beforeoperations\n     * @api\n     */\n    BEFOREOPERATIONS: 'beforeoperations',\n    /**\n     * Triggered afte
 r operations are run.\n     * @event module:ol/source/Raster.RasterSourceEvent#afteroperations\n     * @api\n     */\n    AFTEROPERATIONS: 'afteroperations',\n};\n/**\n * Raster operation type. Supported values are `'pixel'` and `'image'`.\n * @enum {string}\n */\nvar RasterOperationType = {\n    PIXEL: 'pixel',\n    IMAGE: 'image',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Raster} instances are instances of this\n * type.\n */\nvar RasterSourceEvent = /** @class */ (function (_super) {\n    __extends(RasterSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n     * @param {Object} data An object made available to operations.\n     */\n    function RasterSourceEvent(type, frameState, data) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The raster extent.\n         * @type {import(\"../extent.js\").Extent}\n         * @api\
 n         */\n        _this.extent = frameState.extent;\n        /**\n         * The pixel resolution (map units per pixel).\n         * @type {number}\n         * @api\n         */\n        _this.resolution = frameState.viewState.resolution / frameState.pixelRatio;\n        /**\n         * An object made available to all operations.  This can be used by operations\n         * as a storage object (e.g. for calculating statistics).\n         * @type {Object}\n         * @api\n         */\n        _this.data = data;\n        return _this;\n    }\n    return RasterSourceEvent;\n}(Event));\nexport { RasterSourceEvent };\n/**\n * @typedef {Object} Options\n * @property {Array<import(\"./Source.js\").default|import(\"../layer/Layer.js\").default>} sources Input\n * sources or layers.  For vector data, use an VectorImage layer.\n * @property {Operation} [operation] Raster operation.\n * The operation will be called with data from input sources\n * and the output will be assigned to the ras
 ter source.\n * @property {Object} [lib] Functions that will be made available to operations run in a worker.\n * @property {number} [threads] By default, operations will be run in a single worker thread.\n * To avoid using workers altogether, set `threads: 0`.  For pixel operations, operations can\n * be run in multiple worker threads.  Note that there is additional overhead in\n * transferring data to multiple workers, and that depending on the user's\n * system, it may not be possible to parallelize the work.\n * @property {RasterOperationType} [operationType='pixel'] Operation type.\n * Supported values are `'pixel'` and `'image'`.  By default,\n * `'pixel'` operations are assumed, and operations will be called with an\n * array of pixels from input sources.  If set to `'image'`, operations will\n * be called with an array of ImageData objects from input sources.\n */\n/**\n * @classdesc\n * A source that transforms data from any number of input sources using an\n * {@link modul
 e:ol/source/Raster~Operation} function to transform input pixel values into\n * output pixel values.\n *\n * @fires module:ol/source/Raster.RasterSourceEvent\n * @api\n */\nvar RasterSource = /** @class */ (function (_super) {\n    __extends(RasterSource, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function RasterSource(options) {\n        var _this = _super.call(this, {\n            projection: null,\n        }) || this;\n        /**\n         * @private\n         * @type {Processor}\n         */\n        _this.processor_ = null;\n        /**\n         * @private\n         * @type {RasterOperationType}\n         */\n        _this.operationType_ =\n            options.operationType !== undefined\n                ? options.operationType\n                : RasterOperationType.PIXEL;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.threads_ = options.threads !== undefined ? options.threads : 1;\n        /**\n        
  * @private\n         * @type {Array<import(\"../layer/Layer.js\").default>}\n         */\n        _this.layers_ = createLayers(options.sources);\n        var changed = _this.changed.bind(_this);\n        for (var i = 0, ii = _this.layers_.length; i < ii; ++i) {\n            _this.layers_[i].addEventListener(EventType.CHANGE, changed);\n        }\n        /**\n         * @private\n         * @type {import(\"../TileQueue.js\").default}\n         */\n        _this.tileQueue_ = new TileQueue(function () {\n            return 1;\n        }, _this.changed.bind(_this));\n        /**\n         * The most recently requested frame state.\n         * @type {import(\"../PluggableMap.js\").FrameState}\n         * @private\n         */\n        _this.requestedFrameState_;\n        /**\n         * The most recently rendered image canvas.\n         * @type {import(\"../ImageCanvas.js\").default}\n         * @private\n         */\n        _this.renderedImageCanvas_ = null;\n        /**\n         * 
 The most recently rendered revision.\n         * @type {number}\n         */\n        _this.renderedRevision_;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").FrameState}\n         */\n        _this.frameState_ = {\n            animate: false,\n            coordinateToPixelTransform: createTransform(),\n            extent: null,\n            index: 0,\n            layerIndex: 0,\n            layerStatesArray: getLayerStatesArray(_this.layers_),\n            pixelRatio: 1,\n            pixelToCoordinateTransform: createTransform(),\n            postRenderFunctions: [],\n            size: [0, 0],\n            tileQueue: _this.tileQueue_,\n            time: Date.now(),\n            usedTiles: {},\n            viewState: /** @type {import(\"../View.js\").State} */ ({\n                rotation: 0,\n            }),\n            viewHints: [],\n            wantedTiles: {},\n            declutterItems: [],\n        };\n        _this.setAttributions(functi
 on (frameState) {\n            var attributions = [];\n            for (var index = 0, iMax = options.sources.length; index < iMax; ++index) {\n                var sourceOrLayer = options.sources[index];\n                var source = sourceOrLayer instanceof Source\n                    ? sourceOrLayer\n                    : sourceOrLayer.getSource();\n                var attributionGetter = source.getAttributions();\n                if (typeof attributionGetter === 'function') {\n                    var sourceAttribution = attributionGetter(frameState);\n                    attributions.push.apply(attributions, sourceAttribution);\n                }\n            }\n            return attributions.length !== 0 ? attributions : null;\n        });\n        if (options.operation !== undefined) {\n            _this.setOperation(options.operation, options.lib);\n        }\n        return _this;\n    }\n    /**\n     * Set the operation.\n     * @param {Operation} operation New operation.\
 n     * @param {Object=} opt_lib Functions that will be available to operations run\n     *     in a worker.\n     * @api\n     */\n    RasterSource.prototype.setOperation = function (operation, opt_lib) {\n        if (this.processor_) {\n            this.processor_.dispose();\n        }\n        this.processor_ = new Processor({\n            operation: operation,\n            imageOps: this.operationType_ === RasterOperationType.IMAGE,\n            queue: 1,\n            lib: opt_lib,\n            threads: this.threads_,\n        });\n        this.changed();\n    };\n    /**\n     * Update the stored frame state.\n     * @param {import(\"../extent.js\").Extent} extent The view extent (in map units).\n     * @param {number} resolution The view resolution.\n     * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n     * @return {import(\"../PluggableMap.js\").FrameState} The updated frame state.\n     * @private\n     */\n    RasterSource.prototype.u
 pdateFrameState_ = function (extent, resolution, projection) {\n        var frameState = /** @type {import(\"../PluggableMap.js\").FrameState} */ (assign({}, this.frameState_));\n        frameState.viewState = /** @type {import(\"../View.js\").State} */ (assign({}, frameState.viewState));\n        var center = getCenter(extent);\n        frameState.extent = extent.slice();\n        frameState.size[0] = Math.round(getWidth(extent) / resolution);\n        frameState.size[1] = Math.round(getHeight(extent) / resolution);\n        frameState.time = Infinity;\n        var viewState = frameState.viewState;\n        viewState.center = center;\n        viewState.projection = projection;\n        viewState.resolution = resolution;\n        return frameState;\n    };\n    /**\n     * Determine if all sources are ready.\n     * @return {boolean} All sources are ready.\n     * @private\n     */\n    RasterSource.prototype.allSourcesReady_ = function () {\n        var ready = true;\n        var s
 ource;\n        for (var i = 0, ii = this.layers_.length; i < ii; ++i) {\n            source = this.layers_[i].getSource();\n            if (source.getState() !== SourceState.READY) {\n                ready = false;\n                break;\n            }\n        }\n        return ready;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageCanvas.js\").default} Single image.\n     */\n    RasterSource.prototype.getImage = function (extent, resolution, pixelRatio, projection) {\n        if (!this.allSourcesReady_()) {\n            return null;\n        }\n        var frameState = this.updateFrameState_(extent, resolution, projection);\n        this.requestedFrameState_ = frameState;\n        // check if we can't reuse the existing ol/ImageCanvas\n  
       if (this.renderedImageCanvas_) {\n            var renderedResolution = this.renderedImageCanvas_.getResolution();\n            var renderedExtent = this.renderedImageCanvas_.getExtent();\n            if (resolution !== renderedResolution ||\n                !equals(extent, renderedExtent)) {\n                this.renderedImageCanvas_ = null;\n            }\n        }\n        if (!this.renderedImageCanvas_ ||\n            this.getRevision() !== this.renderedRevision_) {\n            this.processSources_();\n        }\n        frameState.tileQueue.loadMoreTiles(16, 16);\n        if (frameState.animate) {\n            requestAnimationFrame(this.changed.bind(this));\n        }\n        return this.renderedImageCanvas_;\n    };\n    /**\n     * Start processing source data.\n     * @private\n     */\n    RasterSource.prototype.processSources_ = function () {\n        var frameState = this.requestedFrameState_;\n        var len = this.layers_.length;\n        var imageDatas = new A
 rray(len);\n        for (var i = 0; i < len; ++i) {\n            frameState.layerIndex = i;\n            var imageData = getImageData(this.layers_[i], frameState);\n            if (imageData) {\n                imageDatas[i] = imageData;\n            }\n            else {\n                return;\n            }\n        }\n        var data = {};\n        this.dispatchEvent(new RasterSourceEvent(RasterEventType.BEFOREOPERATIONS, frameState, data));\n        this.processor_.process(imageDatas, data, this.onWorkerComplete_.bind(this, frameState));\n    };\n    /**\n     * Called when pixel processing is complete.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n     * @param {Error} err Any error during processing.\n     * @param {ImageData} output The output image data.\n     * @param {Object} data The user data.\n     * @private\n     */\n    RasterSource.prototype.onWorkerComplete_ = function (frameState, err, output, data) {\n        if (err |
 | !output) {\n            return;\n        }\n        // do nothing if extent or resolution changed\n        var extent = frameState.extent;\n        var resolution = frameState.viewState.resolution;\n        if (resolution !== this.requestedFrameState_.viewState.resolution ||\n            !equals(extent, this.requestedFrameState_.extent)) {\n            return;\n        }\n        var context;\n        if (this.renderedImageCanvas_) {\n            context = this.renderedImageCanvas_.getImage().getContext('2d');\n        }\n        else {\n            var width = Math.round(getWidth(extent) / resolution);\n            var height = Math.round(getHeight(extent) / resolution);\n            context = createCanvasContext2D(width, height);\n            this.renderedImageCanvas_ = new ImageCanvas(extent, resolution, 1, context.canvas);\n        }\n        context.putImageData(output, 0, 0);\n        this.changed();\n        this.renderedRevision_ = this.getRevision();\n        this.dispatc
 hEvent(new RasterSourceEvent(RasterEventType.AFTEROPERATIONS, frameState, data));\n    };\n    /**\n     * @return {null} not implemented\n     */\n    RasterSource.prototype.getImageInternal = function () {\n        return null; // not implemented\n    };\n    RasterSource.prototype.disposeInternal = function () {\n        if (this.processor_) {\n            this.processor_.dispose();\n        }\n        _super.prototype.disposeInternal.call(this);\n    };\n    return RasterSource;\n}(ImageSource));\n/**\n * Clean up and unregister the worker.\n * @function\n * @api\n */\nRasterSource.prototype.dispose;\n/**\n * A reusable canvas context.\n * @type {CanvasRenderingContext2D}\n * @private\n */\nvar sharedContext = null;\n/**\n * Get image data from a layer.\n * @param {import(\"../layer/Layer.js\").default} layer Layer to render.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n * @return {ImageData} The image data.\n */\nfunction getImageData(laye
 r, frameState) {\n    var renderer = layer.getRenderer();\n    if (!renderer) {\n        throw new Error('Unsupported layer type: ' + layer);\n    }\n    if (!renderer.prepareFrame(frameState)) {\n        return null;\n    }\n    var width = frameState.size[0];\n    var height = frameState.size[1];\n    var container = renderer.renderFrame(frameState, null);\n    var element;\n    if (container) {\n        element = container.firstElementChild;\n    }\n    if (!(element instanceof HTMLCanvasElement)) {\n        throw new Error('Unsupported rendered element: ' + element);\n    }\n    if (element.width === width && element.height === height) {\n        var context_1 = element.getContext('2d');\n        return context_1.getImageData(0, 0, width, height);\n    }\n    if (!sharedContext) {\n        sharedContext = createCanvasContext2D(width, height);\n    }\n    else {\n        var canvas = sharedContext.canvas;\n        if (canvas.width !== width || canvas.height !== height) {\n       
      sharedContext = createCanvasContext2D(width, height);\n        }\n        else {\n            sharedContext.clearRect(0, 0, width, height);\n        }\n    }\n    sharedContext.drawImage(element, 0, 0, width, height);\n    return sharedContext.getImageData(0, 0, width, height);\n}\n/**\n * Get a list of layer states from a list of layers.\n * @param {Array<import(\"../layer/Layer.js\").default>} layers Layers.\n * @return {Array<import(\"../layer/Layer.js\").State>} The layer states.\n */\nfunction getLayerStatesArray(layers) {\n    return layers.map(function (layer) {\n        return layer.getLayerState();\n    });\n}\n/**\n * Create layers for all sources.\n * @param {Array<import(\"./Source.js\").default|import(\"../layer/Layer.js\").default>} sources The sources.\n * @return {Array<import(\"../layer/Layer.js\").default>} Array of layers.\n */\nfunction createLayers(sources) {\n    var len = sources.length;\n    var layers = new Array(len);\n    for (var i = 0; i < len; ++i)
  {\n        layers[i] = createLayer(sources[i]);\n    }\n    return layers;\n}\n/**\n * Create a layer for the provided source.\n * @param {import(\"./Source.js\").default|import(\"../layer/Layer.js\").default} layerOrSource The layer or source.\n * @return {import(\"../layer/Layer.js\").default} The layer.\n */\nfunction createLayer(layerOrSource) {\n    // @type {import(\"../layer/Layer.js\").default}\n    var layer;\n    if (layerOrSource instanceof Source) {\n        if (layerOrSource instanceof TileSource) {\n            layer = new TileLayer({ source: layerOrSource });\n        }\n        else if (layerOrSource instanceof ImageSource) {\n            layer = new ImageLayer({ source: layerOrSource });\n        }\n    }\n    else {\n        layer = layerOrSource;\n    }\n    return layer;\n}\nexport default RasterSource;\n//# sourceMappingURL=Raster.js.map","/**\n * @module ol/source/Stamen\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = 
 function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport XYZ from './XYZ.js';\nimport { ATTRIBUTION as OSM_ATTRIBUTION } from './OSM.js';\n/**\n * @const\n * @type {Array<string>}\n */\nvar ATTRIBUTIONS = [\n    'Map tiles by <a href=\"https://stamen.com/\" target=\"_blank\">Stamen Design</a>, ' +\n        'under <a href=\"https://creativecommons.org/licenses/by/3.0/\" target=\"_blank\">CC BY' +\n        ' 3.0</a>.',\n    OSM_ATTRIBUTION,\n];\n/**\n * @type {Object<string, {extension: string, opaque: boolean}>}\n */\nvar Layer
 Config = {\n    'terrain': {\n        extension: 'jpg',\n        opaque: true,\n    },\n    'terrain-background': {\n        extension: 'jpg',\n        opaque: true,\n    },\n    'terrain-labels': {\n        extension: 'png',\n        opaque: false,\n    },\n    'terrain-lines': {\n        extension: 'png',\n        opaque: false,\n    },\n    'toner-background': {\n        extension: 'png',\n        opaque: true,\n    },\n    'toner': {\n        extension: 'png',\n        opaque: true,\n    },\n    'toner-hybrid': {\n        extension: 'png',\n        opaque: false,\n    },\n    'toner-labels': {\n        extension: 'png',\n        opaque: false,\n    },\n    'toner-lines': {\n        extension: 'png',\n        opaque: false,\n    },\n    'toner-lite': {\n        extension: 'png',\n        opaque: true,\n    },\n    'watercolor': {\n        extension: 'jpg',\n        opaque: true,\n    },\n};\n/**\n * @type {Object<string, {minZoom: number, maxZoom: number}>}\n */\nvar ProviderConf
 ig = {\n    'terrain': {\n        minZoom: 0,\n        maxZoom: 18,\n    },\n    'toner': {\n        minZoom: 0,\n        maxZoom: 20,\n    },\n    'watercolor': {\n        minZoom: 0,\n        maxZoom: 18,\n    },\n};\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {string} layer Layer name.\n * @property {number} [minZoom] Minimum zoom.\n * @property {number} [maxZoom] Maximum zoom.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n 
 * ```\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n/**\n * @classdesc\n * Layer source for the Stamen tile server.\n * @api\n */\nvar Stamen = /** @class */ (function (_super) {\n    __extends(Stamen, _super);\n    /**\n     * @param {Options} options Stamen options.\n     */\n    function Stamen(options) {\n        var _this = this;\n        var i = options.layer.indexOf('-');\n        var provider = i == -1 ? options.layer : options.layer.slice(0, i);\n        var providerConfig = ProviderConfig[provider];\n        var layerConfig = LayerConfig[options.layer];\n        var url = options.url !== undefined\n            ? options.url\n            : 'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' +\n  
               options.layer +\n                '/{z}/{x}/{y}.' +\n                layerConfig.extension;\n        _this = _super.call(this, {\n            attributions: ATTRIBUTIONS,\n            cacheSize: options.cacheSize,\n            crossOrigin: 'anonymous',\n            imageSmoothing: options.imageSmoothing,\n            maxZoom: options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom,\n            minZoom: options.minZoom != undefined ? options.minZoom : providerConfig.minZoom,\n            opaque: layerConfig.opaque,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileLoadFunction: options.tileLoadFunction,\n            transition: options.transition,\n            url: url,\n            wrapX: options.wrapX,\n        }) || this;\n        return _this;\n    }\n    return Stamen;\n}(XYZ));\nexport default Stamen;\n//# sourceMappingURL=Stamen.js.map","/**\n * @module ol/source/TileArcGISRest\n */\nvar __extends = (this
  && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileImage from './TileImage.js';\nimport { appendParams } from '../uri.js';\nimport { assign } from '../obj.js';\nimport { createEmpty } from '../extent.js';\nimport { modulo } from '../math.js';\nimport { scale as scaleSize, toSize } from '../size.js';\nimport { hash as tileCoordHash } from '../tilecoord.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attribut
 ions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} [params] ArcGIS Rest parameters. This field is optional. Service defaults will be\n * used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is `IMAGE` by\n * default. `TRANSPARENT` is `true` by default.  `BBOX`, `SIZE`, `BBOXSR`,\n * and `IMAGESR` will be set dynamically. Set `LAYERS` to\n * override the default service layer visibility. See\n * http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r300000
 0v7000000/\n * for further reference.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL.\n * The default is\n * ```js\n * function(imageTile, src)
  {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The\n * url should include /MapServer or /ImageServer.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.  To disable the opacity\n * transition, pass `transition: 0`.\n * @property {Array<string>} [urls] ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS\n * Service supports multiple urls for export requests.\n */\n/**\n * @classdesc\n * Layer source for tile data from ArcGIS Rest services. Map and Image\n * Services are supported.\n *\n * For cached ArcGIS services, better performance is available using the\n * {@link module:ol/source/XYZ~XYZ} data source.\n * @api\n */\nvar TileArcGISRest = /** @class */ (function (_super) {\n    __extends(TileArcGISRest, _super);\n    /**\n     * @param {Options=} opt_options 
 Tile ArcGIS Rest options.\n     */\n    function TileArcGISRest(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileGrid: options.tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {boolean}\n
          */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.tmpExtent_ = createEmpty();\n        _this.setKey(_this.getKeyForParams_());\n        return _this;\n    }\n    /**\n     * @private\n     * @return {string} The key for the current params.\n     */\n    TileArcGISRest.prototype.getKeyForParams_ = function () {\n        var i = 0;\n        var res = [];\n        for (var key in this.params_) {\n            res[i++] = key + '-' + this.params_[key];\n        }\n        return res.join('/');\n    };\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    TileArcGISRest.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @pa
 ram {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../size.js\").Size} tileSize Tile size.\n     * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string|undefined} Request URL.\n     * @private\n     */\n    TileArcGISRest.prototype.getRequestUrl_ = function (tileCoord, tileSize, tileExtent, pixelRatio, projection, params) {\n        var urls = this.urls;\n        if (!urls) {\n            return undefined;\n        }\n        // ArcGIS Server only wants the numeric portion of the projection ID.\n        var srid = projection.getCode().split(':').pop();\n        params['SIZE'] = tileSize[0] + ',' + tileSize[1];\n        params['BBOX'] = tileExtent.join(',');\n        params['BBOXSR'] = srid;\n        params['IMAGESR'] = srid;\n        par
 ams['DPI'] = Math.round(params['DPI'] ? params['DPI'] * pixelRatio : 90 * pixelRatio);\n        var url;\n        if (urls.length == 1) {\n            url = urls[0];\n        }\n        else {\n            var index = modulo(tileCoordHash(tileCoord), urls.length);\n            url = urls[index];\n        }\n        var modifiedUrl = url\n            .replace(/MapServer\\/?$/, 'MapServer/export')\n            .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n        return appendParams(modifiedUrl, params);\n    };\n    /**\n     * Get the tile pixel ratio for this source.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     */\n    TileArcGISRest.prototype.getTilePixelRatio = function (pixelRatio) {\n        return this.hidpi_ ? pixelRatio : 1;\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    TileArcGISRest.prototype.updateParams = function (params) {\n     
    assign(this.params_, params);\n        this.setKey(this.getKeyForParams_());\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coordinate\n     * @param {number} pixelRatio The pixel ratio\n     * @param {import(\"../proj/Projection.js\").default} projection The projection\n     * @return {string|undefined} The tile URL\n     * @override\n     */\n    TileArcGISRest.prototype.tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n        var tileGrid = this.getTileGrid();\n        if (!tileGrid) {\n            tileGrid = this.getTileGridForProjection(projection);\n        }\n        if (tileGrid.getResolutions().length <= tileCoord[0]) {\n            return undefined;\n        }\n        if (pixelRatio != 1 && !this.hidpi_) {\n            pixelRatio = 1;\n        }\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n        var tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n
         if (pixelRatio != 1) {\n            tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n        }\n        // Apply default params and override with user specified values.\n        var baseParams = {\n            'F': 'image',\n            'FORMAT': 'PNG32',\n            'TRANSPARENT': true,\n        };\n        assign(baseParams, this.params_);\n        return this.getRequestUrl_(tileCoord, tileSize, tileExtent, pixelRatio, projection, baseParams);\n    };\n    return TileArcGISRest;\n}(TileImage));\nexport default TileArcGISRest;\n//# sourceMappingURL=TileArcGISRest.js.map","/**\n * @module ol/source/TileDebug\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extend
 Statics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport XYZ from './XYZ.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { getKeyZXY } from '../tilecoord.js';\nimport { toSize } from '../size.js';\nvar LabeledTile = /** @class */ (function (_super) {\n    __extends(LabeledTile, _super);\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../size.js\").Size} tileSize Tile size.\n     * @param {string} text Text.\n     */\n    function LabeledTile(tileCoord, tileSize, text) {\n        var _this = _super.call(this, tileCoord, TileState.LOADED) || this;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         *
 /\n        _this.tileSize_ = tileSize;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.text_ = text;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = null;\n        return _this;\n    }\n    /**\n     * Get the image element for this tile.\n     * @return {HTMLCanvasElement} Image.\n     */\n    LabeledTile.prototype.getImage = function () {\n        if (this.canvas_) {\n            return this.canvas_;\n        }\n        else {\n            var tileSize = this.tileSize_;\n            var context = createCanvasContext2D(tileSize[0], tileSize[1]);\n            context.strokeStyle = 'grey';\n            context.strokeRect(0.5, 0.5, tileSize[0] + 0.5, tileSize[1] + 0.5);\n            context.fillStyle = 'grey';\n            context.strokeStyle = 'white';\n            context.textAlign = 'center';\n            context.textBaseline = 'middle';\n            context.font = '24px sans-seri
 f';\n            context.lineWidth = 4;\n            context.strokeText(this.text_, tileSize[0] / 2, tileSize[1] / 2, tileSize[0]);\n            context.fillText(this.text_, tileSize[0] / 2, tileSize[1] / 2, tileSize[0]);\n            this.canvas_ = context.canvas;\n            return context.canvas;\n        }\n    };\n    LabeledTile.prototype.load = function () { };\n    return LabeledTile;\n}(Tile));\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Optional projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [zDirection=0] Set to `1` when debugging `VectorTile` sources with\n * a default configuration. Indicates which resolution should be used by a renderer if\n * the view resolution does not match any resolution of the tile source. If 0, the nearest\n * resolution will be us
 ed. If 1, the nearest lower resolution will be used. If -1, the\n * nearest higher resolution will be used.\n */\n/**\n * @classdesc\n * A pseudo tile source, which does not fetch tiles from a server, but renders\n * a grid outline for the tile grid/projection along with the coordinates for\n * each tile. See examples/canvas-tiles for an example.\n *\n * Uses Canvas context2d, so requires Canvas support.\n * @api\n */\nvar TileDebug = /** @class */ (function (_super) {\n    __extends(TileDebug, _super);\n    /**\n     * @param {Options=} opt_options Debug tile options.\n     */\n    function TileDebug(opt_options) {\n        var _this = this;\n        /**\n         * @type {Options}\n         */\n        var options = opt_options || {};\n        _this = _super.call(this, {\n            opaque: false,\n            projection: options.projection,\n            tileGrid: options.tileGrid,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            zDirection: op
 tions.zDirection,\n        }) || this;\n        return _this;\n    }\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @return {!LabeledTile} Tile.\n     */\n    TileDebug.prototype.getTile = function (z, x, y) {\n        var tileCoordKey = getKeyZXY(z, x, y);\n        if (this.tileCache.containsKey(tileCoordKey)) {\n            return /** @type {!LabeledTile} */ (this.tileCache.get(tileCoordKey));\n        }\n        else {\n            var tileSize = toSize(this.tileGrid.getTileSize(z));\n            var tileCoord = [z, x, y];\n            var textTileCoord = this.getTileCoordForTileUrlFunction(tileCoord);\n            var text = void 0;\n            if (textTileCoord) {\n                text =\n                    'z:' +\n                        textTileCoord[0] +\n                        ' x:' +\n                        textTileCoord[1] +\n                        ' y:' +\n      
                   textTileCoord[2];\n            }\n            else {\n                text = 'none';\n            }\n            var tile = new LabeledTile(tileCoord, tileSize, text);\n            this.tileCache.set(tileCoordKey, tile);\n            return tile;\n        }\n    };\n    return TileDebug;\n}(XYZ));\nexport default TileDebug;\n//# sourceMappingURL=TileDebug.js.map","/**\n * @module ol/source/TileJSON\n */\n// FIXME check order of async callbacks\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object
 .create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * See https://mapbox.com/developers/api/.\n */\nimport SourceState from './State.js';\nimport TileImage from './TileImage.js';\nimport { applyTransform, intersects } from '../extent.js';\nimport { assert } from '../asserts.js';\nimport { createFromTemplates } from '../tileurlfunction.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\nimport { get as getProjection, getTransformFromProjections } from '../proj.js';\nimport { jsonp as requestJSONP } from '../net.js';\n/**\n * @typedef {Object} Config\n * @property {string} [name] The name.\n * @property {string} [description] The description.\n * @property {string} [version] The version.\n * @property {string} [attribution] The attribution.\n * @property {string} [template] The template.\n * @property {string} [legend] The legend.\n * @property {string} [scheme] The scheme.\n * @property {Array<string>} tiles The tile URL templates.\n * @pro
 perty {Array<string>} [grids] Optional grids.\n * @property {number} [minzoom] Minimum zoom level.\n * @property {number} [maxzoom] Maximum zoom level.\n * @property {Array<number>} [bounds] Optional bounds.\n * @property {Array<number>} [center] Optional center.\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server do
 es not support CORS..\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Note: `tileSize` and other non-standard TileJSON properties are currently ignored.\n * @property {string} [url] URL to the TileJSON file. If not provided, `tileJSON` must be configured.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity tra
 nsition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n/**\n * @classdesc\n * Layer source for tile data in TileJSON format.\n * @api\n */\nvar TileJSON = /** @class */ (function (_super) {\n    __extends(TileJSON, _super);\n    /**\n     * @param {Options} options TileJSON options.\n     */\n    function TileJSON(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: getProjection('EPSG:3857'),\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            state: SourceState.LOADING,\n            tileLoadFunction: options.tileLoadFunction,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @type {Conf
 ig}\n         * @private\n         */\n        _this.tileJSON_ = null;\n        /**\n         * @type {number|import(\"../size.js\").Size}\n         * @private\n         */\n        _this.tileSize_ = options.tileSize;\n        if (options.url) {\n            if (options.jsonp) {\n                requestJSONP(options.url, _this.handleTileJSONResponse.bind(_this), _this.handleTileJSONError.bind(_this));\n            }\n            else {\n                var client = new XMLHttpRequest();\n                client.addEventListener('load', _this.onXHRLoad_.bind(_this));\n                client.addEventListener('error', _this.onXHRError_.bind(_this));\n                client.open('GET', options.url);\n                client.send();\n            }\n        }\n        else if (options.tileJSON) {\n            _this.handleTileJSONResponse(options.tileJSON);\n        }\n        else {\n            assert(false, 51); // Either `url` or `tileJSON` options must be provided\n        }\n        re
 turn _this;\n    }\n    /**\n     * @private\n     * @param {Event} event The load event.\n     */\n    TileJSON.prototype.onXHRLoad_ = function (event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 && client.status < 300)) {\n            var response = void 0;\n            try {\n                response = /** @type {TileJSON} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.handleTileJSONError();\n                return;\n            }\n            this.handleTileJSONResponse(response);\n        }\n        else {\n            this.handleTileJSONError();\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event The error event.\n     */\n    TileJSON.prototype.onXHRError_ = function (event) {\n        this.handleTileJSONError();\n    };\n    /**\n     * @return {Config} The tilejson object.\n 
     * @api\n     */\n    TileJSON.prototype.getTileJSON = function () {\n        return this.tileJSON_;\n    };\n    /**\n     * @protected\n     * @param {Config} tileJSON Tile JSON.\n     */\n    TileJSON.prototype.handleTileJSONResponse = function (tileJSON) {\n        var epsg4326Projection = getProjection('EPSG:4326');\n        var sourceProjection = this.getProjection();\n        var extent;\n        if (tileJSON['bounds'] !== undefined) {\n            var transform = getTransformFromProjections(epsg4326Projection, sourceProjection);\n            extent = applyTransform(tileJSON['bounds'], transform);\n        }\n        var minZoom = tileJSON['minzoom'] || 0;\n        var maxZoom = tileJSON['maxzoom'] || 22;\n        var tileGrid = createXYZ({\n            extent: extentFromProjection(sourceProjection),\n            maxZoom: maxZoom,\n            minZoom: minZoom,\n            tileSize: this.tileSize_,\n        });\n        this.tileGrid = tileGrid;\n        this.tileUrlFunct
 ion = createFromTemplates(tileJSON['tiles'], tileGrid);\n        if (tileJSON['attribution'] !== undefined && !this.getAttributions()) {\n            var attributionExtent_1 = extent !== undefined ? extent : epsg4326Projection.getExtent();\n            this.setAttributions(function (frameState) {\n                if (intersects(attributionExtent_1, frameState.extent)) {\n                    return [tileJSON['attribution']];\n                }\n                return null;\n            });\n        }\n        this.tileJSON_ = tileJSON;\n        this.setState(SourceState.READY);\n    };\n    /**\n     * @protected\n     */\n    TileJSON.prototype.handleTileJSONError = function () {\n        this.setState(SourceState.ERROR);\n    };\n    return TileJSON;\n}(TileImage));\nexport default TileJSON;\n//# sourceMappingURL=TileJSON.js.map","/**\n * @module ol/source/TileWMS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        ex
 tendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport { DEFAULT_WMS_VERSION } from './common.js';\nimport TileImage from './TileImage.js';\nimport WMSServerType from './WMSServerType.js';\nimport { appendParams } from '../uri.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { buffer, createEmpty } from '../extent.js';\nimport { buffer as bufferSize, scale as scaleSize, toSize } from '../size.js';\nimport { calculateSourceResolution } from '../reproj.js';\nimport { compareVersions } from '../string.js';\nimport 
 { get as getProjection, transform, transformExtent } from '../proj.js';\nimport { modulo } from '../math.js';\nimport { hash as tileCoordHash } from '../tilecoord.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} params WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (
 `SRS` for WMS version < 1.3.0) will be set dynamically.\n * @property {number} [gutter=0]\n * The size in pixels of the gutter around image tiles to ignore. By setting\n * this property to a non-zero value, images will be requested that are wider\n * and taller than the tile size by a value of `2 x gutter`.\n * Using a non-zero value allows artifacts of rendering at tile edges to be\n * ignored. If you control the WMS service it is recommended to address\n * \"artifacts at tile edges\" issues by properly configuring the WMS service. For\n * example, MapServer has a `tile_map_edge_buffer` configuration parameter for\n * this. See http://mapserver.org/output/tile_mode.html.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojec
 tion error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used..\n * @property {import(\"./WMSServerType.js\").default|string} [serverType]\n * The type of the remote WMS server. Currently only used when `hidpi` is\n * `true`.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().s
 rc = src;\n * };\n * ```\n * @property {string} [url] WMS service URL.\n * @property {Array<string>} [urls] WMS service urls.\n * Use this instead of `url` when the WMS supports multiple urls for GetMap requests.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When `true`, tiles will be requested for one world only,\n * but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n/**\n * @classdesc\n * Layer source for tile data from WMS servers.\n * @api\n */\nvar TileWMS = /** @class */ (function (_super) {\n    __extends(TileWMS, _super);\n    /**\n     * @param {Options=} [opt_options] Tile WMS options.\n     */\n    function TileWMS(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : /** @type 
 {Options} */ ({});\n        var params = options.params || {};\n        var transparent = 'TRANSPARENT' in params ? params['TRANSPARENT'] : true;\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            opaque: !transparent,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileClass: options.tileClass,\n            tileGrid: options.tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.gutter_ = options.gutter !== unde
 fined ? options.gutter : 0;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = params;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.v13_ = true;\n        /**\n         * @private\n         * @type {import(\"./WMSServerType.js\").default|undefined}\n         */\n        _this.serverType_ = /** @type {import(\"./WMSServerType.js\").default|undefined} */ (options.serverType);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.tmpExtent_ = createEmpty();\n        _this.updateV13_();\n        _this.setKey(_this.getKeyForParams_());\n        return _this;\n    }\n    /**\n     * Return the GetFeatureInfo URL for the passed coordinate, resolution, and\n     * projection. Return `undefine
 d` if the GetFeatureInfo URL cannot be\n     * constructed.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n     * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n     *     be provided. If `QUERY_LAYERS` is not provided then the layers specified\n     *     in the `LAYERS` parameter will be used. `VERSION` should not be\n     *     specified here.\n     * @return {string|undefined} GetFeatureInfo URL.\n     * @api\n     */\n    TileWMS.prototype.getFeatureInfoUrl = function (coordinate, resolution, projection, params) {\n        var projectionObj = getProjection(projection);\n        var sourceProjectionObj = this.getProjection();\n        var tileGrid = this.getTileGrid();\n        if (!tileGrid) {\n            tileGrid = this.getTileGridForProjection(projectionObj);\n        }\n        var z = t
 ileGrid.getZForResolution(resolution, this.zDirection);\n        var tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n        if (tileGrid.getResolutions().length <= tileCoord[0]) {\n            return undefined;\n        }\n        var tileResolution = tileGrid.getResolution(tileCoord[0]);\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n        var tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n        var gutter = this.gutter_;\n        if (gutter !== 0) {\n            tileSize = bufferSize(tileSize, gutter, this.tmpSize);\n            tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);\n        }\n        if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n            tileResolution = calculateSourceResolution(sourceProjectionObj, projectionObj, coordinate, tileResolution);\n            tileExtent = transformExtent(tileExtent, projectionObj, sourceProjectionObj);\n         
    coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n        }\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetFeatureInfo',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n            'QUERY_LAYERS': this.params_['LAYERS'],\n        };\n        assign(baseParams, this.params_, params);\n        var x = Math.floor((coordinate[0] - tileExtent[0]) / tileResolution);\n        var y = Math.floor((tileExtent[3] - coordinate[1]) / tileResolution);\n        baseParams[this.v13_ ? 'I' : 'X'] = x;\n        baseParams[this.v13_ ? 'J' : 'Y'] = y;\n        return this.getRequestUrl_(tileCoord, tileSize, tileExtent, 1, sourceProjectionObj || projectionObj, baseParams);\n    };\n    /**\n     * Return the GetLegendGraphic URL, optionally optimized for the passed\n     * resolution and possibly including any passed specific parameters. Returns\n     * `undefined` if the
  GetLegendGraphic URL cannot be constructed.\n     *\n     * @param {number} [resolution] Resolution. If set to undefined, `SCALE`\n     *     will not be calculated and included in URL.\n     * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the\n     *     request is generated for this wms layer, else it will try to use the\n     *     configured wms layer. Default `FORMAT` is `image/png`.\n     *     `VERSION` should not be specified here.\n     * @return {string|undefined} GetLegendGraphic URL.\n     * @api\n     */\n    TileWMS.prototype.getLegendUrl = function (resolution, params) {\n        if (this.urls[0] === undefined) {\n            return undefined;\n        }\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetLegendGraphic',\n            'FORMAT': 'image/png',\n        };\n        if (params === undefined || params['LAYER'] === undefined) {\n            var layers = thi
 s.params_.LAYERS;\n            var isSingleLayer = !Array.isArray(layers) || layers.length === 1;\n            if (!isSingleLayer) {\n                return undefined;\n            }\n            baseParams['LAYER'] = layers;\n        }\n        if (resolution !== undefined) {\n            var mpu = this.getProjection()\n                ? this.getProjection().getMetersPerUnit()\n                : 1;\n            var dpi = 25.4 / 0.28;\n            var inchesPerMeter = 39.37;\n            baseParams['SCALE'] = resolution * mpu * inchesPerMeter * dpi;\n        }\n        assign(baseParams, params);\n        return appendParams(/** @type {string} */ (this.urls[0]), baseParams);\n    };\n    /**\n     * @return {number} Gutter.\n     */\n    TileWMS.prototype.getGutter = function () {\n        return this.gutter_;\n    };\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams 
 method.\n     * @return {Object} Params.\n     * @api\n     */\n    TileWMS.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../size.js\").Size} tileSize Tile size.\n     * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string|undefined} Request URL.\n     * @private\n     */\n    TileWMS.prototype.getRequestUrl_ = function (tileCoord, tileSize, tileExtent, pixelRatio, projection, params) {\n        var urls = this.urls;\n        if (!urls) {\n            return undefined;\n        }\n        params['WIDTH'] = tileSize[0];\n        params['HEIGHT'] = tileSize[1];\n        params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n        if (!(
 'STYLES' in this.params_)) {\n            params['STYLES'] = '';\n        }\n        if (pixelRatio != 1) {\n            switch (this.serverType_) {\n                case WMSServerType.GEOSERVER:\n                    var dpi = (90 * pixelRatio + 0.5) | 0;\n                    if ('FORMAT_OPTIONS' in params) {\n                        params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n                    }\n                    else {\n                        params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n                    }\n                    break;\n                case WMSServerType.MAPSERVER:\n                    params['MAP_RESOLUTION'] = 90 * pixelRatio;\n                    break;\n                case WMSServerType.CARMENTA_SERVER:\n                case WMSServerType.QGIS:\n                    params['DPI'] = 90 * pixelRatio;\n                    break;\n                default:\n                    assert(false, 52); // Unknown `serverType` configured\n                    break;\n   
          }\n        }\n        var axisOrientation = projection.getAxisOrientation();\n        var bbox = tileExtent;\n        if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {\n            var tmp = void 0;\n            tmp = tileExtent[0];\n            bbox[0] = tileExtent[1];\n            bbox[1] = tmp;\n            tmp = tileExtent[2];\n            bbox[2] = tileExtent[3];\n            bbox[3] = tmp;\n        }\n        params['BBOX'] = bbox.join(',');\n        var url;\n        if (urls.length == 1) {\n            url = urls[0];\n        }\n        else {\n            var index = modulo(tileCoordHash(tileCoord), urls.length);\n            url = urls[index];\n        }\n        return appendParams(url, params);\n    };\n    /**\n     * Get the tile pixel ratio for this source.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     */\n    TileWMS.prototype.getTilePixelRatio = function (pixelRatio) {\n        return !this.hidpi_ ||
  this.serverType_ === undefined ? 1 : pixelRatio;\n    };\n    /**\n     * @private\n     * @return {string} The key for the current params.\n     */\n    TileWMS.prototype.getKeyForParams_ = function () {\n        var i = 0;\n        var res = [];\n        for (var key in this.params_) {\n            res[i++] = key + '-' + this.params_[key];\n        }\n        return res.join('/');\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    TileWMS.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.updateV13_();\n        this.setKey(this.getKeyForParams_());\n    };\n    /**\n     * @private\n     */\n    TileWMS.prototype.updateV13_ = function () {\n        var version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;\n        this.v13_ = compareVersions(version, '1.3') >= 0;\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coord
 inate\n     * @param {number} pixelRatio The pixel ratio\n     * @param {import(\"../proj/Projection.js\").default} projection The projection\n     * @return {string|undefined} The tile URL\n     * @override\n     */\n    TileWMS.prototype.tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n        var tileGrid = this.getTileGrid();\n        if (!tileGrid) {\n            tileGrid = this.getTileGridForProjection(projection);\n        }\n        if (tileGrid.getResolutions().length <= tileCoord[0]) {\n            return undefined;\n        }\n        if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n            pixelRatio = 1;\n        }\n        var tileResolution = tileGrid.getResolution(tileCoord[0]);\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n        var tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n        var gutter = this.gutter_;\n        if (gutter !== 0) {\n            ti
 leSize = bufferSize(tileSize, gutter, this.tmpSize);\n            tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);\n        }\n        if (pixelRatio != 1) {\n            tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n        }\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetMap',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n        };\n        assign(baseParams, this.params_);\n        return this.getRequestUrl_(tileCoord, tileSize, tileExtent, pixelRatio, projection, baseParams);\n    };\n    return TileWMS;\n}(TileImage));\nexport default TileWMS;\n//# sourceMappingURL=TileWMS.js.map","/**\n * @module ol/source/UTFGrid\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b
 ) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport SourceState from './State.js';\nimport Tile from '../Tile.js';\nimport TileSource from './Tile.js';\nimport TileState from '../TileState.js';\nimport { applyTransform, intersects } from '../extent.js';\nimport { assert } from '../asserts.js';\nimport { createFromTemplates, nullTileUrlFunction } from '../tileurlfunction.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\nimport { getKeyZXY } from '../tilecoord.js';\nimport { get as getProjection, getTransformFromProjections } from '../proj.js';\nimport { listenOnce } from '../events.j
 s';\nimport { jsonp as requestJSONP } from '../net.js';\n/**\n * @typedef {Object} UTFGridJSON\n * @property {Array<string>} grid The grid.\n * @property {Array<string>} keys The keys.\n * @property {Object<string, Object>} [data] Optional data.\n */\nvar CustomTile = /** @class */ (function (_super) {\n    __extends(CustomTile, _super);\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../TileState.js\").default} state State.\n     * @param {string} src Image source URI.\n     * @param {import(\"../extent.js\").Extent} extent Extent of the tile.\n     * @param {boolean} preemptive Load the tile when visible (before it's needed).\n     * @param {boolean} jsonp Load the tile as a script.\n     */\n    function CustomTile(tileCoord, state, src, extent, preemptive, jsonp) {\n        var _this = _super.call(this, tileCoord, state) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        
 _this.src_ = src;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.extent_ = extent;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.preemptive_ = preemptive;\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.grid_ = null;\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.keys_ = null;\n        /**\n         * @private\n         * @type {Object<string, Object>|undefined}\n         */\n        _this.data_ = null;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.jsonp_ = jsonp;\n        return _this;\n    }\n    /**\n     * Get the image element for this tile.\n     * @return {HTMLImageElement} Image.\n     */\n    CustomTile.prototype.getImage = function () {\n        return null;\n    };\n    /**\n     * Synchronously returns data at given coordin
 ate (if available).\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {*} The data.\n     */\n    CustomTile.prototype.getData = function (coordinate) {\n        if (!this.grid_ || !this.keys_) {\n            return null;\n        }\n        var xRelative = (coordinate[0] - this.extent_[0]) / (this.extent_[2] - this.extent_[0]);\n        var yRelative = (coordinate[1] - this.extent_[1]) / (this.extent_[3] - this.extent_[1]);\n        var row = this.grid_[Math.floor((1 - yRelative) * this.grid_.length)];\n        if (typeof row !== 'string') {\n            return null;\n        }\n        var code = row.charCodeAt(Math.floor(xRelative * row.length));\n        if (code >= 93) {\n            code--;\n        }\n        if (code >= 35) {\n            code--;\n        }\n        code -= 32;\n        var data = null;\n        if (code in this.keys_) {\n            var id = this.keys_[code];\n            if (this.data_ && id in this.data_) {\n 
                data = this.data_[id];\n            }\n            else {\n                data = id;\n            }\n        }\n        return data;\n    };\n    /**\n     * Calls the callback (synchronously by default) with the available data\n     * for given coordinate (or `null` if not yet loaded).\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {function(*): void} callback Callback.\n     * @param {boolean=} opt_request If `true` the callback is always async.\n     *                               The tile data is requested if not yet loaded.\n     */\n    CustomTile.prototype.forDataAtCoordinate = function (coordinate, callback, opt_request) {\n        if (this.state == TileState.EMPTY && opt_request === true) {\n            this.state = TileState.IDLE;\n            listenOnce(this, EventType.CHANGE, function (e) {\n                callback(this.getData(coordinate));\n            }, this);\n            this.loadInternal_();\n      
   }\n        else {\n            if (opt_request === true) {\n                setTimeout(function () {\n                    callback(this.getData(coordinate));\n                }.bind(this), 0);\n            }\n            else {\n                callback(this.getData(coordinate));\n            }\n        }\n    };\n    /**\n     * Return the key to be used for all tiles in the source.\n     * @return {string} The key for all tiles.\n     */\n    CustomTile.prototype.getKey = function () {\n        return this.src_;\n    };\n    /**\n     * @private\n     */\n    CustomTile.prototype.handleError_ = function () {\n        this.state = TileState.ERROR;\n        this.changed();\n    };\n    /**\n     * @param {!UTFGridJSON} json UTFGrid data.\n     * @private\n     */\n    CustomTile.prototype.handleLoad_ = function (json) {\n        this.grid_ = json['grid'];\n        this.keys_ = json['keys'];\n        this.data_ = json['data'];\n        this.state = TileState.LOADED;\n        this.c
 hanged();\n    };\n    /**\n     * @private\n     */\n    CustomTile.prototype.loadInternal_ = function () {\n        if (this.state == TileState.IDLE) {\n            this.state = TileState.LOADING;\n            if (this.jsonp_) {\n                requestJSONP(this.src_, this.handleLoad_.bind(this), this.handleError_.bind(this));\n            }\n            else {\n                var client = new XMLHttpRequest();\n                client.addEventListener('load', this.onXHRLoad_.bind(this));\n                client.addEventListener('error', this.onXHRError_.bind(this));\n                client.open('GET', this.src_);\n                client.send();\n            }\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event The load event.\n     */\n    CustomTile.prototype.onXHRLoad_ = function (event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 &
 & client.status < 300)) {\n            var response = void 0;\n            try {\n                response = /** @type {!UTFGridJSON} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.handleError_();\n                return;\n            }\n            this.handleLoad_(response);\n        }\n        else {\n            this.handleError_();\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event The error event.\n     */\n    CustomTile.prototype.onXHRError_ = function (event) {\n        this.handleError_();\n    };\n    /**\n     */\n    CustomTile.prototype.load = function () {\n        if (this.preemptive_) {\n            this.loadInternal_();\n        }\n        else {\n            this.setState(TileState.EMPTY);\n        }\n    };\n    return CustomTile;\n}(Tile));\nexport { CustomTile };\n/**\n * @typedef {Object} Options\n * @property {boolean} [preemptive=true]\n * If `true` the UTFGrid source loads the til
 es based on their \"visibility\".\n * This improves the speed of response, but increases traffic.\n * Note that if set to `false` (lazy loading), you need to pass `true` as\n * `opt_request` to the `forDataAtCoordinateAndResolution` method otherwise no\n * data will ever be loaded.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server does not support CORS..\n * @property {import(\"./TileJSON.js\").Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {string} [url] TileJSON endpoint that provides the configuration for this source.\n * Request will be made through JSONP. If not provided, `tileJSON` must be configured.\n */\n/**\n * @classdesc\n * Layer source for UTFGrid interaction data loaded from TileJSON format.\n * @api\n */\nvar UTFGrid = /** @class */ (function (_super) {\n    __extends(UTFGrid, _super);\n    /**\n     * @param {Options} options Source op
 tions.\n     */\n    function UTFGrid(options) {\n        var _this = _super.call(this, {\n            projection: getProjection('EPSG:3857'),\n            state: SourceState.LOADING,\n        }) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.preemptive_ =\n            options.preemptive !== undefined ? options.preemptive : true;\n        /**\n         * @private\n         * @type {!import(\"../Tile.js\").UrlFunction}\n         */\n        _this.tileUrlFunction_ = nullTileUrlFunction;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.template_ = undefined;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.jsonp_ = options.jsonp || false;\n        if (options.url) {\n            if (_this.jsonp_) {\n                requestJSONP(options.url, _this.handleTileJSONResponse.bind(_this), _this.handleTileJSONError.bind(_this));\n            }\n        
     else {\n                var client = new XMLHttpRequest();\n                client.addEventListener('load', _this.onXHRLoad_.bind(_this));\n                client.addEventListener('error', _this.onXHRError_.bind(_this));\n                client.open('GET', options.url);\n                client.send();\n            }\n        }\n        else if (options.tileJSON) {\n            _this.handleTileJSONResponse(options.tileJSON);\n        }\n        else {\n            assert(false, 51); // Either `url` or `tileJSON` options must be provided\n        }\n        return _this;\n    }\n    /**\n     * @private\n     * @param {Event} event The load event.\n     */\n    UTFGrid.prototype.onXHRLoad_ = function (event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 && client.status < 300)) {\n            var response = void 0;\n            try {\n                response 
 = /** @type {import(\"./TileJSON.js\").Config} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.handleTileJSONError();\n                return;\n            }\n            this.handleTileJSONResponse(response);\n        }\n        else {\n            this.handleTileJSONError();\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event The error event.\n     */\n    UTFGrid.prototype.onXHRError_ = function (event) {\n        this.handleTileJSONError();\n    };\n    /**\n     * Return the template from TileJSON.\n     * @return {string|undefined} The template from TileJSON.\n     * @api\n     */\n    UTFGrid.prototype.getTemplate = function () {\n        return this.template_;\n    };\n    /**\n     * Calls the callback (synchronously by default) with the available data\n     * for given coordinate and resolution (or `null` if not yet loaded or\n     * in case of an error).\n     * @param {import(\"../coordinate.js\"
 ).Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {function(*): void} callback Callback.\n     * @param {boolean=} opt_request If `true` the callback is always async.\n     *                               The tile data is requested if not yet loaded.\n     * @api\n     */\n    UTFGrid.prototype.forDataAtCoordinateAndResolution = function (coordinate, resolution, callback, opt_request) {\n        if (this.tileGrid) {\n            var z = this.tileGrid.getZForResolution(resolution, this.zDirection);\n            var tileCoord = this.tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n            var tile = /** @type {!CustomTile} */ (this.getTile(tileCoord[0], tileCoord[1], tileCoord[2], 1, this.getProjection()));\n            tile.forDataAtCoordinate(coordinate, callback, opt_request);\n        }\n        else {\n            if (opt_request === true) {\n                setTimeout(function () {\n                    callback(null);\n     
            }, 0);\n            }\n            else {\n                callback(null);\n            }\n        }\n    };\n    /**\n     * @protected\n     */\n    UTFGrid.prototype.handleTileJSONError = function () {\n        this.setState(SourceState.ERROR);\n    };\n    /**\n     * TODO: very similar to ol/source/TileJSON#handleTileJSONResponse\n     * @protected\n     * @param {import(\"./TileJSON.js\").Config} tileJSON Tile JSON.\n     */\n    UTFGrid.prototype.handleTileJSONResponse = function (tileJSON) {\n        var epsg4326Projection = getProjection('EPSG:4326');\n        var sourceProjection = this.getProjection();\n        var extent;\n        if (tileJSON['bounds'] !== undefined) {\n            var transform = getTransformFromProjections(epsg4326Projection, sourceProjection);\n            extent = applyTransform(tileJSON['bounds'], transform);\n        }\n        var minZoom = tileJSON['minzoom'] || 0;\n        var maxZoom = tileJSON['maxzoom'] || 22;\n        var tileGri
 d = createXYZ({\n            extent: extentFromProjection(sourceProjection),\n            maxZoom: maxZoom,\n            minZoom: minZoom,\n        });\n        this.tileGrid = tileGrid;\n        this.template_ = tileJSON['template'];\n        var grids = tileJSON['grids'];\n        if (!grids) {\n            this.setState(SourceState.ERROR);\n            return;\n        }\n        this.tileUrlFunction_ = createFromTemplates(grids, tileGrid);\n        if (tileJSON['attribution'] !== undefined) {\n            var attributionExtent_1 = extent !== undefined ? extent : epsg4326Projection.getExtent();\n            this.setAttributions(function (frameState) {\n                if (intersects(attributionExtent_1, frameState.extent)) {\n                    return [tileJSON['attribution']];\n                }\n                return null;\n            });\n        }\n        this.setState(SourceState.READY);\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number
 } x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!CustomTile} Tile.\n     */\n    UTFGrid.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        var tileCoordKey = getKeyZXY(z, x, y);\n        if (this.tileCache.containsKey(tileCoordKey)) {\n            return this.tileCache.get(tileCoordKey);\n        }\n        else {\n            var tileCoord = [z, x, y];\n            var urlTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n            var tileUrl = this.tileUrlFunction_(urlTileCoord, pixelRatio, projection);\n            var tile = new CustomTile(tileCoord, tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY, tileUrl !== undefined ? tileUrl : '', this.tileGrid.getTileCoordExtent(tileCoord), this.preemptive_, this.jsonp_);\n            this.tileCache.set(tileCoordKey, t
 ile);\n            return tile;\n        }\n    };\n    /**\n     * Marks a tile coord as being used, without triggering a load.\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     */\n    UTFGrid.prototype.useTile = function (z, x, y) {\n        var tileCoordKey = getKeyZXY(z, x, y);\n        if (this.tileCache.containsKey(tileCoordKey)) {\n            this.tileCache.get(tileCoordKey);\n        }\n    };\n    return UTFGrid;\n}(TileSource));\nexport default UTFGrid;\n//# sourceMappingURL=UTFGrid.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return functi
 on (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/VectorTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nvar VectorTile = /** @class */ (function (_super) {\n    __extends(VectorTile, _super);\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @param {string} src Data source url.\n     * @param {import(\"./format/Feature.js\").default} format Feature format.\n     * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n     * @param {import(\"./Tile.js\").Options=} opt_options Tile options.\n     */\n    function VectorTile(tileCoord, state, src, format, tileLoadFunction, opt_options) {\n        var _this = _super.call(this, tileCoord, state, o
 pt_options) || this;\n        /**\n         * Extent of this tile; set by the source.\n         * @type {import(\"./extent.js\").Extent}\n         */\n        _this.extent = null;\n        /**\n         * @private\n         * @type {import(\"./format/Feature.js\").default}\n         */\n        _this.format_ = format;\n        /**\n         * @private\n         * @type {Array<import(\"./Feature.js\").default>}\n         */\n        _this.features_ = null;\n        /**\n         * @private\n         * @type {import(\"./featureloader.js\").FeatureLoader}\n         */\n        _this.loader_;\n        /**\n         * Feature projection of this tile; set by the source.\n         * @type {import(\"./proj/Projection.js\").default}\n         */\n        _this.projection = null;\n        /**\n         * Resolution of this tile; set by the source.\n         * @type {number}\n         */\n        _this.resolution;\n        /**\n         * @private\n         * @type {import(\"./Tile.js\").LoadF
 unction}\n         */\n        _this.tileLoadFunction_ = tileLoadFunction;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.url_ = src;\n        return _this;\n    }\n    /**\n     * Get the feature format assigned for reading this tile's features.\n     * @return {import(\"./format/Feature.js\").default} Feature format.\n     * @api\n     */\n    VectorTile.prototype.getFormat = function () {\n        return this.format_;\n    };\n    /**\n     * Get the features for this tile. Geometries will be in the view projection.\n     * @return {Array<import(\"./Feature.js\").FeatureLike>} Features.\n     * @api\n     */\n    VectorTile.prototype.getFeatures = function () {\n        return this.features_;\n    };\n    /**\n     * @return {string} Key.\n     */\n    VectorTile.prototype.getKey = function () {\n        return this.url_;\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    VectorTile.prototype.load = function () {\n        if 
 (this.state == TileState.IDLE) {\n            this.setState(TileState.LOADING);\n            this.tileLoadFunction_(this, this.url_);\n            if (this.loader_) {\n                this.loader_(this.extent, this.resolution, this.projection);\n            }\n        }\n    };\n    /**\n     * Handler for successful tile load.\n     * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n     * @param {import(\"./proj/Projection.js\").default} dataProjection Data projection.\n     */\n    VectorTile.prototype.onLoad = function (features, dataProjection) {\n        this.setFeatures(features);\n    };\n    /**\n     * Handler for tile load errors.\n     */\n    VectorTile.prototype.onError = function () {\n        this.setState(TileState.ERROR);\n    };\n    /**\n     * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.\n     * Sets the features for the tile.\n     * @param {Array<import(\"./Feature.js\").default>} fe
 atures Features.\n     * @api\n     */\n    VectorTile.prototype.setFeatures = function (features) {\n        this.features_ = features;\n        this.setState(TileState.LOADED);\n    };\n    /**\n     * Set the feature loader for reading this tile's features.\n     * @param {import(\"./featureloader.js\").FeatureLoader} loader Feature loader.\n     * @api\n     */\n    VectorTile.prototype.setLoader = function (loader) {\n        this.loader_ = loader;\n    };\n    return VectorTile;\n}(Tile));\nexport default VectorTile;\n//# sourceMappingURL=VectorTile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendSt
 atics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/VectorRenderTile\n */\nimport Tile from './Tile.js';\nimport { createCanvasContext2D } from './dom.js';\nimport { getUid } from './util.js';\n/**\n * @typedef {Object} ReplayState\n * @property {boolean} dirty\n * @property {null|import(\"./render.js\").OrderFunction} renderedRenderOrder\n * @property {number} renderedTileRevision\n * @property {number} renderedResolution\n * @property {number} renderedRevision\n * @property {number} renderedZ\n * @property {number} renderedTileResolution\n * @property {number} renderedTileZ\n */\n/**\n * @type {Array<HTMLCanvasElement>}\n */\nvar canvasPool = [];\nvar VectorRenderTile = /** @class */ (function (_super) {\n    __extends(VectorRenderTile, _super);\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @
 param {import(\"./TileState.js\").default} state State.\n     * @param {import(\"./tilecoord.js\").TileCoord} urlTileCoord Wrapped tile coordinate for source urls.\n     * @param {function(VectorRenderTile):Array<import(\"./VectorTile\").default>} getSourceTiles Function\n     * to get source tiles for this tile.\n     */\n    function VectorRenderTile(tileCoord, state, urlTileCoord, getSourceTiles) {\n        var _this = _super.call(this, tileCoord, state, { transition: 0 }) || this;\n        /**\n         * @private\n         * @type {!Object<string, CanvasRenderingContext2D>}\n         */\n        _this.context_ = {};\n        /**\n         * Executor groups by layer uid. Entries are read/written by the renderer.\n         * @type {Object<string, Array<import(\"./render/canvas/ExecutorGroup.js\").default>>}\n         */\n        _this.executorGroups = {};\n        /**\n         * Number of loading source tiles. Read/written by the source.\n         * @type {number}\n         */\n
         _this.loadingSourceTiles = 0;\n        /**\n         * Tile keys of error source tiles. Read/written by the source.\n         * @type {Object<string, boolean>}\n         */\n        _this.errorSourceTileKeys = {};\n        /**\n         * @type {Object<number, ImageData>}\n         */\n        _this.hitDetectionImageData = {};\n        /**\n         * @private\n         * @type {!Object<string, ReplayState>}\n         */\n        _this.replayState_ = {};\n        /**\n         * @type {Array<import(\"./VectorTile.js\").default>}\n         */\n        _this.sourceTiles = null;\n        /**\n         * @type {number}\n         */\n        _this.wantedResolution;\n        /**\n         * @type {!function():Array<import(\"./VectorTile.js\").default>}\n         */\n        _this.getSourceTiles = getSourceTiles.bind(undefined, _this);\n        /**\n         * z of the source tiles of the last getSourceTiles call.\n         * @type {number}\n         */\n        _this.sourceZ = -1;
 \n        /**\n         * True when all tiles for this tile's nominal resolution are available.\n         * @type {boolean}\n         */\n        _this.hifi = false;\n        /**\n         * @type {import(\"./tilecoord.js\").TileCoord}\n         */\n        _this.wrappedTileCoord = urlTileCoord;\n        return _this;\n    }\n    /**\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {CanvasRenderingContext2D} The rendering context.\n     */\n    VectorRenderTile.prototype.getContext = function (layer) {\n        var key = getUid(layer);\n        if (!(key in this.context_)) {\n            this.context_[key] = createCanvasContext2D(1, 1, canvasPool);\n        }\n        return this.context_[key];\n    };\n    /**\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {boolean} Tile has a rendering context for the given layer.\n     */\n    VectorRenderTile.prototype.hasContext = function (layer) {\n        return getUid(lay
 er) in this.context_;\n    };\n    /**\n     * Get the Canvas for this tile.\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {HTMLCanvasElement} Canvas.\n     */\n    VectorRenderTile.prototype.getImage = function (layer) {\n        return this.hasContext(layer) ? this.getContext(layer).canvas : null;\n    };\n    /**\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {ReplayState} The replay state.\n     */\n    VectorRenderTile.prototype.getReplayState = function (layer) {\n        var key = getUid(layer);\n        if (!(key in this.replayState_)) {\n            this.replayState_[key] = {\n                dirty: false,\n                renderedRenderOrder: null,\n                renderedResolution: NaN,\n                renderedRevision: -1,\n                renderedTileResolution: NaN,\n                renderedTileRevision: -1,\n                renderedZ: -1,\n                renderedTileZ: -1,\n            };\n  
       }\n        return this.replayState_[key];\n    };\n    /**\n     * Load the tile.\n     */\n    VectorRenderTile.prototype.load = function () {\n        this.getSourceTiles();\n    };\n    /**\n     * Remove from the cache due to expiry\n     */\n    VectorRenderTile.prototype.release = function () {\n        for (var key in this.context_) {\n            canvasPool.push(this.context_[key].canvas);\n        }\n        _super.prototype.release.call(this);\n    };\n    return VectorRenderTile;\n}(Tile));\nexport default VectorRenderTile;\n//# sourceMappingURL=VectorRenderTile.js.map","/**\n * @module ol/source/VectorTile\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendSta
 tics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport Tile from '../VectorTile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport UrlTile from './UrlTile.js';\nimport VectorRenderTile from '../VectorRenderTile.js';\nimport { buffer as bufferExtent, getIntersection, intersects, } from '../extent.js';\nimport { createForProjection, createXYZ, extentFromProjection, } from '../tilegrid.js';\nimport { equals } from '../array.js';\nimport { fromKey, getKeyZXY } from '../tilecoord.js';\nimport { loadFeaturesXhr } from '../featureloader.js';\nimport { toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @proper
 ty {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least twice the number of tiles in the viewport.\n * @property {import(\"../extent.js\").Extent} [extent]\n * @property {import(\"../format/Feature.js\").default} [format] Feature format for tiles. Used and required by the default.\n * @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this\n * to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection of the tile grid.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {typeof import(\"../VectorTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/VectorTile
 }.\n * @property {number} [maxZoom=22] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number|import(\"../size.js\").Size} [tileSize=512] Optional tile size. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. Could look like this for pbf tiles:\n * ```js\n * function(tile, url) {\n *   tile.setLoader(function(extent, resolution, projection) {\n *     fetch(url).then(function(response) {\n *       response.arrayBuffer().then(function(data) {\n *         const format = tile.getFormat() // ol/format/MVT configured as source format\n *         const features = form
 at.readFeatures(data, {\n *           extent: extent,\n *           featureProjection: projection\n *         });\n *         tile.setFeatures(features);\n *       });\n *     });\n *   });\n * }\n * ```\n * If you do not need extent, resolution and projection to get the features for a tile (e.g.\n * for GeoJSON tiles), your `tileLoadFunction` does not need a `setLoader()` call. Only make sure\n * to call `setFeatures()` on the tile:\n * ```js\n * const format = new GeoJSON({featureProjection: map.getView().getProjection()});\n * async function tileLoadFunction(tile, url) {\n *   const response = await fetch(url);\n *   const data = await response.json();\n *   tile.setFeatures(format.readFeatures(data));\n * }\n * ```\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` tem
 plate pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {number} [transition] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When set to `true`, tiles will be wrapped horizontally to\n * render multiple worlds.\n * @property {number} [zDirection=1] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n/**\n * @classdesc\n * Class for layer sources providing vector data divided into a tile grid, to be\
 n * used with {@link module:ol/layer/VectorTile~VectorTile}. Although this source receives tiles\n * with vector features from the server, it is not meant for feature editing.\n * Features are optimized for rendering, their geometries are clipped at or near\n * tile boundaries and simplified for a view resolution. See\n * {@link module:ol/source/Vector} for vector sources that are suitable for feature\n * editing.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nvar VectorTile = /** @class */ (function (_super) {\n    __extends(VectorTile, _super);\n    /**\n     * @param {!Options} options Vector tile options.\n     */\n    function VectorTile(options) {\n        var _this = this;\n        var projection = options.projection || 'EPSG:3857';\n        var extent = options.extent || extentFromProjection(projection);\n        var tileGrid = options.tileGrid ||\n            createXYZ({\n                extent: extent,\n                maxResolution: options.maxResolut
 ion,\n                maxZoom: options.maxZoom !== undefined ? options.maxZoom : 22,\n                minZoom: options.minZoom,\n                tileSize: options.tileSize || 512,\n            });\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            cacheSize: options.cacheSize,\n            opaque: false,\n            projection: projection,\n            state: options.state,\n            tileGrid: tileGrid,\n            tileLoadFunction: options.tileLoadFunction\n                ? options.tileLoadFunction\n                : defaultLoadFunction,\n            tileUrlFunction: options.tileUrlFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX === undefined ? true : options.wrapX,\n            transition: options.transition,\n            zDirection: options.zDirection === undefined ? 1 : options.zDirection,\n      
   }) || this;\n        /**\n         * @private\n         * @type {import(\"../format/Feature.js\").default}\n         */\n        _this.format_ = options.format ? options.format : null;\n        /**\n         * @type {Object<string, import(\"./VectorTile\").default>}\n         */\n        _this.loadingTiles_ = {};\n        /**\n         * @private\n         * @type {TileCache}\n         */\n        _this.sourceTileCache = new TileCache(_this.tileCache.highWaterMark);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;\n        /**\n         * @protected\n         * @type {typeof import(\"../VectorTile.js\").default}\n         */\n        _this.tileClass = options.tileClass ? options.tileClass : Tile;\n        /**\n         * @private\n         * @type {Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n         */\n        _this.tileGrids_ = {};\n        return _thi
 s;\n    }\n    /**\n     * Get features whose bounding box intersects the provided extent. Only features for cached\n     * tiles for the last rendered zoom level are available in the source. So this method is only\n     * suitable for requesting tiles for extents that are currently rendered.\n     *\n     * Features are returned in random tile order and as they are included in the tiles. This means\n     * they can be clipped, duplicated across tiles, and simplified to the render resolution.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n     * @api\n     */\n    VectorTile.prototype.getFeaturesInExtent = function (extent) {\n        var features = [];\n        var tileCache = this.tileCache;\n        if (tileCache.getCount() === 0) {\n            return features;\n        }\n        var z = fromKey(tileCache.peekFirstKey())[0];\n        var tileGrid = this.tileGrid;\n        tileCach
 e.forEach(function (tile) {\n            if (tile.tileCoord[0] !== z || tile.getState() !== TileState.LOADED) {\n                return;\n            }\n            var sourceTiles = tile.getSourceTiles();\n            for (var i = 0, ii = sourceTiles.length; i < ii; ++i) {\n                var sourceTile = sourceTiles[i];\n                var tileCoord = sourceTile.tileCoord;\n                if (intersects(extent, tileGrid.getTileCoordExtent(tileCoord))) {\n                    var tileFeatures = sourceTile.getFeatures();\n                    if (tileFeatures) {\n                        for (var j = 0, jj = tileFeatures.length; j < jj; ++j) {\n                            var candidate = tileFeatures[j];\n                            var geometry = candidate.getGeometry();\n                            if (intersects(extent, geometry.getExtent())) {\n                                features.push(candidate);\n                            }\n                        }\n                   
  }\n                }\n            }\n        });\n        return features;\n    };\n    /**\n     * @return {boolean} The source can have overlapping geometries.\n     */\n    VectorTile.prototype.getOverlaps = function () {\n        return this.overlaps_;\n    };\n    /**\n     * clear {@link module:ol/TileCache~TileCache} and delete all source tiles\n     * @api\n     */\n    VectorTile.prototype.clear = function () {\n        this.tileCache.clear();\n        this.sourceTileCache.clear();\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {!Object<string, boolean>} usedTiles Used tiles.\n     */\n    VectorTile.prototype.expireCache = function (projection, usedTiles) {\n        _super.prototype.expireCache.call(this, projection, usedTiles);\n        this.sourceTileCache.expireCache({});\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection\").default} projection P
 rojection.\n     * @param {VectorRenderTile} tile Vector image tile.\n     * @return {Array<import(\"../VectorTile\").default>} Tile keys.\n     */\n    VectorTile.prototype.getSourceTiles = function (pixelRatio, projection, tile) {\n        var urlTileCoord = tile.wrappedTileCoord;\n        var tileGrid = this.getTileGridForProjection(projection);\n        var extent = tileGrid.getTileCoordExtent(urlTileCoord);\n        var z = urlTileCoord[0];\n        var resolution = tileGrid.getResolution(z);\n        // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n        bufferExtent(extent, -resolution, extent);\n        var sourceTileGrid = this.tileGrid;\n        var sourceExtent = sourceTileGrid.getExtent();\n        if (sourceExtent) {\n            getIntersection(extent, sourceExtent, extent);\n        }\n        var sourceZ = sourceTileGrid.getZForResolution(resolution, 1);\n        var minZoom = sourceTileGrid.getMinZoom();\n        var previousSour
 ceTiles = tile.sourceTiles;\n        var sourceTiles, covered, loadedZ;\n        if (previousSourceTiles &&\n            previousSourceTiles.length > 0 &&\n            previousSourceTiles[0].tileCoord[0] === sourceZ) {\n            sourceTiles = previousSourceTiles;\n            covered = true;\n            loadedZ = sourceZ;\n        }\n        else {\n            sourceTiles = [];\n            loadedZ = sourceZ + 1;\n            do {\n                --loadedZ;\n                covered = true;\n                sourceTileGrid.forEachTileCoord(extent, loadedZ, function (sourceTileCoord) {\n                    var tileUrl = this.tileUrlFunction(sourceTileCoord, pixelRatio, projection);\n                    var sourceTile;\n                    if (tileUrl !== undefined) {\n                        if (this.sourceTileCache.containsKey(tileUrl)) {\n                            sourceTile = this.sourceTileCache.get(tileUrl);\n                            var state = sourceTile.getState();\n
                             if (state === TileState.LOADED ||\n                                state === TileState.ERROR ||\n                                state === TileState.EMPTY) {\n                                sourceTiles.push(sourceTile);\n                                return;\n                            }\n                        }\n                        else if (loadedZ === sourceZ) {\n                            sourceTile = new this.tileClass(sourceTileCoord, TileState.IDLE, tileUrl, this.format_, this.tileLoadFunction);\n                            sourceTile.extent = sourceTileGrid.getTileCoordExtent(sourceTileCoord);\n                            sourceTile.projection = projection;\n                            sourceTile.resolution = sourceTileGrid.getResolution(sourceTileCoord[0]);\n                            this.sourceTileCache.set(tileUrl, sourceTile);\n                            sourceTile.addEventListener(EventType.CHANGE, this.handleTileChange.bind(this
 ));\n                            sourceTile.load();\n                        }\n                    }\n                    covered =\n                        covered &&\n                            sourceTile &&\n                            sourceTile.getState() === TileState.LOADED;\n                    if (!sourceTile) {\n                        return;\n                    }\n                    if (sourceTile.getState() !== TileState.EMPTY &&\n                        tile.getState() === TileState.IDLE) {\n                        tile.loadingSourceTiles++;\n                        sourceTile.addEventListener(EventType.CHANGE, function listenChange() {\n                            var state = sourceTile.getState();\n                            var sourceTileKey = sourceTile.getKey();\n                            if (state === TileState.LOADED || state === TileState.ERROR) {\n                                if (state === TileState.LOADED) {\n                                    sour
 ceTile.removeEventListener(EventType.CHANGE, listenChange);\n                                    tile.loadingSourceTiles--;\n                                    delete tile.errorSourceTileKeys[sourceTileKey];\n                                }\n                                else if (state === TileState.ERROR) {\n                                    tile.errorSourceTileKeys[sourceTileKey] = true;\n                                }\n                                var errorTileCount = Object.keys(tile.errorSourceTileKeys)\n                                    .length;\n                                if (tile.loadingSourceTiles - errorTileCount === 0) {\n                                    tile.hifi = errorTileCount === 0;\n                                    tile.sourceZ = sourceZ;\n                                    tile.setState(TileState.LOADED);\n                                }\n                            }\n                        });\n                    }\n                
 }.bind(this));\n                if (!covered) {\n                    sourceTiles.length = 0;\n                }\n            } while (!covered && loadedZ > minZoom);\n        }\n        if (tile.getState() === TileState.IDLE) {\n            tile.setState(TileState.LOADING);\n        }\n        if (covered) {\n            tile.hifi = sourceZ === loadedZ;\n            tile.sourceZ = loadedZ;\n            if (tile.getState() < TileState.LOADED) {\n                tile.setState(TileState.LOADED);\n            }\n            else if (!previousSourceTiles ||\n                !equals(sourceTiles, previousSourceTiles)) {\n                tile.sourceTiles = sourceTiles;\n            }\n        }\n        return sourceTiles;\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Pr
 ojection.\n     * @return {!VectorRenderTile} Tile.\n     */\n    VectorTile.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        var coordKey = getKeyZXY(z, x, y);\n        var key = this.getKey();\n        var tile;\n        if (this.tileCache.containsKey(coordKey)) {\n            tile = this.tileCache.get(coordKey);\n            if (tile.key === key) {\n                return tile;\n            }\n        }\n        var tileCoord = [z, x, y];\n        var urlTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n        var sourceExtent = this.getTileGrid().getExtent();\n        var tileGrid = this.getTileGridForProjection(projection);\n        if (urlTileCoord && sourceExtent) {\n            var tileExtent = tileGrid.getTileCoordExtent(urlTileCoord);\n            // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n            bufferExtent(tileExtent, -tileGrid.getResolution(z), tileExtent);\n            if (!
 intersects(sourceExtent, tileExtent)) {\n                urlTileCoord = null;\n            }\n        }\n        var empty = true;\n        if (urlTileCoord !== null) {\n            var sourceTileGrid = this.tileGrid;\n            var resolution = tileGrid.getResolution(z);\n            var sourceZ = sourceTileGrid.getZForResolution(resolution, 1);\n            // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n            var extent = tileGrid.getTileCoordExtent(urlTileCoord);\n            bufferExtent(extent, -resolution, extent);\n            sourceTileGrid.forEachTileCoord(extent, sourceZ, function (sourceTileCoord) {\n                empty =\n                    empty &&\n                        !this.tileUrlFunction(sourceTileCoord, pixelRatio, projection);\n            }.bind(this));\n        }\n        var newTile = new VectorRenderTile(tileCoord, empty ? TileState.EMPTY : TileState.IDLE, urlTileCoord, this.getSourceTiles.bind(this, pixelRati
 o, projection));\n        newTile.key = key;\n        if (tile) {\n            newTile.interimTile = tile;\n            newTile.refreshInterimChain();\n            this.tileCache.replace(coordKey, newTile);\n        }\n        else {\n            this.tileCache.set(coordKey, newTile);\n        }\n        return newTile;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     */\n    VectorTile.prototype.getTileGridForProjection = function (projection) {\n        var code = projection.getCode();\n        var tileGrid = this.tileGrids_[code];\n        if (!tileGrid) {\n            // A tile grid that matches the tile size of the source tile grid is more\n            // likely to have 1:1 relationships between source tiles and rendered tiles.\n            var sourceTileGrid = this.tileGrid;\n            tileGrid = createForProjection(projection, undefined, sourceTi
 leGrid\n                ? sourceTileGrid.getTileSize(sourceTileGrid.getMinZoom())\n                : undefined);\n            this.tileGrids_[code] = tileGrid;\n        }\n        return tileGrid;\n    };\n    /**\n     * Get the tile pixel ratio for this source.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     */\n    VectorTile.prototype.getTilePixelRatio = function (pixelRatio) {\n        return pixelRatio;\n    };\n    /**\n     * @param {number} z Z.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../size.js\").Size} Tile size.\n     */\n    VectorTile.prototype.getTilePixelSize = function (z, pixelRatio, projection) {\n        var tileGrid = this.getTileGridForProjection(projection);\n        var tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n        return [\n            Math.round(tileSize[0] * pixelRatio),\n 
            Math.round(tileSize[1] * pixelRatio),\n        ];\n    };\n    /**\n     * Increases the cache size if needed\n     * @param {number} tileCount Minimum number of tiles needed.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    VectorTile.prototype.updateCacheSize = function (tileCount, projection) {\n        _super.prototype.updateCacheSize.call(this, tileCount * 2, projection);\n    };\n    return VectorTile;\n}(UrlTile));\nexport default VectorTile;\n/**\n * Sets the loader for a tile.\n * @param {import(\"../VectorTile.js\").default} tile Vector tile.\n * @param {string} url URL.\n */\nexport function defaultLoadFunction(tile, url) {\n    var loader = loadFeaturesXhr(url, tile.getFormat(), tile.onLoad.bind(tile), tile.onError.bind(tile));\n    tile.setLoader(loader);\n}\n//# sourceMappingURL=VectorTile.js.map","/**\n * @module ol/source/WMTSRequestEncoding\n */\n/**\n * Request encoding. One of 'KVP', 'REST'.\n * @enum {stri
 ng}\n */\nexport default {\n    KVP: 'KVP',\n    REST: 'REST',\n};\n//# sourceMappingURL=WMTSRequestEncoding.js.map","/**\n * @module ol/source/WMTS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileImage from './TileImage.js';\nimport WMTSRequestEncoding from './WMTSRequestEncoding.js';\nimport { appendParams } from '../uri.js';\nimport { assign } from '../obj.js';\nimport { createFromCapabilitiesMatrixSet } from '../tilegrid/
 WMTS.js';\nimport { createFromTileUrlFunctions, expandUrl } from '../tileurlfunction.js';\nimport { equivalent, get as getProjection } from '../proj.js';\nimport { find, findIndex, includes } from '../array.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../tilegrid/WMTS.js\").default} tileGrid Tile grid.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the 
 view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./WMTSRequestEncoding.js\").default|string} [requestEncoding='KVP'] Request encoding.\n * @property {string} layer Layer name as advertised in the WMTS capabilities.\n * @property {string} style Style name as advertised in the WMTS capabilities.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass]  Class used to instantiate image tiles. Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {string} [format='image/jpeg'] Image format. Only used when `requestEncoding`
  is `'KVP'`.\n * @property {string} [version='1.0.0'] WMTS version.\n * @property {string} matrixSet Matrix set.\n * @property {!Object} [dimensions] Additional \"dimensions\" for tile requests.\n * This is an object with properties named like the advertised WMTS dimensions.\n * @property {string} [url]  A URL for the service.\n * For the RESTful request encoding, this is a URL\n * template.  For KVP encoding, it is normal URL. A `{?-?}` template pattern,\n * for example `subdomain{a-f}.domain.com`, may be used instead of defining\n * each one separately in the `urls` option.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {Array<string>} [urls] An array of URLs.\n * Requests will be distributed among the URLs in this array.\n * @property {boolean} [wrapX=false] Whether to wrap the world horizo
 ntally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n/**\n * @classdesc\n * Layer source for tile data from WMTS servers.\n * @api\n */\nvar WMTS = /** @class */ (function (_super) {\n    __extends(WMTS, _super);\n    /**\n     * @param {Options} options WMTS options.\n     */\n    function WMTS(options) {\n        // TODO: add support for TileMatrixLimits\n        var _this = this;\n        var requestEncoding = options.requestEncoding !== undefined\n            ? /** @type {import(\"./WMTSRequestEncoding.js\").default} */ (options.requestEncoding)\n            : WMTSRequestEncoding.KVP;\n        // FIXME: should we create a default tileGrid?\n        // we could issue a getCapabilities xhr to retrieve missing configuration\n        var tileGrid = options.tileGrid;\n        var urls = options.urls;\n        if (urls === undefined && options.url !== undefined) {\n            u
 rls = expandUrl(options.url);\n        }\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileClass: options.tileClass,\n            tileGrid: tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n            tilePixelRatio: options.tilePixelRatio,\n            urls: urls,\n            wrapX: options.wrapX !== undefined ? options.wrapX : false,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.version_ = options.version !== undefined ? options.version : '1.0.0';\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.format_
  = options.format !== undefined ? options.format : 'image/jpeg';\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.dimensions_ =\n            options.dimensions !== undefined ? options.dimensions : {};\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.layer_ = options.layer;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.matrixSet_ = options.matrixSet;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.style_ = options.style;\n        // FIXME: should we guess this requestEncoding from options.url(s)\n        //        structure? that would mean KVP only if a template is not provided.\n        /**\n         * @private\n         * @type {import(\"./WMTSRequestEncoding.js\").default}\n         */\n        _this.requestEncoding_ = requestEncoding;\n        _this.setKey(_this.getKeyForDimensions_());\n        if (urls && urls.leng
 th > 0) {\n            _this.tileUrlFunction = createFromTileUrlFunctions(urls.map(_this.createFromWMTSTemplate.bind(_this)));\n        }\n        return _this;\n    }\n    /**\n     * Set the URLs to use for requests.\n     * URLs may contain OGC conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.\n     * @param {Array<string>} urls URLs.\n     */\n    WMTS.prototype.setUrls = function (urls) {\n        this.urls = urls;\n        var key = urls.join('\\n');\n        this.setTileUrlFunction(createFromTileUrlFunctions(urls.map(this.createFromWMTSTemplate.bind(this))), key);\n    };\n    /**\n     * Get the dimensions, i.e. those passed to the constructor through the\n     * \"dimensions\" option, and possibly updated using the updateDimensions\n     * method.\n     * @return {!Object} Dimensions.\n     * @api\n     */\n    WMTS.prototype.getDimensions = function () {\n        return this.dimensions_;\n    };\n    /**\n     * Return the image format of the WMTS source.
 \n     * @return {string} Format.\n     * @api\n     */\n    WMTS.prototype.getFormat = function () {\n        return this.format_;\n    };\n    /**\n     * Return the layer of the WMTS source.\n     * @return {string} Layer.\n     * @api\n     */\n    WMTS.prototype.getLayer = function () {\n        return this.layer_;\n    };\n    /**\n     * Return the matrix set of the WMTS source.\n     * @return {string} MatrixSet.\n     * @api\n     */\n    WMTS.prototype.getMatrixSet = function () {\n        return this.matrixSet_;\n    };\n    /**\n     * Return the request encoding, either \"KVP\" or \"REST\".\n     * @return {import(\"./WMTSRequestEncoding.js\").default} Request encoding.\n     * @api\n     */\n    WMTS.prototype.getRequestEncoding = function () {\n        return this.requestEncoding_;\n    };\n    /**\n     * Return the style of the WMTS source.\n     * @return {string} Style.\n     * @api\n     */\n    WMTS.prototype.getStyle = function () {\n        return this.style_;
 \n    };\n    /**\n     * Return the version of the WMTS source.\n     * @return {string} Version.\n     * @api\n     */\n    WMTS.prototype.getVersion = function () {\n        return this.version_;\n    };\n    /**\n     * @private\n     * @return {string} The key for the current dimensions.\n     */\n    WMTS.prototype.getKeyForDimensions_ = function () {\n        var i = 0;\n        var res = [];\n        for (var key in this.dimensions_) {\n            res[i++] = key + '-' + this.dimensions_[key];\n        }\n        return res.join('/');\n    };\n    /**\n     * Update the dimensions.\n     * @param {Object} dimensions Dimensions.\n     * @api\n     */\n    WMTS.prototype.updateDimensions = function (dimensions) {\n        assign(this.dimensions_, dimensions);\n        this.setKey(this.getKeyForDimensions_());\n    };\n    /**\n     * @param {string} template Template.\n     * @return {import(\"../Tile.js\").UrlFunction} Tile URL function.\n     */\n    WMTS.prototype.createFro
 mWMTSTemplate = function (template) {\n        var requestEncoding = this.requestEncoding_;\n        // context property names are lower case to allow for a case insensitive\n        // replacement as some services use different naming conventions\n        var context = {\n            'layer': this.layer_,\n            'style': this.style_,\n            'tilematrixset': this.matrixSet_,\n        };\n        if (requestEncoding == WMTSRequestEncoding.KVP) {\n            assign(context, {\n                'Service': 'WMTS',\n                'Request': 'GetTile',\n                'Version': this.version_,\n                'Format': this.format_,\n            });\n        }\n        // TODO: we may want to create our own appendParams function so that params\n        // order conforms to wmts spec guidance, and so that we can avoid to escape\n        // special template params\n        template =\n            requestEncoding == WMTSRequestEncoding.KVP\n                ? appendParams(temp
 late, context)\n                : template.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n                    return p.toLowerCase() in context ? context[p.toLowerCase()] : m;\n                });\n        var tileGrid = /** @type {import(\"../tilegrid/WMTS.js\").default} */ (this\n            .tileGrid);\n        var dimensions = this.dimensions_;\n        return (\n        /**\n         * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n         * @param {number} pixelRatio Pixel ratio.\n         * @param {import(\"../proj/Projection.js\").default} projection Projection.\n         * @return {string|undefined} Tile URL.\n         */\n        function (tileCoord, pixelRatio, projection) {\n            if (!tileCoord) {\n                return undefined;\n            }\n            else {\n                var localContext_1 = {\n                    'TileMatrix': tileGrid.getMatrixId(tileCoord[0]),\n                    'TileCol': tileCoord[1],\n                
     'TileRow': tileCoord[2],\n                };\n                assign(localContext_1, dimensions);\n                var url = template;\n                if (requestEncoding == WMTSRequestEncoding.KVP) {\n                    url = appendParams(url, localContext_1);\n                }\n                else {\n                    url = url.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n                        return localContext_1[p];\n                    });\n                }\n                return url;\n            }\n        });\n    };\n    return WMTS;\n}(TileImage));\nexport default WMTS;\n/**\n * Generate source options from a capabilities object.\n * @param {Object} wmtsCap An object representing the capabilities document.\n * @param {!Object} config Configuration properties for the layer.  Defaults for\n *                  the layer will apply if not provided.\n *\n * Required config properties:\n *  - layer - {string} The layer identifier.\n *\n * Optional config propertie
 s:\n *  - matrixSet - {string} The matrix set identifier, required if there is\n *       more than one matrix set in the layer capabilities.\n *  - projection - {string} The desired CRS when no matrixSet is specified.\n *       eg: \"EPSG:3857\". If the desired projection is not available,\n *       an error is thrown.\n *  - requestEncoding - {string} url encoding format for the layer. Default is\n *       the first tile url format found in the GetCapabilities response.\n *  - style - {string} The name of the style\n *  - format - {string} Image format for the layer. Default is the first\n *       format returned in the GetCapabilities response.\n *  - crossOrigin - {string|null|undefined} Cross origin. Default is `undefined`.\n * @return {?Options} WMTS source options object or `null` if the layer was not found.\n * @api\n */\nexport function optionsFromCapabilities(wmtsCap, config) {\n    var layers = wmtsCap['Contents']['Layer'];\n    var l = find(layers, function (elt, index, a
 rray) {\n        return elt['Identifier'] == config['layer'];\n    });\n    if (l === null) {\n        return null;\n    }\n    var tileMatrixSets = wmtsCap['Contents']['TileMatrixSet'];\n    var idx;\n    if (l['TileMatrixSetLink'].length > 1) {\n        if ('projection' in config) {\n            idx = findIndex(l['TileMatrixSetLink'], function (elt, index, array) {\n                var tileMatrixSet = find(tileMatrixSets, function (el) {\n                    return el['Identifier'] == elt['TileMatrixSet'];\n                });\n                var supportedCRS = tileMatrixSet['SupportedCRS'];\n                var proj1 = getProjection(supportedCRS.replace(/urn:ogc:def:crs:(\\w+):(.*:)?(\\w+)$/, '$1:$3')) || getProjection(supportedCRS);\n                var proj2 = getProjection(config['projection']);\n                if (proj1 && proj2) {\n                    return equivalent(proj1, proj2);\n                }\n                else {\n                    return supportedCRS == con
 fig['projection'];\n                }\n            });\n        }\n        else {\n            idx = findIndex(l['TileMatrixSetLink'], function (elt, index, array) {\n                return elt['TileMatrixSet'] == config['matrixSet'];\n            });\n        }\n    }\n    else {\n        idx = 0;\n    }\n    if (idx < 0) {\n        idx = 0;\n    }\n    var matrixSet = \n    /** @type {string} */\n    (l['TileMatrixSetLink'][idx]['TileMatrixSet']);\n    var matrixLimits = \n    /** @type {Array<Object>} */\n    (l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']);\n    var format = /** @type {string} */ (l['Format'][0]);\n    if ('format' in config) {\n        format = config['format'];\n    }\n    idx = findIndex(l['Style'], function (elt, index, array) {\n        if ('style' in config) {\n            return elt['Title'] == config['style'];\n        }\n        else {\n            return elt['isDefault'];\n        }\n    });\n    if (idx < 0) {\n        idx = 0;\n    }\n    var sty
 le = /** @type {string} */ (l['Style'][idx]['Identifier']);\n    var dimensions = {};\n    if ('Dimension' in l) {\n        l['Dimension'].forEach(function (elt, index, array) {\n            var key = elt['Identifier'];\n            var value = elt['Default'];\n            if (value === undefined) {\n                value = elt['Value'][0];\n            }\n            dimensions[key] = value;\n        });\n    }\n    var matrixSets = wmtsCap['Contents']['TileMatrixSet'];\n    var matrixSetObj = find(matrixSets, function (elt, index, array) {\n        return elt['Identifier'] == matrixSet;\n    });\n    var projection;\n    var code = matrixSetObj['SupportedCRS'];\n    if (code) {\n        projection =\n            getProjection(code.replace(/urn:ogc:def:crs:(\\w+):(.*:)?(\\w+)$/, '$1:$3')) || getProjection(code);\n    }\n    if ('projection' in config) {\n        var projConfig = getProjection(config['projection']);\n        if (projConfig) {\n            if (!projection || equivale
 nt(projConfig, projection)) {\n                projection = projConfig;\n            }\n        }\n    }\n    var wrapX = false;\n    var switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';\n    var matrix = matrixSetObj.TileMatrix[0];\n    // create default matrixLimit\n    var selectedMatrixLimit = {\n        MinTileCol: 0,\n        MinTileRow: 0,\n        // substract one to end up at tile top left\n        MaxTileCol: matrix.MatrixWidth - 1,\n        MaxTileRow: matrix.MatrixHeight - 1,\n    };\n    //in case of matrix limits, use matrix limits to calculate extent\n    if (matrixLimits) {\n        selectedMatrixLimit = matrixLimits[matrixLimits.length - 1];\n        matrix = find(matrixSetObj.TileMatrix, function (value) { return value.Identifier === selectedMatrixLimit.TileMatrix; });\n    }\n    var resolution = (matrix.ScaleDenominator * 0.00028) / projection.getMetersPerUnit(); // WMTS 1.0.0: standardized rendering pixel size\n    var origin = switchOrigin
 XY\n        ? [matrix.TopLeftCorner[1], matrix.TopLeftCorner[0]]\n        : matrix.TopLeftCorner;\n    var tileSpanX = matrix.TileWidth * resolution;\n    var tileSpanY = matrix.TileHeight * resolution;\n    var extent = [\n        origin[0] + tileSpanX * selectedMatrixLimit.MinTileCol,\n        // add one to get proper bottom/right coordinate\n        origin[1] - tileSpanY * (1 + selectedMatrixLimit.MaxTileRow),\n        origin[0] + tileSpanX * (1 + selectedMatrixLimit.MaxTileCol),\n        origin[1] - tileSpanY * selectedMatrixLimit.MinTileRow,\n    ];\n    if (projection.getExtent() === null) {\n        projection.setExtent(extent);\n    }\n    var tileGrid = createFromCapabilitiesMatrixSet(matrixSetObj, extent, matrixLimits);\n    /** @type {!Array<string>} */\n    var urls = [];\n    var requestEncoding = config['requestEncoding'];\n    requestEncoding = requestEncoding !== undefined ? requestEncoding : '';\n    if ('OperationsMetadata' in wmtsCap &&\n        'GetTile' in wmtsC
 ap['OperationsMetadata']) {\n        var gets = wmtsCap['OperationsMetadata']['GetTile']['DCP']['HTTP']['Get'];\n        for (var i = 0, ii = gets.length; i < ii; ++i) {\n            if (gets[i]['Constraint']) {\n                var constraint = find(gets[i]['Constraint'], function (element) {\n                    return element['name'] == 'GetEncoding';\n                });\n                var encodings = constraint['AllowedValues']['Value'];\n                if (requestEncoding === '') {\n                    // requestEncoding not provided, use the first encoding from the list\n                    requestEncoding = encodings[0];\n                }\n                if (requestEncoding === WMTSRequestEncoding.KVP) {\n                    if (includes(encodings, WMTSRequestEncoding.KVP)) {\n                        urls.push(/** @type {string} */ (gets[i]['href']));\n                    }\n                }\n                else {\n                    break;\n                }\n      
       }\n            else if (gets[i]['href']) {\n                requestEncoding = WMTSRequestEncoding.KVP;\n                urls.push(/** @type {string} */ (gets[i]['href']));\n            }\n        }\n    }\n    if (urls.length === 0) {\n        requestEncoding = WMTSRequestEncoding.REST;\n        l['ResourceURL'].forEach(function (element) {\n            if (element['resourceType'] === 'tile') {\n                format = element['format'];\n                urls.push(/** @type {string} */ (element['template']));\n            }\n        });\n    }\n    return {\n        urls: urls,\n        layer: config['layer'],\n        matrixSet: matrixSet,\n        format: format,\n        projection: projection,\n        requestEncoding: requestEncoding,\n        tileGrid: tileGrid,\n        style: style,\n        dimensions: dimensions,\n        wrapX: wrapX,\n        crossOrigin: config['crossOrigin'],\n    };\n}\n//# sourceMappingURL=WMTS.js.map","var __extends = (this && this.__extends)
  || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/BaseVector\n */\nimport Layer from './Layer.js';\nimport { assign } from '../obj.js';\nimport { createDefaultStyle, toFunction as toStyleFunction, } from '../style/Style.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @prop
 erty {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [
 renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text.
  Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {import(\"../style/Style.js\").StyleLike|null} [style] Layer style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style} for default style\n * which will be used if this is not set.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will\n * be recreated during animations. This means that no vectors will be shown clipped, but the\n * setting will have a performance impact for large amounts of vector data. When set to `false`,\n * batches will be recreated when no animation is active.\n * @property {boolean} [updateW
 hileInteracting=false] When set to `true`, feature batches will\n * be recreated during interactions. See also `updateWhileAnimating`.\n */\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    RENDER_ORDER: 'renderOrder',\n};\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Vector.js\").default|import(\"../source/VectorTile.js\").default} VectorSourceType\n * @extends {Layer<VectorSourceType>}\n * @api\n */\nvar BaseVectorLayer = /** @class */ (function (_super) {\n    __extends(BaseVectorLayer, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function BaseVectorLayer(opt_options) {\n        var _this = this;\n        var options = opt_options
  ? opt_options : {};\n        var baseOptions = assign({}, options);\n        delete baseOptions.style;\n        delete baseOptions.renderBuffer;\n        delete baseOptions.updateWhileAnimating;\n        delete baseOptions.updateWhileInteracting;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.declutter_ =\n            options.declutter !== undefined ? options.declutter : false;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.renderBuffer_ =\n            options.renderBuffer !== undefined ? options.renderBuffer : 100;\n        /**\n         * User provided style.\n         * @type {import(\"../style/Style.js\").StyleLike}\n         * @private\n         */\n        _this.style_ = null;\n        /**\n         * Style function for use within the library.\n         * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n         * @private
 \n         */\n        _this.styleFunction_ = undefined;\n        _this.setStyle(options.style);\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.updateWhileAnimating_ =\n            options.updateWhileAnimating !== undefined\n                ? options.updateWhileAnimating\n                : false;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.updateWhileInteracting_ =\n            options.updateWhileInteracting !== undefined\n                ? options.updateWhileInteracting\n                : false;\n        return _this;\n    }\n    /**\n     * @return {boolean} Declutter.\n     */\n    BaseVectorLayer.prototype.getDeclutter = function () {\n        return this.declutter_;\n    };\n    /**\n     * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n     * that resolves with an array of features. The array will either contain the topmost feature\n     * when 
 a hit was detected, or it will be empty.\n     *\n     * The hit detection algorithm used for this method is optimized for performance, but is less\n     * accurate than the one used in {@link import(\"../PluggableMap.js\").default#getFeaturesAtPixel}: Text\n     * is not considered, and icons are only represented by their bounding box instead of the exact\n     * image.\n     *\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with an array of features.\n     * @api\n     */\n    BaseVectorLayer.prototype.getFeatures = function (pixel) {\n        return _super.prototype.getFeatures.call(this, pixel);\n    };\n    /**\n     * @return {number|undefined} Render buffer.\n     */\n    BaseVectorLayer.prototype.getRenderBuffer = function () {\n        return this.renderBuffer_;\n    };\n    /**\n     * @return {function(import(\"../Feature.js\").default, import(\"../Feature.js\").default): nu
 mber|null|undefined} Render\n     *     order.\n     */\n    BaseVectorLayer.prototype.getRenderOrder = function () {\n        return /** @type {import(\"../render.js\").OrderFunction|null|undefined} */ (this.get(Property.RENDER_ORDER));\n    };\n    /**\n     * Get the style for features.  This returns whatever was passed to the `style`\n     * option at construction or to the `setStyle` method.\n     * @return {import(\"../style/Style.js\").StyleLike|null|undefined} Layer style.\n     * @api\n     */\n    BaseVectorLayer.prototype.getStyle = function () {\n        return this.style_;\n    };\n    /**\n     * Get the style function.\n     * @return {import(\"../style/Style.js\").StyleFunction|undefined} Layer style function.\n     * @api\n     */\n    BaseVectorLayer.prototype.getStyleFunction = function () {\n        return this.styleFunction_;\n    };\n    /**\n     * @return {boolean} Whether the rendered layer should be updated while\n     *     animating.\n     */\n    BaseVec
 torLayer.prototype.getUpdateWhileAnimating = function () {\n        return this.updateWhileAnimating_;\n    };\n    /**\n     * @return {boolean} Whether the rendered layer should be updated while\n     *     interacting.\n     */\n    BaseVectorLayer.prototype.getUpdateWhileInteracting = function () {\n        return this.updateWhileInteracting_;\n    };\n    /**\n     * @param {import(\"../render.js\").OrderFunction|null|undefined} renderOrder\n     *     Render order.\n     */\n    BaseVectorLayer.prototype.setRenderOrder = function (renderOrder) {\n        this.set(Property.RENDER_ORDER, renderOrder);\n    };\n    /**\n     * Set the style for features.  This can be a single style object, an array\n     * of styles, or a function that takes a feature and resolution and returns\n     * an array of styles. If set to `null`, the layer has no style (a `null` style),\n     * so only features that have their own styles will be rendered in the layer. Call\n     * `setStyle()` without a
 rguments to reset to the default style. See\n     * {@link module:ol/style} for information on the default style.\n     * @param {(import(\"../style/Style.js\").StyleLike|null)=} opt_style Layer style.\n     * @api\n     */\n    BaseVectorLayer.prototype.setStyle = function (opt_style) {\n        this.style_ = opt_style !== undefined ? opt_style : createDefaultStyle;\n        this.styleFunction_ =\n            opt_style === null ? undefined : toStyleFunction(this.style_);\n        this.changed();\n    };\n    return BaseVectorLayer;\n}(Layer));\nexport default BaseVectorLayer;\n//# sourceMappingURL=BaseVector.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\
 n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/webgl/Layer\n */\nimport LayerRenderer from '../Layer.js';\nimport WebGLHelper from '../../webgl/Helper.js';\n/**\n * @enum {string}\n */\nexport var WebGLWorkerMessageType = {\n    GENERATE_BUFFERS: 'GENERATE_BUFFERS',\n};\n/**\n * @typedef {Object} WebGLWorkerGenerateBuffersMessage\n * This message will trigger the generation of a vertex and an index buffer based on the given render instructions.\n * When the buffers are generated, the worked will send a message of the same type to the main thread, with\n * the generated buffers in it.\n * Note that any addition properties present in the message *will* be sent back to the main thread.\n * @property {WebGLWorkerMessageType} type Message type\n * @property {ArrayBuffer} renderInstr
 uctions Render instructions raw binary buffer.\n * @property {ArrayBuffer} [vertexBuffer] Vertices array raw binary buffer (sent by the worker).\n * @property {ArrayBuffer} [indexBuffer] Indices array raw binary buffer (sent by the worker).\n * @property {number} [customAttributesCount] Amount of custom attributes count in the render instructions.\n */\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object.<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n/**\n * @typedef {Object} Options\n * @property {Object.<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform
  definitions for the post process steps\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n/**\n * @classdesc\n * Base WebGL renderer class.\n * Holds all logic related to data manipulation & some common rendering logic\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n */\nvar WebGLLayerRenderer = /** @class */ (function (_super) {\n    __extends(WebGLLayerRenderer, _super);\n    /**\n     * @param {LayerType} layer Layer.\n     * @param {Options=} [opt_options] Options.\n     */\n    function WebGLLayerRenderer(layer, opt_options) {\n        var _this = _super.call(this, layer) || this;\n        var options = opt_options || {};\n        /**\n         * @type {WebGLHelper}\n         * @protected\n         */\n        _this.helper = new WebGLHelper({\n            postProcesses: options.postProcesses,\n            uniforms: options.uniforms,\n        });\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    
 WebGLLayerRenderer.prototype.disposeInternal = function () {\n        this.helper.dispose();\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Will return the last shader compilation errors. If no error happened, will return null;\n     * @return {string|null} Errors, or null if last compilation was successful\n     * @api\n     */\n    WebGLLayerRenderer.prototype.getShaderCompileErrors = function () {\n        return this.helper.getShaderCompileErrors();\n    };\n    return WebGLLayerRenderer;\n}(LayerRenderer));\nvar tmpArray_ = [];\nvar bufferPositions_ = { vertexPosition: 0, indexPosition: 0 };\nfunction writePointVertex(buffer, pos, x, y, index) {\n    buffer[pos + 0] = x;\n    buffer[pos + 1] = y;\n    buffer[pos + 2] = index;\n}\n/**\n * An object holding positions both in an index and a vertex buffer.\n * @typedef {Object} BufferPositions\n * @property {number} vertexPosition Position in the vertex buffer\n * @property {number} indexPosition Pos
 ition in the index buffer\n */\n/**\n * Pushes a quad (two triangles) based on a point geometry\n * @param {Float32Array} instructions Array of render instructions for points.\n * @param {number} elementIndex Index from which render instructions will be read.\n * @param {Float32Array} vertexBuffer Buffer in the form of a typed array.\n * @param {Uint32Array} indexBuffer Buffer in the form of a typed array.\n * @param {number} customAttributesCount Amount of custom attributes for each element.\n * @param {BufferPositions} [bufferPositions] Buffer write positions; if not specified, positions will be set at 0.\n * @return {BufferPositions} New buffer positions where to write next\n * @property {number} vertexPosition New position in the vertex buffer where future writes should start.\n * @property {number} indexPosition New position in the index buffer where future writes should start.\n * @private\n */\nexport function writePointFeatureToBuffers(instructions, elementIndex, vertexBuffe
 r, indexBuffer, customAttributesCount, bufferPositions) {\n    // This is for x, y and index\n    var baseVertexAttrsCount = 3;\n    var baseInstructionsCount = 2;\n    var stride = baseVertexAttrsCount + customAttributesCount;\n    var x = instructions[elementIndex + 0];\n    var y = instructions[elementIndex + 1];\n    // read custom numerical attributes on the feature\n    var customAttrs = tmpArray_;\n    customAttrs.length = customAttributesCount;\n    for (var i = 0; i < customAttrs.length; i++) {\n        customAttrs[i] = instructions[elementIndex + baseInstructionsCount + i];\n    }\n    var vPos = bufferPositions ? bufferPositions.vertexPosition : 0;\n    var iPos = bufferPositions ? bufferPositions.indexPosition : 0;\n    var baseIndex = vPos / stride;\n    // push vertices for each of the four quad corners (first standard then custom attributes)\n    writePointVertex(vertexBuffer, vPos, x, y, 0);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + bas
 eVertexAttrsCount);\n    vPos += stride;\n    writePointVertex(vertexBuffer, vPos, x, y, 1);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n    vPos += stride;\n    writePointVertex(vertexBuffer, vPos, x, y, 2);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n    vPos += stride;\n    writePointVertex(vertexBuffer, vPos, x, y, 3);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n    vPos += stride;\n    indexBuffer[iPos++] = baseIndex;\n    indexBuffer[iPos++] = baseIndex + 1;\n    indexBuffer[iPos++] = baseIndex + 3;\n    indexBuffer[iPos++] = baseIndex + 1;\n    indexBuffer[iPos++] = baseIndex + 2;\n    indexBuffer[iPos++] = baseIndex + 3;\n    bufferPositions_.vertexPosition = vPos;\n    bufferPositions_.indexPosition = iPos;\n    return bufferPositions_;\n}\n/**\n * Returns a texture of 1x1 pixel, white\n * @private\n * @return {ImageD
 ata} Image data.\n */\nexport function getBlankImageData() {\n    var canvas = document.createElement('canvas');\n    var image = canvas.getContext('2d').createImageData(1, 1);\n    image.data[0] = 255;\n    image.data[1] = 255;\n    image.data[2] = 255;\n    image.data[3] = 255;\n    return image;\n}\n/**\n * Generates a color array based on a numerical id\n * Note: the range for each component is 0 to 1 with 256 steps\n * @param {number} id Id\n * @param {Array<number>} [opt_array] Reusable array\n * @return {Array<number>} Color array containing the encoded id\n */\nexport function colorEncodeId(id, opt_array) {\n    var array = opt_array || [];\n    var radix = 256;\n    var divide = radix - 1;\n    array[0] = Math.floor(id / radix / radix / radix) / divide;\n    array[1] = (Math.floor(id / radix / radix) % radix) / divide;\n    array[2] = (Math.floor(id / radix) % radix) / divide;\n    array[3] = (id % radix) / divide;\n    return array;\n}\n/**\n * Reads an id from a color-enc
 oded array\n * Note: the expected range for each component is 0 to 1 with 256 steps.\n * @param {Array<number>} color Color array containing the encoded id\n * @return {number} Decoded id\n */\nexport function colorDecodeId(color) {\n    var id = 0;\n    var radix = 256;\n    var mult = radix - 1;\n    id += Math.round(color[0] * radix * radix * radix * mult);\n    id += Math.round(color[1] * radix * radix * mult);\n    id += Math.round(color[2] * radix * mult);\n    id += Math.round(color[3] * mult);\n    return id;\n}\nexport default WebGLLayerRenderer;\n//# sourceMappingURL=Layer.js.map","var source = \"var e=\\\"function\\\"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError(\\\"Cannot convert undefined or null to object\\\");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n=\\\"GENERATE_BUFFERS\\\",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r
 ,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};\";\nvar blob = new Blob([source], { type: 'application/javascript' });\nvar url = URL.createObjectURL(blob);\nexport function create() {\n    re
 turn new Worker(url);\n}\n//# sourceMappingURL=webgl.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/webgl/PointsLayer\n */\nimport BaseVector from '../../layer/BaseVector.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport VectorEventType from '../../source/VectorEventType.js';\nimport ViewHint from '../../ViewHint.js';\nimport WebGLArrayBuffer from '../../webgl/Buffer.js';\nimport WebGLL
 ayerRenderer, { WebGLWorkerMessageType, colorDecodeId, colorEncodeId, } from './Layer.js';\nimport WebGLRenderTarget from '../../webgl/RenderTarget.js';\nimport { ARRAY_BUFFER, DYNAMIC_DRAW, ELEMENT_ARRAY_BUFFER } from '../../webgl.js';\nimport { AttributeType, DefaultUniform } from '../../webgl/Helper.js';\nimport { apply as applyTransform, create as createTransform, makeInverse as makeInverseTransform, multiply as multiplyTransform, } from '../../transform.js';\nimport { assert } from '../../asserts.js';\nimport { buffer, createEmpty, equals } from '../../extent.js';\nimport { create as createWebGLWorker } from '../../worker/webgl.js';\nimport { getUid } from '../../util.js';\nimport { listen, unlistenByKey } from '../../events.js';\n/**\n * @typedef {Object} CustomAttribute A description of a custom attribute to be passed on to the GPU, with a value different\n * for each feature.\n * @property {string} name Attribute name.\n * @property {function(import(\"../../Feature\").defaul
 t, Object<string, *>):number} callback This callback computes the numerical value of the\n * attribute for a given feature (properties are available as 2nd arg for quicker access).\n */\n/**\n * @typedef {Object} FeatureCacheItem Object that holds a reference to a feature, its geometry and properties. Used to optimize\n * rebuildBuffers by accessing these objects quicker.\n * @property {import(\"../../Feature\").default} feature Feature\n * @property {Object<string, *>} properties Feature properties\n * @property {import(\"../../geom\").Geometry} geometry Feature geometry\n */\n/**\n * @typedef {Object} Options\n * @property {Array<CustomAttribute>} [attributes] These attributes will be read from the features in the source and then\n * passed to the GPU. The `name` property of each attribute will serve as its identifier:\n *  * In the vertex shader as an `attribute` by prefixing it with `a_`\n *  * In the fragment shader as a `varying` by prefixing it with `v_`\n * Please note that 
 these can only be numerical values.\n * @property {string} vertexShader Vertex shader source, mandatory.\n * @property {string} fragmentShader Fragment shader source, mandatory.\n * @property {string} [hitVertexShader] Vertex shader source for hit detection rendering.\n * @property {string} [hitFragmentShader] Fragment shader source for hit detection rendering.\n * @property {Object.<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process steps\n * Please note that `u_texture` is reserved for the main texture slot.\n * @property {Array<import(\"./Layer\").PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n/**\n * @classdesc\n * WebGL vector renderer optimized for points.\n * All features will be rendered as quads (two triangles forming a square). New data will be flushed to the GPU\n * every time the vector source changes.\n *\n * You need to provide vertex and fragment shaders for rendering. This can be done usin
 g\n * {@link module:ol/webgl/ShaderBuilder} utilities. These shaders shall expect a `a_position` attribute\n * containing the screen-space projected center of the quad, as well as a `a_index` attribute\n * whose value (0, 1, 2 or 3) indicates which quad vertex is currently getting processed (see structure below).\n *\n * To include variable attributes in the shaders, you need to declare them using the `attributes` property of\n * the options object like so:\n * ```js\n * new WebGLPointsLayerRenderer(layer, {\n *   attributes: [\n *     {\n *       name: 'size',\n *       callback: function(feature) {\n *         // compute something with the feature\n *       }\n *     },\n *     {\n *       name: 'weight',\n *       callback: function(feature) {\n *         // compute something with the feature\n *       }\n *     },\n *   ],\n *   vertexShader:\n *     // shader using attribute a_weight and a_size\n *   fragmentShader:\n *     // shader using varying v_weight and v_size\n * ```\n 
 *\n * To enable hit detection, you must as well provide dedicated shaders using the `hitVertexShader`\n * and `hitFragmentShader` properties. These shall expect the `a_hitColor` attribute to contain\n * the final color that will have to be output for hit detection to work.\n *\n * The following uniform is used for the main texture: `u_texture`.\n *\n * Please note that the main shader output should have premultiplied alpha, otherwise visual anomalies may occur.\n *\n * Points are rendered as quads with the following structure:\n *\n * ```\n *   (u0, v1)      (u1, v1)\n *  [3]----------[2]\n *   |`           |\n *   |  `         |\n *   |    `       |\n *   |      `     |\n *   |        `   |\n *   |          ` |\n *  [0]----------[1]\n *   (u0, v0)      (u1, v0)\n *  ```\n *\n * This uses {@link module:ol/webgl/Helper~WebGLHelper} internally.\n *\n * @api\n */\nvar WebGLPointsLayerRenderer = /** @class */ (function (_super) {\n    __extends(WebGLPointsLayerRenderer, _super);\n    /*
 *\n     * @param {import(\"../../layer/Layer.js\").default} layer Layer.\n     * @param {Options} options Options.\n     */\n    function WebGLPointsLayerRenderer(layer, options) {\n        var _this = this;\n        var uniforms = options.uniforms || {};\n        var projectionMatrixTransform = createTransform();\n        uniforms[DefaultUniform.PROJECTION_MATRIX] = projectionMatrixTransform;\n        _this = _super.call(this, layer, {\n            uniforms: uniforms,\n            postProcesses: options.postProcesses,\n        }) || this;\n        _this.sourceRevision_ = -1;\n        _this.verticesBuffer_ = new WebGLArrayBuffer(ARRAY_BUFFER, DYNAMIC_DRAW);\n        _this.hitVerticesBuffer_ = new WebGLArrayBuffer(ARRAY_BUFFER, DYNAMIC_DRAW);\n        _this.indicesBuffer_ = new WebGLArrayBuffer(ELEMENT_ARRAY_BUFFER, DYNAMIC_DRAW);\n        _this.program_ = _this.helper.getProgram(options.fragmentShader, options.vertexShader);\n        /**\n         * @type {boolean}\n         * @priv
 ate\n         */\n        _this.hitDetectionEnabled_ =\n            options.hitFragmentShader && options.hitVertexShader ? true : false;\n        _this.hitProgram_ =\n            _this.hitDetectionEnabled_ &&\n                _this.helper.getProgram(options.hitFragmentShader, options.hitVertexShader);\n        var customAttributes = options.attributes\n            ? options.attributes.map(function (attribute) {\n                return {\n                    name: 'a_' + attribute.name,\n                    size: 1,\n                    type: AttributeType.FLOAT,\n                };\n            })\n            : [];\n        /**\n         * A list of attributes used by the renderer. By default only the position and\n         * index of the vertex (0 to 3) are required.\n         * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n         */\n        _this.attributes = [\n            {\n                name: 'a_position',\n                size: 2,\n               
  type: AttributeType.FLOAT,\n            },\n            {\n                name: 'a_index',\n                size: 1,\n                type: AttributeType.FLOAT,\n            },\n        ].concat(customAttributes);\n        /**\n         * A list of attributes used for hit detection.\n         * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n         */\n        _this.hitDetectionAttributes = [\n            {\n                name: 'a_position',\n                size: 2,\n                type: AttributeType.FLOAT,\n            },\n            {\n                name: 'a_index',\n                size: 1,\n                type: AttributeType.FLOAT,\n            },\n            {\n                name: 'a_hitColor',\n                size: 4,\n                type: AttributeType.FLOAT,\n            },\n            {\n                name: 'a_featureUid',\n                size: 1,\n                type: AttributeType.FLOAT,\n            },\n        ].concat(customA
 ttributes);\n        _this.customAttributes = options.attributes ? options.attributes : [];\n        _this.previousExtent_ = createEmpty();\n        /**\n         * This transform is updated on every frame and is the composition of:\n         * - invert of the world->screen transform that was used when rebuilding buffers (see `this.renderTransform_`)\n         * - current world->screen transform\n         * @type {import(\"../../transform.js\").Transform}\n         * @private\n         */\n        _this.currentTransform_ = projectionMatrixTransform;\n        /**\n         * This transform is updated when buffers are rebuilt and converts world space coordinates to screen space\n         * @type {import(\"../../transform.js\").Transform}\n         * @private\n         */\n        _this.renderTransform_ = createTransform();\n        /**\n         * @type {import(\"../../transform.js\").Transform}\n         * @private\n         */\n        _this.invertRenderTransform_ = createTransform(
 );\n        /**\n         * @type {Float32Array}\n         * @private\n         */\n        _this.renderInstructions_ = new Float32Array(0);\n        /**\n         * These instructions are used for hit detection\n         * @type {Float32Array}\n         * @private\n         */\n        _this.hitRenderInstructions_ = new Float32Array(0);\n        /**\n         * @type {WebGLRenderTarget}\n         * @private\n         */\n        _this.hitRenderTarget_ =\n            _this.hitDetectionEnabled_ && new WebGLRenderTarget(_this.helper);\n        _this.worker_ = createWebGLWorker();\n        _this.worker_.addEventListener('message', function (event) {\n            var received = event.data;\n            if (received.type === WebGLWorkerMessageType.GENERATE_BUFFERS) {\n                var projectionTransform = received.projectionTransform;\n                if (received.hitDetection) {\n                    this.hitVerticesBuffer_.fromArrayBuffer(received.vertexBuffer);\n                   
  this.helper.flushBufferData(this.hitVerticesBuffer_);\n                }\n                else {\n                    this.verticesBuffer_.fromArrayBuffer(received.vertexBuffer);\n                    this.helper.flushBufferData(this.verticesBuffer_);\n                }\n                this.indicesBuffer_.fromArrayBuffer(received.indexBuffer);\n                this.helper.flushBufferData(this.indicesBuffer_);\n                this.renderTransform_ = projectionTransform;\n                makeInverseTransform(this.invertRenderTransform_, this.renderTransform_);\n                if (received.hitDetection) {\n                    this.hitRenderInstructions_ = new Float32Array(event.data.renderInstructions);\n                }\n                else {\n                    this.renderInstructions_ = new Float32Array(event.data.renderInstructions);\n                }\n                this.getLayer().changed();\n            }\n        }.bind(_this));\n        /**\n         * This object will
  be updated when the source changes. Key is uid.\n         * @type {Object<string, FeatureCacheItem>}\n         * @private\n         */\n        _this.featureCache_ = {};\n        /**\n         * Amount of features in the cache.\n         * @type {number}\n         * @private\n         */\n        _this.featureCount_ = 0;\n        var source = _this.getLayer().getSource();\n        _this.sourceListenKeys_ = [\n            listen(source, VectorEventType.ADDFEATURE, _this.handleSourceFeatureAdded_, _this),\n            listen(source, VectorEventType.CHANGEFEATURE, _this.handleSourceFeatureChanged_, _this),\n            listen(source, VectorEventType.REMOVEFEATURE, _this.handleSourceFeatureDelete_, _this),\n            listen(source, VectorEventType.CLEAR, _this.handleSourceFeatureClear_, _this),\n        ];\n        source.forEachFeature(function (feature) {\n            this.featureCache_[getUid(feature)] = {\n                feature: feature,\n                properties: feature.get
 Properties(),\n                geometry: feature.getGeometry(),\n            };\n            this.featureCount_++;\n        }.bind(_this));\n        return _this;\n    }\n    /**\n     * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureAdded_ = function (event) {\n        var feature = event.feature;\n        this.featureCache_[getUid(feature)] = {\n            feature: feature,\n            properties: feature.getProperties(),\n            geometry: feature.getGeometry(),\n        };\n        this.featureCount_++;\n    };\n    /**\n     * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureChanged_ = function (event) {\n        var feature = event.feature;\n        this.featureCache_[getUid(feature)] = {\n            feature: feature,\n            properties: feature
 .getProperties(),\n            geometry: feature.getGeometry(),\n        };\n    };\n    /**\n     * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureDelete_ = function (event) {\n        var feature = event.feature;\n        delete this.featureCache_[getUid(feature)];\n        this.featureCount_--;\n    };\n    /**\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureClear_ = function () {\n        this.featureCache_ = {};\n        this.featureCount_ = 0;\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {HTMLElement} The rendered element.\n     */\n    WebGLPointsLayerRenderer.prototype.renderFrame = function (frameState) {\n        var renderCount = this.indicesBuffer_.getSize();\n        this.helper.drawElements(0, renderCount);\n        this.he
 lper.finalizeDraw(frameState);\n        var canvas = this.helper.getCanvas();\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var opacity = layerState.opacity;\n        if (opacity !== parseFloat(canvas.style.opacity)) {\n            canvas.style.opacity = String(opacity);\n        }\n        if (this.hitDetectionEnabled_) {\n            this.renderHitDetection(frameState);\n            this.hitRenderTarget_.clearCachedData();\n        }\n        return canvas;\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    WebGLPointsLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var layer = this.getLayer();\n        var vectorSource = layer.getSource();\n        var viewState = frameState.viewState;\n        var viewNotMoving = !frameState.viewHints[ViewHint.A
 NIMATING] &&\n            !frameState.viewHints[ViewHint.INTERACTING];\n        var extentChanged = !equals(this.previousExtent_, frameState.extent);\n        var sourceChanged = this.sourceRevision_ < vectorSource.getRevision();\n        if (sourceChanged) {\n            this.sourceRevision_ = vectorSource.getRevision();\n        }\n        if (viewNotMoving && (extentChanged || sourceChanged)) {\n            var projection = viewState.projection;\n            var resolution = viewState.resolution;\n            var renderBuffer = layer instanceof BaseVector ? layer.getRenderBuffer() : 0;\n            var extent = buffer(frameState.extent, renderBuffer * resolution);\n            vectorSource.loadFeatures(extent, resolution, projection);\n            this.rebuildBuffers_(frameState);\n            this.previousExtent_ = frameState.extent.slice();\n        }\n        // apply the current projection transform with the invert of the one used to fill buffers\n        this.helper.makeProj
 ectionTransform(frameState, this.currentTransform_);\n        multiplyTransform(this.currentTransform_, this.invertRenderTransform_);\n        this.helper.useProgram(this.program_);\n        this.helper.prepareDraw(frameState);\n        // write new data\n        this.helper.bindBuffer(this.verticesBuffer_);\n        this.helper.bindBuffer(this.indicesBuffer_);\n        this.helper.enableAttributes(this.attributes);\n        return true;\n    };\n    /**\n     * Rebuild internal webgl buffers based on current view extent; costly, should not be called too much\n     * @param {import(\"../../PluggableMap\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.rebuildBuffers_ = function (frameState) {\n        // saves the projection transform for the current frame state\n        var projectionTransform = createTransform();\n        this.helper.makeProjectionTransform(frameState, projectionTransform);\n        // here we anticipate the a
 mount of render instructions that we well generate\n        // this can be done since we know that for normal render we only have x, y as base instructions,\n        // and x, y, r, g, b, a and featureUid for hit render instructions\n        // and we also know the amount of custom attributes to append to these\n        var totalInstructionsCount = (2 + this.customAttributes.length) * this.featureCount_;\n        if (!this.renderInstructions_ ||\n            this.renderInstructions_.length !== totalInstructionsCount) {\n            this.renderInstructions_ = new Float32Array(totalInstructionsCount);\n        }\n        if (this.hitDetectionEnabled_) {\n            var totalHitInstructionsCount = (7 + this.customAttributes.length) * this.featureCount_;\n            if (!this.hitRenderInstructions_ ||\n                this.hitRenderInstructions_.length !== totalHitInstructionsCount) {\n                this.hitRenderInstructions_ = new Float32Array(totalHitInstructionsCount);\n        
     }\n        }\n        // loop on features to fill the buffer\n        var featureCache, geometry;\n        var tmpCoords = [];\n        var tmpColor = [];\n        var renderIndex = 0;\n        var hitIndex = 0;\n        var hitColor;\n        for (var featureUid in this.featureCache_) {\n            featureCache = this.featureCache_[featureUid];\n            geometry = /** @type {import(\"../../geom\").Point} */ (featureCache.geometry);\n            if (!geometry || geometry.getType() !== GeometryType.POINT) {\n                continue;\n            }\n            tmpCoords[0] = geometry.getFlatCoordinates()[0];\n            tmpCoords[1] = geometry.getFlatCoordinates()[1];\n            applyTransform(projectionTransform, tmpCoords);\n            hitColor = colorEncodeId(hitIndex + 6, tmpColor);\n            this.renderInstructions_[renderIndex++] = tmpCoords[0];\n            this.renderInstructions_[renderIndex++] = tmpCoords[1];\n            // for hit detection, the feature u
 id is saved in the opacity value\n            // and the index of the opacity value is encoded in the color values\n            if (this.hitDetectionEnabled_) {\n                this.hitRenderInstructions_[hitIndex++] = tmpCoords[0];\n                this.hitRenderInstructions_[hitIndex++] = tmpCoords[1];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[0];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[1];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[2];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[3];\n                this.hitRenderInstructions_[hitIndex++] = Number(featureUid);\n            }\n            // pushing custom attributes\n            var value = void 0;\n            for (var j = 0; j < this.customAttributes.length; j++) {\n                value = this.customAttributes[j].callback(featureCache.feature, featureCache.properties);\n                this.renderInstructions_[renderIndex++]
  = value;\n                if (this.hitDetectionEnabled_) {\n                    this.hitRenderInstructions_[hitIndex++] = value;\n                }\n            }\n        }\n        /** @type {import('./Layer').WebGLWorkerGenerateBuffersMessage} */\n        var message = {\n            type: WebGLWorkerMessageType.GENERATE_BUFFERS,\n            renderInstructions: this.renderInstructions_.buffer,\n            customAttributesCount: this.customAttributes.length,\n        };\n        // additional properties will be sent back as-is by the worker\n        message['projectionTransform'] = projectionTransform;\n        this.worker_.postMessage(message, [this.renderInstructions_.buffer]);\n        this.renderInstructions_ = null;\n        /** @type {import('./Layer').WebGLWorkerGenerateBuffersMessage} */\n        if (this.hitDetectionEnabled_) {\n            var hitMessage = {\n                type: WebGLWorkerMessageType.GENERATE_BUFFERS,\n                renderInstructions: this.hitRe
 nderInstructions_.buffer,\n                customAttributesCount: 5 + this.customAttributes.length,\n            };\n            hitMessage['projectionTransform'] = projectionTransform;\n            hitMessage['hitDetection'] = true;\n            this.worker_.postMessage(hitMessage, [\n                this.hitRenderInstructions_.buffer,\n            ]);\n            this.hitRenderInstructions_ = null;\n        }\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n     * @return {T|void} Callback result.\n     * @template T\n     */\n    WebGLPoint
 sLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, declutteredFeatures) {\n        assert(this.hitDetectionEnabled_, 66);\n        if (!this.hitRenderInstructions_) {\n            return;\n        }\n        var pixel = applyTransform(frameState.coordinateToPixelTransform, coordinate.slice());\n        var data = this.hitRenderTarget_.readPixel(pixel[0] / 2, pixel[1] / 2);\n        var color = [data[0] / 255, data[1] / 255, data[2] / 255, data[3] / 255];\n        var index = colorDecodeId(color);\n        var opacity = this.hitRenderInstructions_[index];\n        var uid = Math.floor(opacity).toString();\n        var source = this.getLayer().getSource();\n        var feature = source.getFeatureByUid(uid);\n        if (feature) {\n            return callback(feature, this.getLayer());\n        }\n    };\n    /**\n     * Render the hit detection data to the corresponding render target\n     * @param {import(\"../../Pluggable
 Map.js\").FrameState} frameState current frame state\n     */\n    WebGLPointsLayerRenderer.prototype.renderHitDetection = function (frameState) {\n        // skip render entirely if vertex buffers not ready/generated yet\n        if (!this.hitVerticesBuffer_.getSize()) {\n            return;\n        }\n        this.hitRenderTarget_.setSize([\n            Math.floor(frameState.size[0] / 2),\n            Math.floor(frameState.size[1] / 2),\n        ]);\n        this.helper.useProgram(this.hitProgram_);\n        this.helper.prepareDrawToRenderTarget(frameState, this.hitRenderTarget_, true);\n        this.helper.bindBuffer(this.hitVerticesBuffer_);\n        this.helper.bindBuffer(this.indicesBuffer_);\n        this.helper.enableAttributes(this.hitDetectionAttributes);\n        var renderCount = this.indicesBuffer_.getSize();\n        this.helper.drawElements(0, renderCount);\n    };\n    /**\n     * Clean up.\n     */\n    WebGLPointsLayerRenderer.prototype.disposeInternal = function 
 () {\n        this.worker_.terminate();\n        this.layer_ = null;\n        this.sourceListenKeys_.forEach(function (key) {\n            unlistenByKey(key);\n        });\n        this.sourceListenKeys_ = null;\n        _super.prototype.disposeInternal.call(this);\n    };\n    return WebGLPointsLayerRenderer;\n}(WebGLLayerRenderer));\nexport default WebGLPointsLayerRenderer;\n//# sourceMappingURL=PointsLayer.js.map","/**\n * @module ol/render/canvas/Instruction\n */\n/**\n * @enum {number}\n */\nvar Instruction = {\n    BEGIN_GEOMETRY: 0,\n    BEGIN_PATH: 1,\n    CIRCLE: 2,\n    CLOSE_PATH: 3,\n    CUSTOM: 4,\n    DRAW_CHARS: 5,\n    DRAW_IMAGE: 6,\n    END_GEOMETRY: 7,\n    FILL: 8,\n    MOVE_TO_LINE_TO: 9,\n    SET_FILL_STYLE: 10,\n    SET_STROKE_STYLE: 11,\n    STROKE: 12,\n};\n/**\n * @type {Array<Instruction>}\n */\nexport var fillInstruction = [Instruction.FILL];\n/**\n * @type {Array<Instruction>}\n */\nexport var strokeInstruction = [Instruction.STROKE];\n/**\n * @type {Arr
 ay<Instruction>}\n */\nexport var beginPathInstruction = [Instruction.BEGIN_PATH];\n/**\n * @type {Array<Instruction>}\n */\nexport var closePathInstruction = [Instruction.CLOSE_PATH];\nexport default Instruction;\n//# sourceMappingURL=Instruction.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/Builder\n */\nimport CanvasInstruction from './Instruction.js';\nimport GeometryType from '../../geom/Geomet
 ryType.js';\nimport Relationship from '../../extent/Relationship.js';\nimport VectorContext from '../VectorContext.js';\nimport { asColorLike } from '../../colorlike.js';\nimport { buffer, clone, coordinateRelationship } from '../../extent.js';\nimport { defaultFillStyle, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, } from '../canvas.js';\nimport { equals, reverseSubArray } from '../../array.js';\nimport { inflateCoordinates, inflateCoordinatesArray, inflateMultiCoordinatesArray, } from '../../geom/flat/inflate.js';\n/**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} instructions The rendering instructions.\n * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions.\n * @property {Array<number>} coordinates The array of all coordinates.\n * @property {!Object<string, import(\"../canvas.js\").TextState>} [textStates] The text states (declutteri
 ng).\n * @property {!Object<string, import(\"../canvas.js\").FillState>} [fillStates] The fill states (decluttering).\n * @property {!Object<string, import(\"../canvas.js\").StrokeState>} [strokeStates] The stroke states (decluttering).\n */\nvar CanvasBuilder = /** @class */ (function (_super) {\n    __extends(CanvasBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        var _this = _super.call(this) || this;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.tolerance = tolerance;\n        /**\n         * @protected\n         * @const\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.maxExtent = maxExtent;\n        /**\n         * 
 @protected\n         * @type {number}\n         */\n        _this.pixelRatio = pixelRatio;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.maxLineWidth = 0;\n        /**\n         * @protected\n         * @const\n         * @type {number}\n         */\n        _this.resolution = resolution;\n        /**\n         * @private\n         * @type {Array<*>}\n         */\n        _this.beginGeometryInstruction1_ = null;\n        /**\n         * @private\n         * @type {Array<*>}\n         */\n        _this.beginGeometryInstruction2_ = null;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.bufferedMaxExtent_ = null;\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        _this.instructions = [];\n        /**\n         * @protected\n         * @type {Array<number>}\n         */\n        _this.coordinates = [];\n        /**\n         * @private\n   
       * @type {import(\"../../coordinate.js\").Coordinate}\n         */\n        _this.tmpCoordinate_ = [];\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        _this.hitDetectionInstructions = [];\n        /**\n         * @protected\n         * @type {import(\"../canvas.js\").FillStrokeState}\n         */\n        _this.state = /** @type {import(\"../canvas.js\").FillStrokeState} */ ({});\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {Array<number>} dashArray Dash array.\n     * @return {Array<number>} Dash array with pixel ratio applied\n     */\n    CanvasBuilder.prototype.applyPixelRatio = function (dashArray) {\n        var pixelRatio = this.pixelRatio;\n        return pixelRatio == 1\n            ? dashArray\n            : dashArray.map(function (dash) {\n                return dash * pixelRatio;\n            });\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number}
  offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @param {boolean} closed Last input coordinate equals first.\n     * @param {boolean} skipFirst Skip first coordinate.\n     * @protected\n     * @return {number} My end.\n     */\n    CanvasBuilder.prototype.appendFlatCoordinates = function (flatCoordinates, offset, end, stride, closed, skipFirst) {\n        var myEnd = this.coordinates.length;\n        var extent = this.getBufferedMaxExtent();\n        if (skipFirst) {\n            offset += stride;\n        }\n        var lastXCoord = flatCoordinates[offset];\n        var lastYCoord = flatCoordinates[offset + 1];\n        var nextCoord = this.tmpCoordinate_;\n        var skipped = true;\n        var i, lastRel, nextRel;\n        for (i = offset + stride; i < end; i += stride) {\n            nextCoord[0] = flatCoordinates[i];\n            nextCoord[1] = flatCoordinates[i + 1];\n            nextRel = coordinateRelationship(extent, nextCoo
 rd);\n            if (nextRel !== lastRel) {\n                if (skipped) {\n                    this.coordinates[myEnd++] = lastXCoord;\n                    this.coordinates[myEnd++] = lastYCoord;\n                }\n                this.coordinates[myEnd++] = nextCoord[0];\n                this.coordinates[myEnd++] = nextCoord[1];\n                skipped = false;\n            }\n            else if (nextRel === Relationship.INTERSECTING) {\n                this.coordinates[myEnd++] = nextCoord[0];\n                this.coordinates[myEnd++] = nextCoord[1];\n                skipped = false;\n            }\n            else {\n                skipped = true;\n            }\n            lastXCoord = nextCoord[0];\n            lastYCoord = nextCoord[1];\n            lastRel = nextRel;\n        }\n        // Last coordinate equals first or only one point to append:\n        if ((closed && skipped) || i === offset + stride) {\n            this.coordinates[myEnd++] = lastXCoord;\n      
       this.coordinates[myEnd++] = lastYCoord;\n        }\n        return myEnd;\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {Array<number>} ends Ends.\n     * @param {number} stride Stride.\n     * @param {Array<number>} builderEnds Builder ends.\n     * @return {number} Offset.\n     */\n    CanvasBuilder.prototype.drawCustomCoordinates_ = function (flatCoordinates, offset, ends, stride, builderEnds) {\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var builderEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);\n            builderEnds.push(builderEnd);\n            offset = end;\n        }\n        return offset;\n    };\n    /**\n     * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @param {
 Function} renderer Renderer.\n     */\n    CanvasBuilder.prototype.drawCustom = function (geometry, feature, renderer) {\n        this.beginGeometry(geometry, feature);\n        var type = geometry.getType();\n        var stride = geometry.getStride();\n        var builderBegin = this.coordinates.length;\n        var flatCoordinates, builderEnd, builderEnds, builderEndss;\n        var offset;\n        if (type == GeometryType.MULTI_POLYGON) {\n            flatCoordinates = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getOrientedFlatCoordinates();\n            builderEndss = [];\n            var endss = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getEndss();\n            offset = 0;\n            for (var i = 0, ii = endss.length; i < ii; ++i) {\n                var myEnds = [];\n                offset = this.drawCustomCoordinates_(flatCoordinates, offset, endss[i], stride, myEnds);\n                builderEndss.push(myEnds);\n 
            }\n            this.instructions.push([\n                CanvasInstruction.CUSTOM,\n                builderBegin,\n                builderEndss,\n                geometry,\n                renderer,\n                inflateMultiCoordinatesArray,\n            ]);\n        }\n        else if (type == GeometryType.POLYGON ||\n            type == GeometryType.MULTI_LINE_STRING) {\n            builderEnds = [];\n            flatCoordinates =\n                type == GeometryType.POLYGON\n                    ? /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getOrientedFlatCoordinates()\n                    : geometry.getFlatCoordinates();\n            offset = this.drawCustomCoordinates_(flatCoordinates, 0, \n            /** @type {import(\"../../geom/Polygon.js\").default|import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds(), stride, builderEnds);\n            this.instructions.push([\n                CanvasInstruction.CUSTOM,\n        
         builderBegin,\n                builderEnds,\n                geometry,\n                renderer,\n                inflateCoordinatesArray,\n            ]);\n        }\n        else if (type == GeometryType.LINE_STRING ||\n            type == GeometryType.MULTI_POINT) {\n            flatCoordinates = geometry.getFlatCoordinates();\n            builderEnd = this.appendFlatCoordinates(flatCoordinates, 0, flatCoordinates.length, stride, false, false);\n            this.instructions.push([\n                CanvasInstruction.CUSTOM,\n                builderBegin,\n                builderEnd,\n                geometry,\n                renderer,\n                inflateCoordinates,\n            ]);\n        }\n        else if (type == GeometryType.POINT) {\n            flatCoordinates = geometry.getFlatCoordinates();\n            this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);\n            builderEnd = this.coordinates.length;\n            this.instructions.push([\n
                 CanvasInstruction.CUSTOM,\n                builderBegin,\n                builderEnd,\n                geometry,\n                renderer,\n            ]);\n        }\n        this.endGeometry(feature);\n    };\n    /**\n     * @protected\n     * @param {import(\"../../geom/Geometry\").default|import(\"../Feature.js\").default} geometry The geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasBuilder.prototype.beginGeometry = function (geometry, feature) {\n        var extent = geometry.getExtent();\n        this.beginGeometryInstruction1_ = [\n            CanvasInstruction.BEGIN_GEOMETRY,\n            feature,\n            0,\n            extent,\n        ];\n        this.instructions.push(this.beginGeometryInstruction1_);\n        this.beginGeometryInstruction2_ = [\n            CanvasInstruction.BEGIN_GEOMETRY,\n            feature,\n            0,\n            extent,\n        ];\n        this.hitDetectionInstr
 uctions.push(this.beginGeometryInstruction2_);\n    };\n    /**\n     * @return {SerializableInstructions} the serializable instructions.\n     */\n    CanvasBuilder.prototype.finish = function () {\n        return {\n            instructions: this.instructions,\n            hitDetectionInstructions: this.hitDetectionInstructions,\n            coordinates: this.coordinates,\n        };\n    };\n    /**\n     * Reverse the hit detection instructions.\n     */\n    CanvasBuilder.prototype.reverseHitDetectionInstructions = function () {\n        var hitDetectionInstructions = this.hitDetectionInstructions;\n        // step 1 - reverse array\n        hitDetectionInstructions.reverse();\n        // step 2 - reverse instructions within geometry blocks\n        var i;\n        var n = hitDetectionInstructions.length;\n        var instruction;\n        var type;\n        var begin = -1;\n        for (i = 0; i < n; ++i) {\n            instruction = hitDetectionInstructions[i];\n            t
 ype = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n            if (type == CanvasInstruction.END_GEOMETRY) {\n                begin = i;\n            }\n            else if (type == CanvasInstruction.BEGIN_GEOMETRY) {\n                instruction[2] = i;\n                reverseSubArray(this.hitDetectionInstructions, begin, i);\n                begin = -1;\n            }\n        }\n    };\n    /**\n     * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n     * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n     */\n    CanvasBuilder.prototype.setFillStrokeStyle = function (fillStyle, strokeStyle) {\n        var state = this.state;\n        if (fillStyle) {\n            var fillStyleColor = fillStyle.getColor();\n            state.fillStyle = asColorLike(fillStyleColor ? fillStyleColor : defaultFillStyle);\n        }\n        else {\n            state.fillStyle = undefined;\n        }\n        if (stroke
 Style) {\n            var strokeStyleColor = strokeStyle.getColor();\n            state.strokeStyle = asColorLike(strokeStyleColor ? strokeStyleColor : defaultStrokeStyle);\n            var strokeStyleLineCap = strokeStyle.getLineCap();\n            state.lineCap =\n                strokeStyleLineCap !== undefined ? strokeStyleLineCap : defaultLineCap;\n            var strokeStyleLineDash = strokeStyle.getLineDash();\n            state.lineDash = strokeStyleLineDash\n                ? strokeStyleLineDash.slice()\n                : defaultLineDash;\n            var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n            state.lineDashOffset = strokeStyleLineDashOffset\n                ? strokeStyleLineDashOffset\n                : defaultLineDashOffset;\n            var strokeStyleLineJoin = strokeStyle.getLineJoin();\n            state.lineJoin =\n                strokeStyleLineJoin !== undefined\n                    ? strokeStyleLineJoin\n                    : def
 aultLineJoin;\n            var strokeStyleWidth = strokeStyle.getWidth();\n            state.lineWidth =\n                strokeStyleWidth !== undefined ? strokeStyleWidth : defaultLineWidth;\n            var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n            state.miterLimit =\n                strokeStyleMiterLimit !== undefined\n                    ? strokeStyleMiterLimit\n                    : defaultMiterLimit;\n            if (state.lineWidth > this.maxLineWidth) {\n                this.maxLineWidth = state.lineWidth;\n                // invalidate the buffered max extent cache\n                this.bufferedMaxExtent_ = null;\n            }\n        }\n        else {\n            state.strokeStyle = undefined;\n            state.lineCap = undefined;\n            state.lineDash = null;\n            state.lineDashOffset = undefined;\n            state.lineJoin = undefined;\n            state.lineWidth = undefined;\n            state.miterLimit = undefined;\n       
  }\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     * @return {Array<*>} Fill instruction.\n     */\n    CanvasBuilder.prototype.createFill = function (state) {\n        var fillStyle = state.fillStyle;\n        /** @type {Array<*>} */\n        var fillInstruction = [CanvasInstruction.SET_FILL_STYLE, fillStyle];\n        if (typeof fillStyle !== 'string') {\n            // Fill is a pattern or gradient - align it!\n            fillInstruction.push(true);\n        }\n        return fillInstruction;\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     */\n    CanvasBuilder.prototype.applyStroke = function (state) {\n        this.instructions.push(this.createStroke(state));\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     * @return {Array<*>} Stroke instruction.\n     */\n    CanvasBuilder.prototype.createStroke = function (state) {\n        return [\n     
        CanvasInstruction.SET_STROKE_STYLE,\n            state.strokeStyle,\n            state.lineWidth * this.pixelRatio,\n            state.lineCap,\n            state.lineJoin,\n            state.miterLimit,\n            this.applyPixelRatio(state.lineDash),\n            state.lineDashOffset * this.pixelRatio,\n        ];\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState):Array<*>} createFill Create fill.\n     */\n    CanvasBuilder.prototype.updateFillStyle = function (state, createFill) {\n        var fillStyle = state.fillStyle;\n        if (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle) {\n            if (fillStyle !== undefined) {\n                this.instructions.push(createFill.call(this, state));\n            }\n            state.currentFillStyle = fillStyle;\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\")
 .FillStrokeState} state State.\n     * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState): void} applyStroke Apply stroke.\n     */\n    CanvasBuilder.prototype.updateStrokeStyle = function (state, applyStroke) {\n        var strokeStyle = state.strokeStyle;\n        var lineCap = state.lineCap;\n        var lineDash = state.lineDash;\n        var lineDashOffset = state.lineDashOffset;\n        var lineJoin = state.lineJoin;\n        var lineWidth = state.lineWidth;\n        var miterLimit = state.miterLimit;\n        if (state.currentStrokeStyle != strokeStyle ||\n            state.currentLineCap != lineCap ||\n            (lineDash != state.currentLineDash &&\n                !equals(state.currentLineDash, lineDash)) ||\n            state.currentLineDashOffset != lineDashOffset ||\n            state.currentLineJoin != lineJoin ||\n            state.currentLineWidth != lineWidth ||\n            state.currentMiterLimit != miterLimit) {\n            if (st
 rokeStyle !== undefined) {\n                applyStroke.call(this, state);\n            }\n            state.currentStrokeStyle = strokeStyle;\n            state.currentLineCap = lineCap;\n            state.currentLineDash = lineDash;\n            state.currentLineDashOffset = lineDashOffset;\n            state.currentLineJoin = lineJoin;\n            state.currentLineWidth = lineWidth;\n            state.currentMiterLimit = miterLimit;\n        }\n    };\n    /**\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasBuilder.prototype.endGeometry = function (feature) {\n        this.beginGeometryInstruction1_[2] = this.instructions.length;\n        this.beginGeometryInstruction1_ = null;\n        this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;\n        this.beginGeometryInstruction2_ = null;\n        var endGeometryInstruction = [CanvasInstruction.END_GEOMETRY, feature];\n        this.instructions.push(endGeometryIn
 struction);\n        this.hitDetectionInstructions.push(endGeometryInstruction);\n    };\n    /**\n     * Get the buffered rendering extent.  Rendering will be clipped to the extent\n     * provided to the constructor.  To account for symbolizers that may intersect\n     * this extent, we calculate a buffered extent (e.g. based on stroke width).\n     * @return {import(\"../../extent.js\").Extent} The buffered rendering extent.\n     * @protected\n     */\n    CanvasBuilder.prototype.getBufferedMaxExtent = function () {\n        if (!this.bufferedMaxExtent_) {\n            this.bufferedMaxExtent_ = clone(this.maxExtent);\n            if (this.maxLineWidth > 0) {\n                var width = (this.resolution * (this.maxLineWidth + 1)) / 2;\n                buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);\n            }\n        }\n        return this.bufferedMaxExtent_;\n    };\n    return CanvasBuilder;\n}(VectorContext));\nexport default CanvasBuilder;\n//# sourceMa
 ppingURL=Builder.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/ImageBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\nvar CanvasImageBuilder = /** @class */ (function (_super) {\n    __extends(CanvasImageBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximu
 m extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasImageBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        var _this = _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n        /**\n         * @private\n         * @type {import(\"../canvas.js\").DeclutterGroups}\n         */\n        _this.declutterGroups_ = null;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n         */\n        _this.hitDetectionImage_ = null;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.imagePixelRatio_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.anchorX_ = undefined;\
 n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.anchorY_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.height_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.opacity_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.originX_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.originY_ = undefined;\n        /**\n         * @private\n         * @type {boolean|undefined}\n         */\n        _this.rotateWithView_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.rotation_ = undefined;\n        /**\n         * @private\n         * @type {import(\"../../size.js\").Size|undefined}\n         */\n        _this.scale_ = undefined;
 \n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.width_ = undefined;\n        return _this;\n    }\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @private\n     * @return {number} My end.\n     */\n    CanvasImageBuilder.prototype.drawCoordinates_ = function (flatCoordinates, offset, end, stride) {\n        return this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);\n    };\n    /**\n     * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} pointGeometry Point geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasImageBuilder.prototype.drawPoint = function (pointGeometry, feature) {\n        if (!this.image_) {\n            return;\n        }\n        this.beginGeometry(pointGeomet
 ry, feature);\n        var flatCoordinates = pointGeometry.getFlatCoordinates();\n        var stride = pointGeometry.getStride();\n        var myBegin = this.coordinates.length;\n        var myEnd = this.drawCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n        this.instructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n            this.image_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_ * this.imagePixelRatio_,\n            this.anchorY_ * this.imagePixelRatio_,\n            this.declutterGroups_,\n            Math.ceil(this.height_ * this.imagePixelRatio_),\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n            this.rotation_,\n            [\n                (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n                (this.scale_[1] * this.pixelRatio) / this.i
 magePixelRatio_,\n            ],\n            Math.ceil(this.width_ * this.imagePixelRatio_),\n        ]);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n            this.hitDetectionImage_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_,\n            this.anchorY_,\n            this.declutterGroups_,\n            this.height_,\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n            this.rotation_,\n            this.scale_,\n            this.width_,\n        ]);\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} multiPointGeometry MultiPoint geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasImageBuilder.prototype.drawMu
 ltiPoint = function (multiPointGeometry, feature) {\n        if (!this.image_) {\n            return;\n        }\n        this.beginGeometry(multiPointGeometry, feature);\n        var flatCoordinates = multiPointGeometry.getFlatCoordinates();\n        var stride = multiPointGeometry.getStride();\n        var myBegin = this.coordinates.length;\n        var myEnd = this.drawCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n        this.instructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n            this.image_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_ * this.imagePixelRatio_,\n            this.anchorY_ * this.imagePixelRatio_,\n            this.declutterGroups_,\n            Math.ceil(this.height_ * this.imagePixelRatio_),\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n            t
 his.rotation_,\n            [\n                (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n                (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n            ],\n            Math.ceil(this.width_ * this.imagePixelRatio_),\n        ]);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n            this.hitDetectionImage_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_,\n            this.anchorY_,\n            this.declutterGroups_,\n            this.height_,\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n            this.rotation_,\n            this.scale_,\n            this.width_,\n        ]);\n        this.endGeometry(feature);\n    };\n    /**\n     * @return {import(\"./Builder.js\").SerializableInstructions} the serializable instruct
 ions.\n     */\n    CanvasImageBuilder.prototype.finish = function () {\n        this.reverseHitDetectionInstructions();\n        // FIXME this doesn't really protect us against further calls to draw*Geometry\n        this.anchorX_ = undefined;\n        this.anchorY_ = undefined;\n        this.hitDetectionImage_ = null;\n        this.image_ = null;\n        this.imagePixelRatio_ = undefined;\n        this.height_ = undefined;\n        this.scale_ = undefined;\n        this.opacity_ = undefined;\n        this.originX_ = undefined;\n        this.originY_ = undefined;\n        this.rotateWithView_ = undefined;\n        this.rotation_ = undefined;\n        this.width_ = undefined;\n        return _super.prototype.finish.call(this);\n    };\n    /**\n     * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n     * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroups Declutter.\n     */\n    CanvasImageBuilder.prototype.setImageStyle = function (imageSt
 yle, declutterGroups) {\n        var anchor = imageStyle.getAnchor();\n        var size = imageStyle.getSize();\n        var hitDetectionImage = imageStyle.getHitDetectionImage();\n        var image = imageStyle.getImage(this.pixelRatio);\n        var origin = imageStyle.getOrigin();\n        this.imagePixelRatio_ = imageStyle.getPixelRatio(this.pixelRatio);\n        this.anchorX_ = anchor[0];\n        this.anchorY_ = anchor[1];\n        this.declutterGroups_ = declutterGroups;\n        this.hitDetectionImage_ = hitDetectionImage;\n        this.image_ = image;\n        this.height_ = size[1];\n        this.opacity_ = imageStyle.getOpacity();\n        this.originX_ = origin[0];\n        this.originY_ = origin[1];\n        this.rotateWithView_ = imageStyle.getRotateWithView();\n        this.rotation_ = imageStyle.getRotation();\n        this.scale_ = imageStyle.getScaleArray();\n        this.width_ = size[0];\n    };\n    return CanvasImageBuilder;\n}(CanvasBuilder));\nexport default 
 CanvasImageBuilder;\n//# sourceMappingURL=ImageBuilder.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/LineStringBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, { beginPathInstruction, strokeInstruction, } from './Instruction.js';\nvar CanvasLineStringBuilder = /** @class */ (function (_super) {\n    __extends(CanvasLineStringBuilder, _super);\n    /**\n     * @param
  {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasLineStringBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        return _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n    }\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @private\n     * @return {number} end.\n     */\n    CanvasLineStringBuilder.prototype.drawFlatCoordinates_ = function (flatCoordinates, offset, end, stride) {\n        var myBegin = this.coordinates.length;\n        var myEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);\n        var moveToLineToInstruction = [\n            CanvasInstruction.MOVE_TO_LINE_TO,\n          
   myBegin,\n            myEnd,\n        ];\n        this.instructions.push(moveToLineToInstruction);\n        this.hitDetectionInstructions.push(moveToLineToInstruction);\n        return end;\n    };\n    /**\n     * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} lineStringGeometry Line string geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasLineStringBuilder.prototype.drawLineString = function (lineStringGeometry, feature) {\n        var state = this.state;\n        var strokeStyle = state.strokeStyle;\n        var lineWidth = state.lineWidth;\n        if (strokeStyle === undefined || lineWidth === undefined) {\n            return;\n        }\n        this.updateStrokeStyle(state, this.applyStroke);\n        this.beginGeometry(lineStringGeometry, feature);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.SET_STROKE_STYLE,\n            state.strokeStyle,\n    
         state.lineWidth,\n            state.lineCap,\n            state.lineJoin,\n            state.miterLimit,\n            state.lineDash,\n            state.lineDashOffset,\n        ], beginPathInstruction);\n        var flatCoordinates = lineStringGeometry.getFlatCoordinates();\n        var stride = lineStringGeometry.getStride();\n        this.drawFlatCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n        this.hitDetectionInstructions.push(strokeInstruction);\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasLineStringBuilder.prototype.drawMultiLineString = function (multiLineStringGeometry, feature) {\n        var state = this.state;\n        var strokeStyle = state.strokeStyle;\n        var lineWidth = state.li
 neWidth;\n        if (strokeStyle === undefined || lineWidth === undefined) {\n            return;\n        }\n        this.updateStrokeStyle(state, this.applyStroke);\n        this.beginGeometry(multiLineStringGeometry, feature);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.SET_STROKE_STYLE,\n            state.strokeStyle,\n            state.lineWidth,\n            state.lineCap,\n            state.lineJoin,\n            state.miterLimit,\n            state.lineDash,\n            state.lineDashOffset,\n        ], beginPathInstruction);\n        var ends = multiLineStringGeometry.getEnds();\n        var flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n        var stride = multiLineStringGeometry.getStride();\n        var offset = 0;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            offset = this.drawFlatCoordinates_(flatCoordinates, offset, \n            /** @type {number} */ (ends[i]), stride);\n        }\n       
  this.hitDetectionInstructions.push(strokeInstruction);\n        this.endGeometry(feature);\n    };\n    /**\n     * @return {import(\"./Builder.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasLineStringBuilder.prototype.finish = function () {\n        var state = this.state;\n        if (state.lastStroke != undefined &&\n            state.lastStroke != this.coordinates.length) {\n            this.instructions.push(strokeInstruction);\n        }\n        this.reverseHitDetectionInstructions();\n        this.state = null;\n        return _super.prototype.finish.call(this);\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     */\n    CanvasLineStringBuilder.prototype.applyStroke = function (state) {\n        if (state.lastStroke != undefined &&\n            state.lastStroke != this.coordinates.length) {\n            this.instructions.push(strokeInstruction);\n            state.lastStroke = this.coordinates.len
 gth;\n        }\n        state.lastStroke = 0;\n        _super.prototype.applyStroke.call(this, state);\n        this.instructions.push(beginPathInstruction);\n    };\n    return CanvasLineStringBuilder;\n}(CanvasBuilder));\nexport default CanvasLineStringBuilder;\n//# sourceMappingURL=LineStringBuilder.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/PolygonBuilder\n */\nimport CanvasBuilder from './B
 uilder.js';\nimport CanvasInstruction, { beginPathInstruction, closePathInstruction, fillInstruction, strokeInstruction, } from './Instruction.js';\nimport { defaultFillStyle } from '../canvas.js';\nimport { snap } from '../../geom/flat/simplify.js';\nvar CanvasPolygonBuilder = /** @class */ (function (_super) {\n    __extends(CanvasPolygonBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasPolygonBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        return _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n    }\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {Array<number>} ends Ends.\n     * @param {number} stride Stride.\n     * @private\n     * @re
 turn {number} End.\n     */\n    CanvasPolygonBuilder.prototype.drawFlatCoordinatess_ = function (flatCoordinates, offset, ends, stride) {\n        var state = this.state;\n        var fill = state.fillStyle !== undefined;\n        var stroke = state.strokeStyle !== undefined;\n        var numEnds = ends.length;\n        this.instructions.push(beginPathInstruction);\n        this.hitDetectionInstructions.push(beginPathInstruction);\n        for (var i = 0; i < numEnds; ++i) {\n            var end = ends[i];\n            var myBegin = this.coordinates.length;\n            var myEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, true, !stroke);\n            var moveToLineToInstruction = [\n                CanvasInstruction.MOVE_TO_LINE_TO,\n                myBegin,\n                myEnd,\n            ];\n            this.instructions.push(moveToLineToInstruction);\n            this.hitDetectionInstructions.push(moveToLineToInstruction);\n            if (stroke) {\
 n                // Performance optimization: only call closePath() when we have a stroke.\n                // Otherwise the ring is closed already (see appendFlatCoordinates above).\n                this.instructions.push(closePathInstruction);\n                this.hitDetectionInstructions.push(closePathInstruction);\n            }\n            offset = end;\n        }\n        if (fill) {\n            this.instructions.push(fillInstruction);\n            this.hitDetectionInstructions.push(fillInstruction);\n        }\n        if (stroke) {\n            this.instructions.push(strokeInstruction);\n            this.hitDetectionInstructions.push(strokeInstruction);\n        }\n        return offset;\n    };\n    /**\n     * @param {import(\"../../geom/Circle.js\").default} circleGeometry Circle geometry.\n     * @param {import(\"../../Feature.js\").default} feature Feature.\n     */\n    CanvasPolygonBuilder.prototype.drawCircle = function (circleGeometry, feature) {\n        var sta
 te = this.state;\n        var fillStyle = state.fillStyle;\n        var strokeStyle = state.strokeStyle;\n        if (fillStyle === undefined && strokeStyle === undefined) {\n            return;\n        }\n        this.setFillStrokeStyles_();\n        this.beginGeometry(circleGeometry, feature);\n        if (state.fillStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_FILL_STYLE,\n                defaultFillStyle,\n            ]);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_STROKE_STYLE,\n                state.strokeStyle,\n                state.lineWidth,\n                state.lineCap,\n                state.lineJoin,\n                state.miterLimit,\n                state.lineDash,\n                state.lineDashOffset,\n            ]);\n        }\n        var flatCoordinates = circleGeometry.getFlatCoordinates();\
 n        var stride = circleGeometry.getStride();\n        var myBegin = this.coordinates.length;\n        this.appendFlatCoordinates(flatCoordinates, 0, flatCoordinates.length, stride, false, false);\n        var circleInstruction = [CanvasInstruction.CIRCLE, myBegin];\n        this.instructions.push(beginPathInstruction, circleInstruction);\n        this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);\n        if (state.fillStyle !== undefined) {\n            this.instructions.push(fillInstruction);\n            this.hitDetectionInstructions.push(fillInstruction);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.instructions.push(strokeInstruction);\n            this.hitDetectionInstructions.push(strokeInstruction);\n        }\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} polygonGeometry Polygon geometry.\n     * @param {import(\".
 ./../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasPolygonBuilder.prototype.drawPolygon = function (polygonGeometry, feature) {\n        var state = this.state;\n        var fillStyle = state.fillStyle;\n        var strokeStyle = state.strokeStyle;\n        if (fillStyle === undefined && strokeStyle === undefined) {\n            return;\n        }\n        this.setFillStrokeStyles_();\n        this.beginGeometry(polygonGeometry, feature);\n        if (state.fillStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_FILL_STYLE,\n                defaultFillStyle,\n            ]);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_STROKE_STYLE,\n                state.strokeStyle,\n                state.lineWidth,\n                state.lineCap,\n                state.lineJoin,\n                state.miterLimit,\n    
             state.lineDash,\n                state.lineDashOffset,\n            ]);\n        }\n        var ends = polygonGeometry.getEnds();\n        var flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n        var stride = polygonGeometry.getStride();\n        this.drawFlatCoordinatess_(flatCoordinates, 0, \n        /** @type {Array<number>} */ (ends), stride);\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasPolygonBuilder.prototype.drawMultiPolygon = function (multiPolygonGeometry, feature) {\n        var state = this.state;\n        var fillStyle = state.fillStyle;\n        var strokeStyle = state.strokeStyle;\n        if (fillStyle === undefined && strokeStyle === undefined) {\n            return;\n        }\n        this.setFillStrokeStyles_();\n        thi
 s.beginGeometry(multiPolygonGeometry, feature);\n        if (state.fillStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_FILL_STYLE,\n                defaultFillStyle,\n            ]);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_STROKE_STYLE,\n                state.strokeStyle,\n                state.lineWidth,\n                state.lineCap,\n                state.lineJoin,\n                state.miterLimit,\n                state.lineDash,\n                state.lineDashOffset,\n            ]);\n        }\n        var endss = multiPolygonGeometry.getEndss();\n        var flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();\n        var stride = multiPolygonGeometry.getStride();\n        var offset = 0;\n        for (var i = 0, ii = endss.length; i < ii; ++i) {\n            offset = this.drawFlatCoordin
 atess_(flatCoordinates, offset, endss[i], stride);\n        }\n        this.endGeometry(feature);\n    };\n    /**\n     * @return {import(\"./Builder.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasPolygonBuilder.prototype.finish = function () {\n        this.reverseHitDetectionInstructions();\n        this.state = null;\n        // We want to preserve topology when drawing polygons.  Polygons are\n        // simplified using quantization and point elimination. However, we might\n        // have received a mix of quantized and non-quantized geometries, so ensure\n        // that all are quantized by quantizing all coordinates in the batch.\n        var tolerance = this.tolerance;\n        if (tolerance !== 0) {\n            var coordinates = this.coordinates;\n            for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n                coordinates[i] = snap(coordinates[i], tolerance);\n            }\n        }\n        return _super.protot
 ype.finish.call(this);\n    };\n    /**\n     * @private\n     */\n    CanvasPolygonBuilder.prototype.setFillStrokeStyles_ = function () {\n        var state = this.state;\n        var fillStyle = state.fillStyle;\n        if (fillStyle !== undefined) {\n            this.updateFillStyle(state, this.createFill);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.updateStrokeStyle(state, this.applyStroke);\n        }\n    };\n    return CanvasPolygonBuilder;\n}(CanvasBuilder));\nexport default CanvasPolygonBuilder;\n//# sourceMappingURL=PolygonBuilder.js.map","/**\n * @module ol/geom/flat/straightchunk\n */\n/**\n * @param {number} maxAngle Maximum acceptable angle delta between segments.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Array<number>} Start and end of the first suitable chunk of the\n * given `flatCoordinates`.\n */\nexp
 ort function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {\n    var chunkStart = offset;\n    var chunkEnd = offset;\n    var chunkM = 0;\n    var m = 0;\n    var start = offset;\n    var acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n    for (i = offset; i < end; i += stride) {\n        var x2 = flatCoordinates[i];\n        var y2 = flatCoordinates[i + 1];\n        if (x1 !== undefined) {\n            x23 = x2 - x1;\n            y23 = y2 - y1;\n            m23 = Math.sqrt(x23 * x23 + y23 * y23);\n            if (x12 !== undefined) {\n                m += m12;\n                acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n                if (acos > maxAngle) {\n                    if (m > chunkM) {\n                        chunkM = m;\n                        chunkStart = start;\n                        chunkEnd = i;\n                    }\n                    m = 0;\n                    start = i - stride;\n                }\n            }\n          
   m12 = m23;\n            x12 = x23;\n            y12 = y23;\n        }\n        x1 = x2;\n        y1 = y2;\n    }\n    m += m23;\n    return m > chunkM ? [start, i] : [chunkStart, chunkEnd];\n}\n//# sourceMappingURL=straightchunk.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/TextBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\nimport Geomet
 ryType from '../../geom/GeometryType.js';\nimport TextPlacement from '../../style/TextPlacement.js';\nimport { asColorLike } from '../../colorlike.js';\nimport { defaultFillStyle, defaultFont, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultPadding, defaultStrokeStyle, defaultTextAlign, defaultTextBaseline, registerFont, } from '../canvas.js';\nimport { getUid } from '../../util.js';\nimport { intersects } from '../../extent.js';\nimport { matchingChunk } from '../../geom/flat/straightchunk.js';\n/**\n * @const\n * @enum {number}\n */\nexport var TEXT_ALIGN = {\n    'left': 0,\n    'end': 0,\n    'center': 0.5,\n    'right': 1,\n    'start': 1,\n    'top': 0,\n    'middle': 0.5,\n    'hanging': 0.2,\n    'alphabetic': 0.8,\n    'ideographic': 0.8,\n    'bottom': 1,\n};\nvar CanvasTextBuilder = /** @class */ (function (_super) {\n    __extends(CanvasTextBuilder, _super);\n    /**\n     * @param {number} tolerance To
 lerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasTextBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        var _this = _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n        /**\n         * @private\n         * @type {import(\"../canvas.js\").DeclutterGroups}\n         */\n        _this.declutterGroups_;\n        /**\n         * @private\n         * @type {Array<HTMLCanvasElement>}\n         */\n        _this.labels_ = null;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.text_ = '';\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetX_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetY_ = 0;\n        /**\n         * @private\n         * @type {
 boolean|undefined}\n         */\n        _this.textRotateWithView_ = undefined;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textRotation_ = 0;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.textFillState_ = null;\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").FillState>}\n         */\n        _this.fillStates = {};\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.textStrokeState_ = null;\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n         */\n        _this.strokeStates = {};\n        /**\n         * @private\n         * @type {import(\"../canvas.js\").TextState}\n         */\n        _this.textState_ = /** @type {import(\"../canvas.js\").TextState} */ ({});\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").
 TextState>}\n         */\n        _this.textStates = {};\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.textKey_ = '';\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.fillKey_ = '';\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.strokeKey_ = '';\n        return _this;\n    }\n    /**\n     * @return {import(\"./Builder.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasTextBuilder.prototype.finish = function () {\n        var instructions = _super.prototype.finish.call(this);\n        instructions.textStates = this.textStates;\n        instructions.fillStates = this.fillStates;\n        instructions.strokeStates = this.strokeStates;\n        return instructions;\n    };\n    /**\n     * @param {import(\"../../geom/SimpleGeometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n     * @param {import(\"../../Fe
 ature.js\").FeatureLike} feature Feature.\n     */\n    CanvasTextBuilder.prototype.drawText = function (geometry, feature) {\n        var fillState = this.textFillState_;\n        var strokeState = this.textStrokeState_;\n        var textState = this.textState_;\n        if (this.text_ === '' || !textState || (!fillState && !strokeState)) {\n            return;\n        }\n        var begin = this.coordinates.length;\n        var geometryType = geometry.getType();\n        var flatCoordinates = null;\n        var end = 2;\n        var stride = geometry.getStride();\n        var i, ii;\n        if (textState.placement === TextPlacement.LINE) {\n            if (!intersects(this.getBufferedMaxExtent(), geometry.getExtent())) {\n                return;\n            }\n            var ends = void 0;\n            flatCoordinates = geometry.getFlatCoordinates();\n            if (geometryType == GeometryType.LINE_STRING) {\n                ends = [flatCoordinates.length];\n            }\n 
            else if (geometryType == GeometryType.MULTI_LINE_STRING) {\n                ends = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds();\n            }\n            else if (geometryType == GeometryType.POLYGON) {\n                ends = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry)\n                    .getEnds()\n                    .slice(0, 1);\n            }\n            else if (geometryType == GeometryType.MULTI_POLYGON) {\n                var endss = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getEndss();\n                ends = [];\n                for (i = 0, ii = endss.length; i < ii; ++i) {\n                    ends.push(endss[i][0]);\n                }\n            }\n            this.beginGeometry(geometry, feature);\n            var textAlign = textState.textAlign;\n            var flatOffset = 0;\n            var flatEnd = void 0;\n            for (var o = 0, oo = ends.leng
 th; o < oo; ++o) {\n                if (textAlign == undefined) {\n                    var range = matchingChunk(textState.maxAngle, flatCoordinates, flatOffset, ends[o], stride);\n                    flatOffset = range[0];\n                    flatEnd = range[1];\n                }\n                else {\n                    flatEnd = ends[o];\n                }\n                for (i = flatOffset; i < flatEnd; i += stride) {\n                    this.coordinates.push(flatCoordinates[i], flatCoordinates[i + 1]);\n                }\n                end = this.coordinates.length;\n                flatOffset = ends[o];\n                var declutterGroup = this.declutterGroups_\n                    ? o === 0\n                        ? this.declutterGroups_[0]\n                        : [].concat(this.declutterGroups_[0])\n                    : null;\n                this.drawChars_(begin, end, declutterGroup);\n                begin = end;\n            }\n            this.endGeometr
 y(feature);\n        }\n        else {\n            var geometryWidths = null;\n            if (!textState.overflow) {\n                geometryWidths = [];\n            }\n            switch (geometryType) {\n                case GeometryType.POINT:\n                case GeometryType.MULTI_POINT:\n                    flatCoordinates = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry).getFlatCoordinates();\n                    end = flatCoordinates.length;\n                    break;\n                case GeometryType.LINE_STRING:\n                    flatCoordinates = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry).getFlatMidpoint();\n                    break;\n                case GeometryType.CIRCLE:\n                    flatCoordinates = /** @type {import(\"../../geom/Circle.js\").default} */ (geometry).getCenter();\n                    break;\n                case GeometryType.MULTI_LINE_STRING:\n                    flatCoordinates =
  /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getFlatMidpoints();\n                    stride = 2;\n                    end = flatCoordinates.length;\n                    break;\n                case GeometryType.POLYGON:\n                    flatCoordinates = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getFlatInteriorPoint();\n                    if (!textState.overflow) {\n                        geometryWidths.push(flatCoordinates[2] / this.resolution);\n                    }\n                    stride = 3;\n                    break;\n                case GeometryType.MULTI_POLYGON:\n                    var interiorPoints = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getFlatInteriorPoints();\n                    flatCoordinates = [];\n                    for (i = 0, ii = interiorPoints.length; i < ii; i += 3) {\n                        if (!textState.overflow) {\n                            geom
 etryWidths.push(interiorPoints[i + 2] / this.resolution);\n                        }\n                        flatCoordinates.push(interiorPoints[i], interiorPoints[i + 1]);\n                    }\n                    stride = 2;\n                    end = flatCoordinates.length;\n                    if (end == 0) {\n                        return;\n                    }\n                    break;\n                default:\n            }\n            end = this.appendFlatCoordinates(flatCoordinates, 0, end, stride, false, false);\n            this.saveTextStates_();\n            if (textState.backgroundFill || textState.backgroundStroke) {\n                this.setFillStrokeStyle(textState.backgroundFill, textState.backgroundStroke);\n                if (textState.backgroundFill) {\n                    this.updateFillStyle(this.state, this.createFill);\n                    this.hitDetectionInstructions.push(this.createFill(this.state));\n                }\n                if (textS
 tate.backgroundStroke) {\n                    this.updateStrokeStyle(this.state, this.applyStroke);\n                    this.hitDetectionInstructions.push(this.createStroke(this.state));\n                }\n            }\n            this.beginGeometry(geometry, feature);\n            // adjust padding for negative scale\n            var padding = textState.padding;\n            if (padding != defaultPadding &&\n                (textState.scale[0] < 0 || textState.scale[1] < 0)) {\n                var p0 = textState.padding[0];\n                var p1 = textState.padding[1];\n                var p2 = textState.padding[2];\n                var p3 = textState.padding[3];\n                if (textState.scale[0] < 0) {\n                    p1 = -p1;\n                    p3 = -p3;\n                }\n                if (textState.scale[1] < 0) {\n                    p0 = -p0;\n                    p2 = -p2;\n                }\n                padding = [p0, p1, p2, p3];\n            }\n 
            // The image is unknown at this stage so we pass null; it will be computed at render time.\n            // For clarity, we pass NaN for offsetX, offsetY, width and height, which will be computed at\n            // render time.\n            var pixelRatio_1 = this.pixelRatio;\n            this.instructions.push([\n                CanvasInstruction.DRAW_IMAGE,\n                begin,\n                end,\n                null,\n                NaN,\n                NaN,\n                this.declutterGroups_,\n                NaN,\n                1,\n                0,\n                0,\n                this.textRotateWithView_,\n                this.textRotation_,\n                [1, 1],\n                NaN,\n                padding == defaultPadding\n                    ? defaultPadding\n                    : padding.map(function (p) {\n                        return p * pixelRatio_1;\n                    }),\n                !!textState.backgroundFill,\n           
      !!textState.backgroundStroke,\n                this.text_,\n                this.textKey_,\n                this.strokeKey_,\n                this.fillKey_,\n                this.textOffsetX_,\n                this.textOffsetY_,\n                geometryWidths,\n            ]);\n            var scale = 1 / pixelRatio_1;\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.DRAW_IMAGE,\n                begin,\n                end,\n                null,\n                NaN,\n                NaN,\n                this.declutterGroups_,\n                NaN,\n                1,\n                0,\n                0,\n                this.textRotateWithView_,\n                this.textRotation_,\n                [scale, scale],\n                NaN,\n                padding,\n                !!textState.backgroundFill,\n                !!textState.backgroundStroke,\n                this.text_,\n                this.textKey_,\n                this.st
 rokeKey_,\n                this.fillKey_,\n                this.textOffsetX_,\n                this.textOffsetY_,\n                geometryWidths,\n            ]);\n            this.endGeometry(feature);\n        }\n    };\n    /**\n     * @private\n     */\n    CanvasTextBuilder.prototype.saveTextStates_ = function () {\n        var strokeState = this.textStrokeState_;\n        var textState = this.textState_;\n        var fillState = this.textFillState_;\n        var strokeKey = this.strokeKey_;\n        if (strokeState) {\n            if (!(strokeKey in this.strokeStates)) {\n                this.strokeStates[strokeKey] = {\n                    strokeStyle: strokeState.strokeStyle,\n                    lineCap: strokeState.lineCap,\n                    lineDashOffset: strokeState.lineDashOffset,\n                    lineWidth: strokeState.lineWidth,\n                    lineJoin: strokeState.lineJoin,\n                    miterLimit: strokeState.miterLimit,\n                    l
 ineDash: strokeState.lineDash,\n                };\n            }\n        }\n        var textKey = this.textKey_;\n        if (!(textKey in this.textStates)) {\n            this.textStates[textKey] = {\n                font: textState.font,\n                textAlign: textState.textAlign || defaultTextAlign,\n                textBaseline: textState.textBaseline || defaultTextBaseline,\n                scale: textState.scale,\n            };\n        }\n        var fillKey = this.fillKey_;\n        if (fillState) {\n            if (!(fillKey in this.fillStates)) {\n                this.fillStates[fillKey] = {\n                    fillStyle: fillState.fillStyle,\n                };\n            }\n        }\n    };\n    /**\n     * @private\n     * @param {number} begin Begin.\n     * @param {number} end End.\n     * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n     */\n    CanvasTextBuilder.prototype.drawChars_ = function (begin, end, declutterGr
 oup) {\n        var strokeState = this.textStrokeState_;\n        var textState = this.textState_;\n        var strokeKey = this.strokeKey_;\n        var textKey = this.textKey_;\n        var fillKey = this.fillKey_;\n        this.saveTextStates_();\n        var pixelRatio = this.pixelRatio;\n        var baseline = TEXT_ALIGN[textState.textBaseline];\n        var offsetY = this.textOffsetY_ * pixelRatio;\n        var text = this.text_;\n        var strokeWidth = strokeState\n            ? (strokeState.lineWidth * Math.abs(textState.scale[0])) / 2\n            : 0;\n        this.instructions.push([\n            CanvasInstruction.DRAW_CHARS,\n            begin,\n            end,\n            baseline,\n            declutterGroup,\n            textState.overflow,\n            fillKey,\n            textState.maxAngle,\n            pixelRatio,\n            offsetY,\n            strokeKey,\n            strokeWidth * pixelRatio,\n            text,\n            textKey,\n            1,\n   
      ]);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.DRAW_CHARS,\n            begin,\n            end,\n            baseline,\n            declutterGroup,\n            textState.overflow,\n            fillKey,\n            textState.maxAngle,\n            1,\n            offsetY,\n            strokeKey,\n            strokeWidth,\n            text,\n            textKey,\n            1 / pixelRatio,\n        ]);\n    };\n    /**\n     * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n     * @param {import(\"../canvas.js\").DeclutterGroups} declutterGroups Declutter.\n     */\n    CanvasTextBuilder.prototype.setTextStyle = function (textStyle, declutterGroups) {\n        var textState, fillState, strokeState;\n        if (!textStyle) {\n            this.text_ = '';\n        }\n        else {\n            this.declutterGroups_ = declutterGroups;\n            var textFillStyle = textStyle.getFill();\n            if (!textFillStyle)
  {\n                fillState = null;\n                this.textFillState_ = fillState;\n            }\n            else {\n                fillState = this.textFillState_;\n                if (!fillState) {\n                    fillState = /** @type {import(\"../canvas.js\").FillState} */ ({});\n                    this.textFillState_ = fillState;\n                }\n                fillState.fillStyle = asColorLike(textFillStyle.getColor() || defaultFillStyle);\n            }\n            var textStrokeStyle = textStyle.getStroke();\n            if (!textStrokeStyle) {\n                strokeState = null;\n                this.textStrokeState_ = strokeState;\n            }\n            else {\n                strokeState = this.textStrokeState_;\n                if (!strokeState) {\n                    strokeState = /** @type {import(\"../canvas.js\").StrokeState} */ ({});\n                    this.textStrokeState_ = strokeState;\n                }\n                var lineDash = 
 textStrokeStyle.getLineDash();\n                var lineDashOffset = textStrokeStyle.getLineDashOffset();\n                var lineWidth = textStrokeStyle.getWidth();\n                var miterLimit = textStrokeStyle.getMiterLimit();\n                strokeState.lineCap = textStrokeStyle.getLineCap() || defaultLineCap;\n                strokeState.lineDash = lineDash ? lineDash.slice() : defaultLineDash;\n                strokeState.lineDashOffset =\n                    lineDashOffset === undefined ? defaultLineDashOffset : lineDashOffset;\n                strokeState.lineJoin = textStrokeStyle.getLineJoin() || defaultLineJoin;\n                strokeState.lineWidth =\n                    lineWidth === undefined ? defaultLineWidth : lineWidth;\n                strokeState.miterLimit =\n                    miterLimit === undefined ? defaultMiterLimit : miterLimit;\n                strokeState.strokeStyle = asColorLike(textStrokeStyle.getColor() || defaultStrokeStyle);\n            }\
 n            textState = this.textState_;\n            var font = textStyle.getFont() || defaultFont;\n            registerFont(font);\n            var textScale = textStyle.getScaleArray();\n            textState.overflow = textStyle.getOverflow();\n            textState.font = font;\n            textState.maxAngle = textStyle.getMaxAngle();\n            textState.placement = textStyle.getPlacement();\n            textState.textAlign = textStyle.getTextAlign();\n            textState.textBaseline =\n                textStyle.getTextBaseline() || defaultTextBaseline;\n            textState.backgroundFill = textStyle.getBackgroundFill();\n            textState.backgroundStroke = textStyle.getBackgroundStroke();\n            textState.padding = textStyle.getPadding() || defaultPadding;\n            textState.scale = textScale === undefined ? [1, 1] : textScale;\n            var textOffsetX = textStyle.getOffsetX();\n            var textOffsetY = textStyle.getOffsetY();\n            va
 r textRotateWithView = textStyle.getRotateWithView();\n            var textRotation = textStyle.getRotation();\n            this.text_ = textStyle.getText() || '';\n            this.textOffsetX_ = textOffsetX === undefined ? 0 : textOffsetX;\n            this.textOffsetY_ = textOffsetY === undefined ? 0 : textOffsetY;\n            this.textRotateWithView_ =\n                textRotateWithView === undefined ? false : textRotateWithView;\n            this.textRotation_ = textRotation === undefined ? 0 : textRotation;\n            this.strokeKey_ = strokeState\n                ? (typeof strokeState.strokeStyle == 'string'\n                    ? strokeState.strokeStyle\n                    : getUid(strokeState.strokeStyle)) +\n                    strokeState.lineCap +\n                    strokeState.lineDashOffset +\n                    '|' +\n                    strokeState.lineWidth +\n                    strokeState.lineJoin +\n                    strokeState.miterLimit +\n         
            '[' +\n                    strokeState.lineDash.join() +\n                    ']'\n                : '';\n            this.textKey_ =\n                textState.font +\n                    textState.scale +\n                    (textState.textAlign || '?') +\n                    (textState.textBaseline || '?');\n            this.fillKey_ = fillState\n                ? typeof fillState.fillStyle == 'string'\n                    ? fillState.fillStyle\n                    : '|' + getUid(fillState.fillStyle)\n                : '';\n        }\n    };\n    return CanvasTextBuilder;\n}(CanvasBuilder));\nexport default CanvasTextBuilder;\n//# sourceMappingURL=TextBuilder.js.map","/**\n * @module ol/render/canvas/BuilderGroup\n */\nimport Builder from './Builder.js';\nimport ImageBuilder from './ImageBuilder.js';\nimport LineStringBuilder from './LineStringBuilder.js';\nimport PolygonBuilder from './PolygonBuilder.js';\nimport TextBuilder from './TextBuilder.js';\n/**\n * @type {O
 bject<import(\"./BuilderType\").default, typeof Builder>}\n */\nvar BATCH_CONSTRUCTORS = {\n    'Circle': PolygonBuilder,\n    'Default': Builder,\n    'Image': ImageBuilder,\n    'LineString': LineStringBuilder,\n    'Polygon': PolygonBuilder,\n    'Text': TextBuilder,\n};\nvar BuilderGroup = /** @class */ (function () {\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Max extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {boolean} declutter Decluttering enabled.\n     */\n    function BuilderGroup(tolerance, maxExtent, resolution, pixelRatio, declutter) {\n        /**\n         * @type {boolean}\n         * @private\n         */\n        this.declutter_ = declutter;\n        /**\n         * @type {import(\"../canvas.js\").DeclutterGroups}\n         * @private\n         */\n        this.declutterGroups_ = null;\n        /**\n         * @private\n   
       * @type {number}\n         */\n        this.tolerance_ = tolerance;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        this.maxExtent_ = maxExtent;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.resolution_ = resolution;\n        /**\n         * @private\n         * @type {!Object<string, !Object<import(\"./BuilderType\").default, Builder>>}\n         */\n        this.buildersByZIndex_ = {};\n    }\n    /**\n     * @param {boolean} group Group with previous builder.\n     * @return {import(\"../canvas\").DeclutterGroups} The resulting instruction groups.\n     */\n    BuilderGroup.prototype.addDeclutter = function (group) {\n        /** @type {Array<*>} */\n        var declutter = null;\n        if (this.declutter_) {\n            if (group) {\n                declu
 tter = this.declutterGroups_;\n                /** @type {number} */ (declutter[0][0])++;\n            }\n            else {\n                declutter = [[1]];\n                this.declutterGroups_ = declutter;\n            }\n        }\n        return declutter;\n    };\n    /**\n     * @return {!Object<string, !Object<import(\"./BuilderType\").default, import(\"./Builder.js\").SerializableInstructions>>} The serializable instructions\n     */\n    BuilderGroup.prototype.finish = function () {\n        var builderInstructions = {};\n        for (var zKey in this.buildersByZIndex_) {\n            builderInstructions[zKey] = builderInstructions[zKey] || {};\n            var builders = this.buildersByZIndex_[zKey];\n            for (var builderKey in builders) {\n                var builderInstruction = builders[builderKey].finish();\n                builderInstructions[zKey][builderKey] = builderInstruction;\n            }\n        }\n        return builderInstructions;\n    };\n  
   /**\n     * @param {number|undefined} zIndex Z index.\n     * @param {import(\"./BuilderType.js\").default} builderType Replay type.\n     * @return {import(\"../VectorContext.js\").default} Replay.\n     */\n    BuilderGroup.prototype.getBuilder = function (zIndex, builderType) {\n        var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n        var replays = this.buildersByZIndex_[zIndexKey];\n        if (replays === undefined) {\n            replays = {};\n            this.buildersByZIndex_[zIndexKey] = replays;\n        }\n        var replay = replays[builderType];\n        if (replay === undefined) {\n            var Constructor = BATCH_CONSTRUCTORS[builderType];\n            replay = new Constructor(this.tolerance_, this.maxExtent_, this.resolution_, this.pixelRatio_);\n            replays[builderType] = replay;\n        }\n        return replay;\n    };\n    return BuilderGroup;\n}());\nexport default BuilderGroup;\n//# sourceMappingURL=BuilderGroup.js.map","
 /**\n * @module ol/geom/flat/textpath\n */\nimport { lerp } from '../../math.js';\nimport { rotate } from './transform.js';\n/**\n * @param {Array<number>} flatCoordinates Path to put text on.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @param {string} text Text to place on the path.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @param {number} scale The product of the text scale and the device pixel ratio.\n * @param {function(string, string, Object<string, number>):number} measureAndCacheTextWidth Measure and cache text width.\n * @param {string} font The font.\n * @param {Object<string, number>} cache A cache of measured widths.\n * @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.\n * @return {Array
 <Array<*>>} The result array (or null if `maxAngle` was\n * exceeded). Entries of the array are x, y, anchorX, angle, chunk.\n */\nexport function drawTextOnPath(flatCoordinates, offset, end, stride, text, startM, maxAngle, scale, measureAndCacheTextWidth, font, cache, rotation) {\n    var result = [];\n    // Keep text upright\n    var reverse;\n    if (rotation) {\n        var rotatedCoordinates = rotate(flatCoordinates, offset, end, stride, rotation, [flatCoordinates[offset], flatCoordinates[offset + 1]]);\n        reverse =\n            rotatedCoordinates[0] >\n                rotatedCoordinates[rotatedCoordinates.length - stride];\n    }\n    else {\n        reverse = flatCoordinates[offset] > flatCoordinates[end - stride];\n    }\n    var numChars = text.length;\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    offset += stride;\n    var x2 = flatCoordinates[offset];\n    var y2 = flatCoordinates[offset + 1];\n    var segmentM = 0;\n    var
  segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n    var angleChanged = false;\n    var index, previousAngle;\n    for (var i = 0; i < numChars; ++i) {\n        index = reverse ? numChars - i - 1 : i;\n        var char = text[index];\n        var charLength = scale * measureAndCacheTextWidth(font, char, cache);\n        var charM = startM + charLength / 2;\n        while (offset < end - stride && segmentM + segmentLength < charM) {\n            x1 = x2;\n            y1 = y2;\n            offset += stride;\n            x2 = flatCoordinates[offset];\n            y2 = flatCoordinates[offset + 1];\n            segmentM += segmentLength;\n            segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n        }\n        var segmentPos = charM - segmentM;\n        var angle = Math.atan2(y2 - y1, x2 - x1);\n        if (reverse) {\n            angle += angle > 0 ? -Math.PI : Math.PI;\n        }\n        if (previousAngle !== undefined) {\n      
       var delta = angle - previousAngle;\n            angleChanged = angleChanged || delta !== 0;\n            delta +=\n                delta > Math.PI ? -2 * Math.PI : delta < -Math.PI ? 2 * Math.PI : 0;\n            if (Math.abs(delta) > maxAngle) {\n                return null;\n            }\n        }\n        previousAngle = angle;\n        var interpolate = segmentPos / segmentLength;\n        var x = lerp(x1, x2, interpolate);\n        var y = lerp(y1, y2, interpolate);\n        result[index] = [x, y, charLength / 2, angle, char];\n        startM += charLength;\n    }\n    return angleChanged\n        ? result\n        : [[result[0][0], result[0][1], result[0][2], result[0][3], text]];\n}\n//# sourceMappingURL=textpath.js.map","/**\n * @module ol/geom/flat/length\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport fu
 nction lineStringLength(flatCoordinates, offset, end, stride) {\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    var length = 0;\n    for (var i = offset + stride; i < end; i += stride) {\n        var x2 = flatCoordinates[i];\n        var y2 = flatCoordinates[i + 1];\n        length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n        x1 = x2;\n        y1 = y2;\n    }\n    return length;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n    var perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n    var dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n    var dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n    perimeter += Math.sqrt(dx * dx + dy * dy
 );\n    return perimeter;\n}\n//# sourceMappingURL=length.js.map","/**\n * @module ol/render/canvas/Executor\n */\nimport CanvasInstruction from './Instruction.js';\nimport RBush from 'rbush/rbush.js';\nimport { TEXT_ALIGN } from './TextBuilder.js';\nimport { WORKER_OFFSCREEN_CANVAS } from '../../has.js';\nimport { apply as applyTransform, compose as composeTransform, create as createTransform, setFromArray as transformSetFromArray, } from '../../transform.js';\nimport { createEmpty, createOrUpdate, getHeight, getWidth, intersects, } from '../../extent.js';\nimport { defaultPadding, defaultTextBaseline, drawImageOrLabel, } from '../canvas.js';\nimport { defaultTextAlign, measureAndCacheTextWidth, measureTextHeight, measureTextWidths, } from '../canvas.js';\nimport { drawTextOnPath } from '../../geom/flat/textpath.js';\nimport { equals } from '../../array.js';\nimport { lineStringLength } from '../../geom/flat/length.js';\nimport { transform2D } from '../../geom/flat/transform.js';\n
 /**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} instructions The rendering instructions.\n * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions.\n * @property {Array<number>} coordinates The array of all coordinates.\n * @property {!Object<string, import(\"../canvas.js\").TextState>} textStates The text states (decluttering).\n * @property {!Object<string, import(\"../canvas.js\").FillState>} fillStates The fill states (decluttering).\n * @property {!Object<string, import(\"../canvas.js\").StrokeState>} strokeStates The stroke states (decluttering).\n */\n/**\n * @type {import(\"../../extent.js\").Extent}\n */\nvar tmpExtent = createEmpty();\n/**\n * @type {!import(\"../../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nvar p1 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nvar p2 = [];\n/** @type {import(\"../../coordin
 ate.js\").Coordinate} */\nvar p3 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nvar p4 = [];\nvar Executor = /** @class */ (function () {\n    /**\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {boolean} overlaps The replay can have overlapping geometries.\n     * @param {SerializableInstructions} instructions The serializable instructions\n     * @param {import(\"../../size.js\").Size} renderBuffer Render buffer (width/height) in pixels.\n     */\n    function Executor(resolution, pixelRatio, overlaps, instructions, renderBuffer) {\n        /**\n         * @protected\n         * @type {boolean}\n         */\n        this.overlaps = overlaps;\n        /**\n         * @protected\n         * @type {number}\n         */\n        this.pixelRatio = pixelRatio;\n        /**\n         * @protected\n         * @const\n         * @type {number}\n         */\n        this.resolution = resolution;\n        /**\n 
         * @private\n         * @type {boolean}\n         */\n        this.alignFill_;\n        /**\n         * @type {Array<*>}\n         */\n        this.declutterItems = [];\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        this.instructions = instructions.instructions;\n        /**\n         * @protected\n         * @type {Array<number>}\n         */\n        this.coordinates = instructions.coordinates;\n        /**\n         * @private\n         * @type {!Object<number,import(\"../../coordinate.js\").Coordinate|Array<import(\"../../coordinate.js\").Coordinate>|Array<Array<import(\"../../coordinate.js\").Coordinate>>>}\n         */\n        this.coordinateCache_ = {};\n        /**\n         * @private\n         * @type {import(\"../../size.js\").Size}\n         */\n        this.renderBuffer_ = renderBuffer;\n        /**\n         * @private\n         * @type {!import(\"../../transform.js\").Transform}\n         */\n        this.renderedTransfo
 rm_ = createTransform();\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        this.hitDetectionInstructions = instructions.hitDetectionInstructions;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.pixelCoordinates_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.viewRotation_ = 0;\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").FillState>}\n         */\n        this.fillStates = instructions.fillStates || {};\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n         */\n        this.strokeStates = instructions.strokeStates || {};\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").TextState>}\n         */\n        this.textStates = instructions.textStates || {};\n        /**\n         * @private\n         * @type {Object<string, Object<string, number>>}\n         */\n     
    this.widths_ = {};\n        /**\n         * @private\n         * @type {Object<string, import(\"../canvas.js\").Label>}\n         */\n        this.labels_ = {};\n    }\n    /**\n     * @param {string} text Text.\n     * @param {string} textKey Text style key.\n     * @param {string} fillKey Fill style key.\n     * @param {string} strokeKey Stroke style key.\n     * @return {import(\"../canvas.js\").Label} Label.\n     */\n    Executor.prototype.createLabel = function (text, textKey, fillKey, strokeKey) {\n        var key = text + textKey + fillKey + strokeKey;\n        if (this.labels_[key]) {\n            return this.labels_[key];\n        }\n        var strokeState = strokeKey ? this.strokeStates[strokeKey] : null;\n        var fillState = fillKey ? this.fillStates[fillKey] : null;\n        var textState = this.textStates[textKey];\n        var pixelRatio = this.pixelRatio;\n        var scale = [\n            textState.scale[0] * pixelRatio,\n            textState.scale[1] * pi
 xelRatio,\n        ];\n        var align = TEXT_ALIGN[textState.textAlign || defaultTextAlign];\n        var strokeWidth = strokeKey && strokeState.lineWidth ? strokeState.lineWidth : 0;\n        var lines = text.split('\\n');\n        var numLines = lines.length;\n        var widths = [];\n        var width = measureTextWidths(textState.font, lines, widths);\n        var lineHeight = measureTextHeight(textState.font);\n        var height = lineHeight * numLines;\n        var renderWidth = width + strokeWidth;\n        var contextInstructions = [];\n        // make canvas 2 pixels wider to account for italic text width measurement errors\n        var w = (renderWidth + 2) * scale[0];\n        var h = (height + strokeWidth) * scale[1];\n        /** @type {import(\"../canvas.js\").Label} */\n        var label = {\n            width: w < 0 ? Math.floor(w) : Math.ceil(w),\n            height: h < 0 ? Math.floor(h) : Math.ceil(h),\n            contextInstructions: contextInstructions,\n 
        };\n        if (scale[0] != 1 || scale[1] != 1) {\n            contextInstructions.push('scale', scale);\n        }\n        contextInstructions.push('font', textState.font);\n        if (strokeKey) {\n            contextInstructions.push('strokeStyle', strokeState.strokeStyle);\n            contextInstructions.push('lineWidth', strokeWidth);\n            contextInstructions.push('lineCap', strokeState.lineCap);\n            contextInstructions.push('lineJoin', strokeState.lineJoin);\n            contextInstructions.push('miterLimit', strokeState.miterLimit);\n            // eslint-disable-next-line\n            var Context = WORKER_OFFSCREEN_CANVAS ? OffscreenCanvasRenderingContext2D : CanvasRenderingContext2D;\n            if (Context.prototype.setLineDash) {\n                contextInstructions.push('setLineDash', [strokeState.lineDash]);\n                contextInstructions.push('lineDashOffset', strokeState.lineDashOffset);\n            }\n        }\n        if (fillKey)
  {\n            contextInstructions.push('fillStyle', fillState.fillStyle);\n        }\n        contextInstructions.push('textBaseline', 'middle');\n        contextInstructions.push('textAlign', 'center');\n        var leftRight = 0.5 - align;\n        var x = align * renderWidth + leftRight * strokeWidth;\n        var i;\n        if (strokeKey) {\n            for (i = 0; i < numLines; ++i) {\n                contextInstructions.push('strokeText', [\n                    lines[i],\n                    x + leftRight * widths[i],\n                    0.5 * (strokeWidth + lineHeight) + i * lineHeight,\n                ]);\n            }\n        }\n        if (fillKey) {\n            for (i = 0; i < numLines; ++i) {\n                contextInstructions.push('fillText', [\n                    lines[i],\n                    x + leftRight * widths[i],\n                    0.5 * (strokeWidth + lineHeight) + i * lineHeight,\n                ]);\n            }\n        }\n        this.labels_
 [key] = label;\n        return label;\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../coordinate.js\").Coordinate} p1 1st point of the background box.\n     * @param {import(\"../../coordinate.js\").Coordinate} p2 2nd point of the background box.\n     * @param {import(\"../../coordinate.js\").Coordinate} p3 3rd point of the background box.\n     * @param {import(\"../../coordinate.js\").Coordinate} p4 4th point of the background box.\n     * @param {Array<*>} fillInstruction Fill instruction.\n     * @param {Array<*>} strokeInstruction Stroke instruction.\n     * @param {boolean} declutter Declutter.\n     */\n    Executor.prototype.replayTextBackground_ = function (context, p1, p2, p3, p4, fillInstruction, strokeInstruction, declutter) {\n        context.beginPath();\n        context.moveTo.apply(context, p1);\n        context.lineTo.apply(context, p2);\n        context.lineTo.apply(context, p3);\n        context.lineTo.ap
 ply(context, p4);\n        context.lineTo.apply(context, p1);\n        if (fillInstruction) {\n            this.alignFill_ = /** @type {boolean} */ (fillInstruction[2]);\n            if (declutter) {\n                context.fillStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (fillInstruction[1]);\n            }\n            this.fill_(context);\n        }\n        if (strokeInstruction) {\n            this.setStrokeStyle_(context, \n            /** @type {Array<*>} */ (strokeInstruction));\n            context.stroke();\n        }\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} imageOrLabel Image.\n     * @param {number} anchorX Anchor X.\n     * @param {number} anchorY Anchor Y.\n     * @param {import(\"../canvas.js\").Declu
 tterGroup} declutterGroup Declutter group.\n     * @param {number} height Height.\n     * @param {number} opacity Opacity.\n     * @param {number} originX Origin X.\n     * @param {number} originY Origin Y.\n     * @param {number} rotation Rotation.\n     * @param {import(\"../../size.js\").Size} scale Scale.\n     * @param {boolean} snapToPixel Snap to pixel.\n     * @param {number} width Width.\n     * @param {Array<number>} padding Padding.\n     * @param {Array<*>} fillInstruction Fill instruction.\n     * @param {Array<*>} strokeInstruction Stroke instruction.\n     * @return {boolean} The image or label was rendered.\n     */\n    Executor.prototype.replayImageOrLabel_ = function (context, contextScale, x, y, imageOrLabel, anchorX, anchorY, declutterGroup, height, opacity, originX, originY, rotation, scale, snapToPixel, width, padding, fillInstruction, strokeInstruction) {\n        var fillStroke = fillInstruction || strokeInstruction;\n        anchorX *= scale[0];\n        an
 chorY *= scale[1];\n        x -= anchorX;\n        y -= anchorY;\n        var w = width + originX > imageOrLabel.width\n            ? imageOrLabel.width - originX\n            : width;\n        var h = height + originY > imageOrLabel.height\n            ? imageOrLabel.height - originY\n            : height;\n        var boxW = padding[3] + w * scale[0] + padding[1];\n        var boxH = padding[0] + h * scale[1] + padding[2];\n        var boxX = x - padding[3];\n        var boxY = y - padding[0];\n        if (fillStroke || rotation !== 0) {\n            p1[0] = boxX;\n            p4[0] = boxX;\n            p1[1] = boxY;\n            p2[1] = boxY;\n            p2[0] = boxX + boxW;\n            p3[0] = p2[0];\n            p3[1] = boxY + boxH;\n            p4[1] = p3[1];\n        }\n        var transform = null;\n        if (rotation !== 0) {\n            var centerX = x + anchorX;\n            var centerY = y + anchorY;\n            transform = composeTransform(tmpTransform, centerX, c
 enterY, 1, 1, rotation, -centerX, -centerY);\n            applyTransform(tmpTransform, p1);\n            applyTransform(tmpTransform, p2);\n            applyTransform(tmpTransform, p3);\n            applyTransform(tmpTransform, p4);\n            createOrUpdate(Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1]), tmpExtent);\n        }\n        else {\n            createOrUpdate(boxX, boxY, boxX + boxW, boxY + boxH, tmpExtent);\n        }\n        this.renderBuffer_[0] = Math.max(this.renderBuffer_[0], getWidth(tmpExtent));\n        this.renderBuffer_[1] = Math.max(this.renderBuffer_[1], getHeight(tmpExtent));\n        var canvas = context.canvas;\n        var strokePadding = strokeInstruction\n            ? (strokeInstruction[2] * scale[0]) / 2\n            : 0;\n        var renderBuffer = this.renderBuffer_;\n        var intersects = tmpExtent[0] - strokePadding <=\n            (canva
 s.width + renderBuffer[0]) / contextScale &&\n            tmpExtent[2] + strokePadding >= -renderBuffer[0] / contextScale &&\n            tmpExtent[1] - strokePadding <=\n                (canvas.height + renderBuffer[1]) / contextScale &&\n            tmpExtent[3] + strokePadding >= -renderBuffer[1] / contextScale;\n        if (snapToPixel) {\n            x = Math.round(x);\n            y = Math.round(y);\n        }\n        if (declutterGroup) {\n            if (!intersects && declutterGroup[0] == 1) {\n                return false;\n            }\n            var declutterArgs = intersects\n                ? [\n                    context,\n                    transform ? transform.slice(0) : null,\n                    opacity,\n                    imageOrLabel,\n                    originX,\n                    originY,\n                    w,\n                    h,\n                    x,\n                    y,\n                    scale,\n                    tmpExtent.slice()
 ,\n                ]\n                : null;\n            if (declutterArgs) {\n                if (fillStroke) {\n                    declutterArgs.push(fillInstruction, strokeInstruction, p1.slice(0), p2.slice(0), p3.slice(0), p4.slice(0));\n                }\n                declutterGroup.push(declutterArgs);\n            }\n        }\n        else if (intersects) {\n            if (fillStroke) {\n                this.replayTextBackground_(context, p1, p2, p3, p4, \n                /** @type {Array<*>} */ (fillInstruction), \n                /** @type {Array<*>} */ (strokeInstruction), false);\n            }\n            drawImageOrLabel(context, transform, opacity, imageOrLabel, originX, originY, w, h, x, y, scale);\n        }\n        return true;\n    };\n    /**\n     * @private\n     * @param {CanvasRenderingContext2D} context Context.\n     */\n    Executor.prototype.fill_ = function (context) {\n        if (this.alignFill_) {\n            var origin_1 = applyTransform(th
 is.renderedTransform_, [0, 0]);\n            var repeatSize = 512 * this.pixelRatio;\n            context.save();\n            context.translate(origin_1[0] % repeatSize, origin_1[1] % repeatSize);\n            context.rotate(this.viewRotation_);\n        }\n        context.fill();\n        if (this.alignFill_) {\n            context.restore();\n        }\n    };\n    /**\n     * @private\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {Array<*>} instruction Instruction.\n     */\n    Executor.prototype.setStrokeStyle_ = function (context, instruction) {\n        context.strokeStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n        context.lineWidth = /** @type {number} */ (instruction[2]);\n        context.lineCap = /** @type {CanvasLineCap} */ (instruction[3]);\n        context.lineJoin = /** @type {CanvasLineJoin} */ (instruction[4]);\n        context.miterLimit = /** @type {number} */ (instruction[5]);\n        if (con
 text.setLineDash) {\n            context.lineDashOffset = /** @type {number} */ (instruction[7]);\n            context.setLineDash(/** @type {Array<number>} */ (instruction[6]));\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @param {number} opacity Layer opacity.\n     * @param {?} declutterTree Declutter tree.\n     * @return {?} Declutter tree.\n     */\n    Executor.prototype.renderDeclutter = function (declutterGroup, feature, opacity, declutterTree) {\n        /** @type {Array<import(\"../../structs/RBush.js\").Entry>} */\n        var boxes = [];\n        for (var i = 1, ii = declutterGroup.length; i < ii; ++i) {\n            var declutterData = declutterGroup[i];\n            var box = declutterData[11];\n            boxes.push({\n                minX: box[0],\n                minY: box[1],\n                maxX: box[2],\n   
              maxY: box[3],\n                value: feature,\n            });\n        }\n        if (!declutterTree) {\n            declutterTree = new RBush(9);\n        }\n        var collides = false;\n        for (var i = 0, ii = boxes.length; i < ii; ++i) {\n            if (declutterTree.collides(boxes[i])) {\n                collides = true;\n                break;\n            }\n        }\n        if (!collides) {\n            declutterTree.load(boxes);\n            for (var j = 1, jj = declutterGroup.length; j < jj; ++j) {\n                var declutterData = /** @type {Array} */ (declutterGroup[j]);\n                var context = declutterData[0];\n                var currentAlpha = context.globalAlpha;\n                if (currentAlpha !== opacity) {\n                    context.globalAlpha = opacity;\n                }\n                if (declutterData.length > 12) {\n                    this.replayTextBackground_(declutterData[0], declutterData[14], declutterData[15], 
 declutterData[16], declutterData[17], declutterData[12], declutterData[13], true);\n                }\n                drawImageOrLabel.apply(undefined, declutterData);\n                if (currentAlpha !== opacity) {\n                    context.globalAlpha = currentAlpha;\n                }\n            }\n        }\n        declutterGroup.length = 1;\n        return declutterTree;\n    };\n    /**\n     * @private\n     * @param {string} text The text to draw.\n     * @param {string} textKey The key of the text state.\n     * @param {string} strokeKey The key for the stroke state.\n     * @param {string} fillKey The key for the fill state.\n     * @return {{label: import(\"../canvas.js\").Label, anchorX: number, anchorY: number}} The text image and its anchor.\n     */\n    Executor.prototype.drawLabelWithPointPlacement_ = function (text, textKey, strokeKey, fillKey) {\n        var textState = this.textStates[textKey];\n        var label = this.createLabel(text, textKey, fillKey,
  strokeKey);\n        var strokeState = this.strokeStates[strokeKey];\n        var pixelRatio = this.pixelRatio;\n        var align = TEXT_ALIGN[textState.textAlign || defaultTextAlign];\n        var baseline = TEXT_ALIGN[textState.textBaseline || defaultTextBaseline];\n        var strokeWidth = strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;\n        // Remove the 2 pixels we added in createLabel() for the anchor\n        var width = label.width / pixelRatio - 2 * textState.scale[0];\n        var anchorX = align * width + 2 * (0.5 - align) * strokeWidth;\n        var anchorY = (baseline * label.height) / pixelRatio +\n            2 * (0.5 - baseline) * strokeWidth;\n        return {\n            label: label,\n            anchorX: anchorX,\n            anchorY: anchorY,\n        };\n    };\n    /**\n     * @private\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {import(\"../../tr
 ansform.js\").Transform} transform Transform.\n     * @param {Array<*>} instructions Instructions array.\n     * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike): T|undefined} featureCallback Feature callback.\n     * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\n     *     extent.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    Executor.prototype.execute_ = function (context, contextScale, transform, instructions, snapToPixel, featureCallback, opt_hitExtent) {\n        this.declutterItems.length = 0;\n        /** @type {Array<number>} */\n        var pixelCoordinates;\n        if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) {\n            pixelCoordinates = this.pixelCoordinates_;\n        }\n        else {\n            if (!this.pixelCoordinates_) {\n                this.pixelC
 oordinates_ = [];\n            }\n            pixelCoordinates = transform2D(this.coordinates, 0, this.coordinates.length, 2, transform, this.pixelCoordinates_);\n            transformSetFromArray(this.renderedTransform_, transform);\n        }\n        var i = 0; // instruction index\n        var ii = instructions.length; // end of instructions\n        var d = 0; // data index\n        var dd; // end of per-instruction data\n        var anchorX, anchorY, prevX, prevY, roundX, roundY, declutterGroup, declutterGroups, image, text, textKey;\n        var strokeKey, fillKey;\n        var pendingFill = 0;\n        var pendingStroke = 0;\n        var lastFillInstruction = null;\n        var lastStrokeInstruction = null;\n        var coordinateCache = this.coordinateCache_;\n        var viewRotation = this.viewRotation_;\n        var viewRotationFromTransform = Math.round(Math.atan2(-transform[1], transform[0]) * 1e12) / 1e12;\n        var state = /** @type {import(\"../../render.js\").St
 ate} */ ({\n            context: context,\n            pixelRatio: this.pixelRatio,\n            resolution: this.resolution,\n            rotation: viewRotation,\n        });\n        // When the batch size gets too big, performance decreases. 200 is a good\n        // balance between batch size and number of fill/stroke instructions.\n        var batchSize = this.instructions != instructions || this.overlaps ? 0 : 200;\n        var /** @type {import(\"../../Feature.js\").FeatureLike} */ feature;\n        var x, y;\n        while (i < ii) {\n            var instruction = instructions[i];\n            var type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n            switch (type) {\n                case CanvasInstruction.BEGIN_GEOMETRY:\n                    feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (instruction[1]);\n                    if (!feature.getGeometry()) {\n                        i = /** @type {number} */ (instruction[2]
 );\n                    }\n                    else if (opt_hitExtent !== undefined &&\n                        !intersects(opt_hitExtent, instruction[3])) {\n                        i = /** @type {number} */ (instruction[2]) + 1;\n                    }\n                    else {\n                        ++i;\n                    }\n                    break;\n                case CanvasInstruction.BEGIN_PATH:\n                    if (pendingFill > batchSize) {\n                        this.fill_(context);\n                        pendingFill = 0;\n                    }\n                    if (pendingStroke > batchSize) {\n                        context.stroke();\n                        pendingStroke = 0;\n                    }\n                    if (!pendingFill && !pendingStroke) {\n                        context.beginPath();\n                        prevX = NaN;\n                        prevY = NaN;\n                    }\n                    ++i;\n                    brea
 k;\n                case CanvasInstruction.CIRCLE:\n                    d = /** @type {number} */ (instruction[1]);\n                    var x1 = pixelCoordinates[d];\n                    var y1 = pixelCoordinates[d + 1];\n                    var x2 = pixelCoordinates[d + 2];\n                    var y2 = pixelCoordinates[d + 3];\n                    var dx = x2 - x1;\n                    var dy = y2 - y1;\n                    var r = Math.sqrt(dx * dx + dy * dy);\n                    context.moveTo(x1 + r, y1);\n                    context.arc(x1, y1, r, 0, 2 * Math.PI, true);\n                    ++i;\n                    break;\n                case CanvasInstruction.CLOSE_PATH:\n                    context.closePath();\n                    ++i;\n                    break;\n                case CanvasInstruction.CUSTOM:\n                    d = /** @type {number} */ (instruction[1]);\n                    dd = instruction[2];\n                    var geometry = /** @type {import(\
 "../../geom/SimpleGeometry.js\").default} */ (instruction[3]);\n                    var renderer = instruction[4];\n                    var fn = instruction.length == 6 ? instruction[5] : undefined;\n                    state.geometry = geometry;\n                    state.feature = feature;\n                    if (!(i in coordinateCache)) {\n                        coordinateCache[i] = [];\n                    }\n                    var coords = coordinateCache[i];\n                    if (fn) {\n                        fn(pixelCoordinates, d, dd, 2, coords);\n                    }\n                    else {\n                        coords[0] = pixelCoordinates[d];\n                        coords[1] = pixelCoordinates[d + 1];\n                        coords.length = 2;\n                    }\n                    renderer(coords, state);\n                    ++i;\n                    break;\n                case CanvasInstruction.DRAW_IMAGE:\n                    d = /** @type {num
 ber} */ (instruction[1]);\n                    dd = /** @type {number} */ (instruction[2]);\n                    image = /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */ (instruction[3]);\n                    // Remaining arguments in DRAW_IMAGE are in alphabetical order\n                    anchorX = /** @type {number} */ (instruction[4]);\n                    anchorY = /** @type {number} */ (instruction[5]);\n                    declutterGroups = featureCallback ? null : instruction[6];\n                    var height = /** @type {number} */ (instruction[7]);\n                    var opacity = /** @type {number} */ (instruction[8]);\n                    var originX = /** @type {number} */ (instruction[9]);\n                    var originY = /** @type {number} */ (instruction[10]);\n                    var rotateWithView = /** @type {boolean} */ (instruction[11]);\n                    var rotation = /** @type {number} */ (instruction[12]);\n                    var
  scale = /** @type {import(\"../../size.js\").Size} */ (instruction[13]);\n                    var width = /** @type {number} */ (instruction[14]);\n                    if (!image && instruction.length >= 19) {\n                        // create label images\n                        text = /** @type {string} */ (instruction[18]);\n                        textKey = /** @type {string} */ (instruction[19]);\n                        strokeKey = /** @type {string} */ (instruction[20]);\n                        fillKey = /** @type {string} */ (instruction[21]);\n                        var labelWithAnchor = this.drawLabelWithPointPlacement_(text, textKey, strokeKey, fillKey);\n                        image = labelWithAnchor.label;\n                        instruction[3] = image;\n                        var textOffsetX = /** @type {number} */ (instruction[22]);\n                        anchorX = (labelWithAnchor.anchorX - textOffsetX) * this.pixelRatio;\n                        instructio
 n[4] = anchorX;\n                        var textOffsetY = /** @type {number} */ (instruction[23]);\n                        anchorY = (labelWithAnchor.anchorY - textOffsetY) * this.pixelRatio;\n                        instruction[5] = anchorY;\n                        height = image.height;\n                        instruction[7] = height;\n                        width = image.width;\n                        instruction[14] = width;\n                    }\n                    var geometryWidths = void 0;\n                    if (instruction.length > 24) {\n                        geometryWidths = /** @type {number} */ (instruction[24]);\n                    }\n                    var padding = void 0, backgroundFill = void 0, backgroundStroke = void 0;\n                    if (instruction.length > 16) {\n                        padding = /** @type {Array<number>} */ (instruction[15]);\n                        backgroundFill = /** @type {boolean} */ (instruction[16]);\n            
             backgroundStroke = /** @type {boolean} */ (instruction[17]);\n                    }\n                    else {\n                        padding = defaultPadding;\n                        backgroundFill = false;\n                        backgroundStroke = false;\n                    }\n                    if (rotateWithView && viewRotationFromTransform) {\n                        // Canvas is expected to be rotated to reverse view rotation.\n                        rotation += viewRotation;\n                    }\n                    else if (!rotateWithView && !viewRotationFromTransform) {\n                        // Canvas is not rotated, images need to be rotated back to be north-up.\n                        rotation -= viewRotation;\n                    }\n                    var widthIndex = 0;\n                    var declutterGroupIndex = 0;\n                    for (; d < dd; d += 2) {\n                        if (geometryWidths &&\n                            ge
 ometryWidths[widthIndex++] < width / this.pixelRatio) {\n                            continue;\n                        }\n                        if (declutterGroups) {\n                            var index = Math.floor(declutterGroupIndex);\n                            declutterGroup =\n                                declutterGroups.length < index + 1\n                                    ? [declutterGroups[0][0]]\n                                    : declutterGroups[index];\n                        }\n                        var rendered = this.replayImageOrLabel_(context, contextScale, pixelCoordinates[d], pixelCoordinates[d + 1], image, anchorX, anchorY, declutterGroup, height, opacity, originX, originY, rotation, scale, snapToPixel, width, padding, backgroundFill\n                            ? /** @type {Array<*>} */ (lastFillInstruction)\n                            : null, backgroundStroke\n                            ? /** @type {Array<*>} */ (lastStrokeInstruction)\n    
                         : null);\n                        if (rendered &&\n                            declutterGroup &&\n                            declutterGroups[declutterGroups.length - 1] !== declutterGroup) {\n                            declutterGroups.push(declutterGroup);\n                        }\n                        if (declutterGroup) {\n                            if (declutterGroup.length - 1 === declutterGroup[0]) {\n                                this.declutterItems.push(this, declutterGroup, feature);\n                            }\n                            declutterGroupIndex += 1 / declutterGroup[0];\n                        }\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.DRAW_CHARS:\n                    var begin = /** @type {number} */ (instruction[1]);\n                    var end = /** @type {number} */ (instruction[2]);\n                    var baseline = /** @type {number} */ (i
 nstruction[3]);\n                    declutterGroup = featureCallback ? null : instruction[4];\n                    var overflow = /** @type {number} */ (instruction[5]);\n                    fillKey = /** @type {string} */ (instruction[6]);\n                    var maxAngle = /** @type {number} */ (instruction[7]);\n                    var measurePixelRatio = /** @type {number} */ (instruction[8]);\n                    var offsetY = /** @type {number} */ (instruction[9]);\n                    strokeKey = /** @type {string} */ (instruction[10]);\n                    var strokeWidth = /** @type {number} */ (instruction[11]);\n                    text = /** @type {string} */ (instruction[12]);\n                    textKey = /** @type {string} */ (instruction[13]);\n                    var pixelRatioScale = [\n                        /** @type {number} */ (instruction[14]),\n                        /** @type {number} */ (instruction[14]),\n                    ];\n                    va
 r textState = this.textStates[textKey];\n                    var font = textState.font;\n                    var textScale = [\n                        textState.scale[0] * measurePixelRatio,\n                        textState.scale[1] * measurePixelRatio,\n                    ];\n                    var cachedWidths = void 0;\n                    if (font in this.widths_) {\n                        cachedWidths = this.widths_[font];\n                    }\n                    else {\n                        cachedWidths = {};\n                        this.widths_[font] = cachedWidths;\n                    }\n                    var pathLength = lineStringLength(pixelCoordinates, begin, end, 2);\n                    var textLength = Math.abs(textScale[0]) *\n                        measureAndCacheTextWidth(font, text, cachedWidths);\n                    if (overflow || textLength <= pathLength) {\n                        var textAlign = this.textStates[textKey].textAlign;\n         
                var startM = (pathLength - textLength) * TEXT_ALIGN[textAlign];\n                        var parts = drawTextOnPath(pixelCoordinates, begin, end, 2, text, startM, maxAngle, Math.abs(textScale[0]), measureAndCacheTextWidth, font, cachedWidths, viewRotationFromTransform ? 0 : this.viewRotation_);\n                        if (parts) {\n                            var rendered = false;\n                            var c = void 0, cc = void 0, chars = void 0, label = void 0, part = void 0;\n                            if (strokeKey) {\n                                for (c = 0, cc = parts.length; c < cc; ++c) {\n                                    part = parts[c]; // x, y, anchorX, rotation, chunk\n                                    chars = /** @type {string} */ (part[4]);\n                                    label = this.createLabel(chars, textKey, '', strokeKey);\n                                    anchorX = /** @type {number} */ (part[2]) + strokeWidth;\n            
                         anchorY =\n                                        baseline * label.height +\n                                            ((0.5 - baseline) * 2 * strokeWidth * textScale[1]) /\n                                                textScale[0] -\n                                            offsetY;\n                                    rendered =\n                                        this.replayImageOrLabel_(context, contextScale, \n                                        /** @type {number} */ (part[0]), \n                                        /** @type {number} */ (part[1]), label, anchorX, anchorY, declutterGroup, label.height, 1, 0, 0, \n                                        /** @type {number} */ (part[3]), pixelRatioScale, false, label.width, defaultPadding, null, null) || rendered;\n                                }\n                            }\n                            if (fillKey) {\n                                for (c = 0, cc = parts.length; c
  < cc; ++c) {\n                                    part = parts[c]; // x, y, anchorX, rotation, chunk\n                                    chars = /** @type {string} */ (part[4]);\n                                    label = this.createLabel(chars, textKey, fillKey, '');\n                                    anchorX = /** @type {number} */ (part[2]);\n                                    anchorY = baseline * label.height - offsetY;\n                                    rendered =\n                                        this.replayImageOrLabel_(context, contextScale, \n                                        /** @type {number} */ (part[0]), \n                                        /** @type {number} */ (part[1]), label, anchorX, anchorY, declutterGroup, label.height, 1, 0, 0, \n                                        /** @type {number} */ (part[3]), pixelRatioScale, false, label.width, defaultPadding, null, null) || rendered;\n                                }\n                       
      }\n                            if (rendered) {\n                                this.declutterItems.push(this, declutterGroup, feature);\n                            }\n                        }\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.END_GEOMETRY:\n                    if (featureCallback !== undefined) {\n                        feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (instruction[1]);\n                        var result = featureCallback(feature);\n                        if (result) {\n                            return result;\n                        }\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.FILL:\n                    if (batchSize) {\n                        pendingFill++;\n                    }\n                    else {\n                        this.fill_(context);\n                    }\n   
                  ++i;\n                    break;\n                case CanvasInstruction.MOVE_TO_LINE_TO:\n                    d = /** @type {number} */ (instruction[1]);\n                    dd = /** @type {number} */ (instruction[2]);\n                    x = pixelCoordinates[d];\n                    y = pixelCoordinates[d + 1];\n                    roundX = (x + 0.5) | 0;\n                    roundY = (y + 0.5) | 0;\n                    if (roundX !== prevX || roundY !== prevY) {\n                        context.moveTo(x, y);\n                        prevX = roundX;\n                        prevY = roundY;\n                    }\n                    for (d += 2; d < dd; d += 2) {\n                        x = pixelCoordinates[d];\n                        y = pixelCoordinates[d + 1];\n                        roundX = (x + 0.5) | 0;\n                        roundY = (y + 0.5) | 0;\n                        if (d == dd - 2 || roundX !== prevX || roundY !== prevY) {\n                 
            context.lineTo(x, y);\n                            prevX = roundX;\n                            prevY = roundY;\n                        }\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.SET_FILL_STYLE:\n                    lastFillInstruction = instruction;\n                    this.alignFill_ = instruction[2];\n                    if (pendingFill) {\n                        this.fill_(context);\n                        pendingFill = 0;\n                        if (pendingStroke) {\n                            context.stroke();\n                            pendingStroke = 0;\n                        }\n                    }\n                    context.fillStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n                    ++i;\n                    break;\n                case CanvasInstruction.SET_STROKE_STYLE:\n                    lastStrokeInstruction = instruction;
 \n                    if (pendingStroke) {\n                        context.stroke();\n                        pendingStroke = 0;\n                    }\n                    this.setStrokeStyle_(context, /** @type {Array<*>} */ (instruction));\n                    ++i;\n                    break;\n                case CanvasInstruction.STROKE:\n                    if (batchSize) {\n                        pendingStroke++;\n                    }\n                    else {\n                        context.stroke();\n                    }\n                    ++i;\n                    break;\n                default:\n                    ++i; // consume the instruction anyway, to avoid an infinite loop\n                    break;\n            }\n        }\n        if (pendingFill) {\n            this.fill_(context);\n        }\n        if (pendingStroke) {\n            context.stroke();\n        }\n        return undefined;\n    };\n    /**\n     * @param {CanvasRenderingContext2D} co
 ntext Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {number} viewRotation View rotation.\n     * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n     */\n    Executor.prototype.execute = function (context, contextScale, transform, viewRotation, snapToPixel) {\n        this.viewRotation_ = viewRotation;\n        this.execute_(context, contextScale, transform, this.instructions, snapToPixel, undefined, undefined);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {number} viewRotation View rotation.\n     * @param {function(import(\"../../Feature.js\").FeatureLike): T=} opt_featureCallback\n     *     Feature callback.\n     * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\
 n     *     extent.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    Executor.prototype.executeHitDetection = function (context, transform, viewRotation, opt_featureCallback, opt_hitExtent) {\n        this.viewRotation_ = viewRotation;\n        return this.execute_(context, 1, transform, this.hitDetectionInstructions, true, opt_featureCallback, opt_hitExtent);\n    };\n    return Executor;\n}());\nexport default Executor;\n//# sourceMappingURL=Executor.js.map","/**\n * @module ol/render/canvas/ExecutorGroup\n */\nimport BuilderType from './BuilderType.js';\nimport Executor from './Executor.js';\nimport { buffer, createEmpty, extendCoordinate } from '../../extent.js';\nimport { compose as composeTransform, create as createTransform, } from '../../transform.js';\nimport { createCanvasContext2D } from '../../dom.js';\nimport { isEmpty } from '../../obj.js';\nimport { numberSafeCompareFunction } from '../../array.js';\nimport { transform2D } from '../../g
 eom/flat/transform.js';\n/**\n * @const\n * @type {Array<import(\"./BuilderType.js\").default>}\n */\nvar ORDER = [\n    BuilderType.POLYGON,\n    BuilderType.CIRCLE,\n    BuilderType.LINE_STRING,\n    BuilderType.IMAGE,\n    BuilderType.TEXT,\n    BuilderType.DEFAULT,\n];\nvar ExecutorGroup = /** @class */ (function () {\n    /**\n     * @param {import(\"../../extent.js\").Extent} maxExtent Max extent for clipping. When a\n     * `maxExtent` was set on the Buillder for this executor group, the same `maxExtent`\n     * should be set here, unless the target context does not exceet that extent (which\n     * can be the case when rendering to tiles).\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {boolean} overlaps The executor group can have overlapping geometries.\n     * @param {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"./Builder.js\").SerializableInstructions>>} allInstructions\n     * The s
 erializable instructions.\n     * @param {number=} opt_renderBuffer Optional rendering buffer.\n     */\n    function ExecutorGroup(maxExtent, resolution, pixelRatio, overlaps, allInstructions, opt_renderBuffer) {\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        this.maxExtent_ = maxExtent;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.overlaps_ = overlaps;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.resolution_ = resolution;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.renderBuffer_ = opt_renderBuffer;\n        /**\n         * @private\n         * @type {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"./Executor\").default>>}\n         */\n        t
 his.executorsByZIndex_ = {};\n        /**\n         * @private\n         * @type {CanvasRenderingContext2D}\n         */\n        this.hitDetectionContext_ = null;\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        this.hitDetectionTransform_ = createTransform();\n        this.createExecutors_(allInstructions);\n    }\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     */\n    ExecutorGroup.prototype.clip = function (context, transform) {\n        var flatClipCoords = this.getClipCoords(transform);\n        context.beginPath();\n        context.moveTo(flatClipCoords[0], flatClipCoords[1]);\n        context.lineTo(flatClipCoords[2], flatClipCoords[3]);\n        context.lineTo(flatClipCoords[4], flatClipCoords[5]);\n        context.lineTo(flatClipCoords[6], flatClipCoords[7]);\n        context.clip();\n    };\n    /**\n 
     * Create executors and populate them using the provided instructions.\n     * @private\n     * @param {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"./Builder.js\").SerializableInstructions>>} allInstructions The serializable instructions\n     */\n    ExecutorGroup.prototype.createExecutors_ = function (allInstructions) {\n        for (var zIndex in allInstructions) {\n            var executors = this.executorsByZIndex_[zIndex];\n            if (executors === undefined) {\n                executors = {};\n                this.executorsByZIndex_[zIndex] = executors;\n            }\n            var instructionByZindex = allInstructions[zIndex];\n            var renderBuffer = [this.renderBuffer_ || 0, this.renderBuffer_ || 0];\n            for (var builderType in instructionByZindex) {\n                var instructions = instructionByZindex[builderType];\n                executors[builderType] = new Executor(this.resolution_, this.pixelRatio_, this.overla
 ps_, instructions, renderBuffer);\n            }\n        }\n    };\n    /**\n     * @param {Array<import(\"./BuilderType.js\").default>} executors Executors.\n     * @return {boolean} Has executors of the provided types.\n     */\n    ExecutorGroup.prototype.hasExecutors = function (executors) {\n        for (var zIndex in this.executorsByZIndex_) {\n            var candidates = this.executorsByZIndex_[zIndex];\n            for (var i = 0, ii = executors.length; i < ii; ++i) {\n                if (executors[i] in candidates) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {number} rotation Rotation.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike): T} callback Feature callback.\n     * @pa
 ram {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    ExecutorGroup.prototype.forEachFeatureAtCoordinate = function (coordinate, resolution, rotation, hitTolerance, callback, declutteredFeatures) {\n        hitTolerance = Math.round(hitTolerance);\n        var contextSize = hitTolerance * 2 + 1;\n        var transform = composeTransform(this.hitDetectionTransform_, hitTolerance + 0.5, hitTolerance + 0.5, 1 / resolution, -1 / resolution, -rotation, -coordinate[0], -coordinate[1]);\n        if (!this.hitDetectionContext_) {\n            this.hitDetectionContext_ = createCanvasContext2D(contextSize, contextSize);\n        }\n        var context = this.hitDetectionContext_;\n        if (context.canvas.width !== contextSize ||\n            context.canvas.height !== contextSize) {\n            context.canvas.width = contextSize;\n            context.canvas.height = co
 ntextSize;\n        }\n        else {\n            context.clearRect(0, 0, contextSize, contextSize);\n        }\n        /**\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        var hitExtent;\n        if (this.renderBuffer_ !== undefined) {\n            hitExtent = createEmpty();\n            extendCoordinate(hitExtent, coordinate);\n            buffer(hitExtent, resolution * (this.renderBuffer_ + hitTolerance), hitExtent);\n        }\n        var mask = getCircleArray(hitTolerance);\n        var builderType;\n        /**\n         * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n         * @return {?} Callback result.\n         */\n        function featureCallback(feature) {\n            var imageData = context.getImageData(0, 0, contextSize, contextSize)\n                .data;\n            for (var i_1 = 0; i_1 < contextSize; i_1++) {\n                for (var j_1 = 0; j_1 < contextSize; j_1++) {\n                    if (mask[i_1][j_
 1]) {\n                        if (imageData[(j_1 * contextSize + i_1) * 4 + 3] > 0) {\n                            var result_1 = void 0;\n                            if (!(declutteredFeatures &&\n                                (builderType == BuilderType.IMAGE ||\n                                    builderType == BuilderType.TEXT)) ||\n                                declutteredFeatures.indexOf(feature) !== -1) {\n                                result_1 = callback(feature);\n                            }\n                            if (result_1) {\n                                return result_1;\n                            }\n                            else {\n                                context.clearRect(0, 0, contextSize, contextSize);\n                                return undefined;\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        /** @type {Array<number>} */\n        var zs = Obj
 ect.keys(this.executorsByZIndex_).map(Number);\n        zs.sort(numberSafeCompareFunction);\n        var i, j, executors, executor, result;\n        for (i = zs.length - 1; i >= 0; --i) {\n            var zIndexKey = zs[i].toString();\n            executors = this.executorsByZIndex_[zIndexKey];\n            for (j = ORDER.length - 1; j >= 0; --j) {\n                builderType = ORDER[j];\n                executor = executors[builderType];\n                if (executor !== undefined) {\n                    result = executor.executeHitDetection(context, transform, rotation, featureCallback, hitExtent);\n                    if (result) {\n                        return result;\n                    }\n                }\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @return {Array<number>} Clip coordinates.\n     */\n    ExecutorGroup.prototype.getClipCoords = function (transfor
 m) {\n        var maxExtent = this.maxExtent_;\n        if (!maxExtent) {\n            return null;\n        }\n        var minX = maxExtent[0];\n        var minY = maxExtent[1];\n        var maxX = maxExtent[2];\n        var maxY = maxExtent[3];\n        var flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];\n        transform2D(flatClipCoords, 0, 8, 2, transform, flatClipCoords);\n        return flatClipCoords;\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    ExecutorGroup.prototype.isEmpty = function () {\n        return isEmpty(this.executorsByZIndex_);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {number} viewRotation View rotation.\n     * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.\n     * @param {Array<import(\"./BuilderType.js\")
 .default>=} opt_builderTypes Ordered replay types to replay.\n     *     Default is {@link module:ol/render/replay~ORDER}\n     * @param {Object<string, import(\"../canvas.js\").DeclutterGroup>=} opt_declutterReplays Declutter replays.\n     */\n    ExecutorGroup.prototype.execute = function (context, contextScale, transform, viewRotation, snapToPixel, opt_builderTypes, opt_declutterReplays) {\n        /** @type {Array<number>} */\n        var zs = Object.keys(this.executorsByZIndex_).map(Number);\n        zs.sort(numberSafeCompareFunction);\n        // setup clipping so that the parts of over-simplified geometries are not\n        // visible outside the current extent when panning\n        if (this.maxExtent_) {\n            context.save();\n            this.clip(context, transform);\n        }\n        var builderTypes = opt_builderTypes ? opt_builderTypes : ORDER;\n        var i, ii, j, jj, replays, replay;\n        for (i = 0, ii = zs.length; i < ii; ++i) {\n            var zInd
 exKey = zs[i].toString();\n            replays = this.executorsByZIndex_[zIndexKey];\n            for (j = 0, jj = builderTypes.length; j < jj; ++j) {\n                var builderType = builderTypes[j];\n                replay = replays[builderType];\n                if (replay !== undefined) {\n                    if (opt_declutterReplays &&\n                        (builderType == BuilderType.IMAGE ||\n                            builderType == BuilderType.TEXT)) {\n                        var declutter = opt_declutterReplays[zIndexKey];\n                        if (!declutter) {\n                            opt_declutterReplays[zIndexKey] = [replay, transform.slice(0)];\n                        }\n                        else {\n                            declutter.push(replay, transform.slice(0));\n                        }\n                    }\n                    else {\n                        replay.execute(context, contextScale, transform, viewRotation, snapToPixel);\n  
                   }\n                }\n            }\n        }\n        if (this.maxExtent_) {\n            context.restore();\n        }\n    };\n    return ExecutorGroup;\n}());\n/**\n * This cache is used for storing calculated pixel circles for increasing performance.\n * It is a static property to allow each Replaygroup to access it.\n * @type {Object<number, Array<Array<(boolean|undefined)>>>}\n */\nvar circleArrayCache = {\n    0: [[true]],\n};\n/**\n * This method fills a row in the array from the given coordinate to the\n * middle with `true`.\n * @param {Array<Array<(boolean|undefined)>>} array The array that will be altered.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n */\nfunction fillCircleArrayRowToMiddle(array, x, y) {\n    var i;\n    var radius = Math.floor(array.length / 2);\n    if (x >= radius) {\n        for (i = radius; i < x; i++) {\n            array[i][y] = true;\n        }\n    }\n    else if (x < radius) {\n        for (i = x
  + 1; i < radius; i++) {\n            array[i][y] = true;\n        }\n    }\n}\n/**\n * This methods creates a circle inside a fitting array. Points inside the\n * circle are marked by true, points on the outside are undefined.\n * It uses the midpoint circle algorithm.\n * A cache is used to increase performance.\n * @param {number} radius Radius.\n * @returns {Array<Array<(boolean|undefined)>>} An array with marked circle points.\n */\nexport function getCircleArray(radius) {\n    if (circleArrayCache[radius] !== undefined) {\n        return circleArrayCache[radius];\n    }\n    var arraySize = radius * 2 + 1;\n    var arr = new Array(arraySize);\n    for (var i = 0; i < arraySize; i++) {\n        arr[i] = new Array(arraySize);\n    }\n    var x = radius;\n    var y = 0;\n    var error = 0;\n    while (x >= y) {\n        fillCircleArrayRowToMiddle(arr, radius + x, radius + y);\n        fillCircleArrayRowToMiddle(arr, radius + y, radius + x);\n        fillCircleArrayRowToMiddle(arr
 , radius - y, radius + x);\n        fillCircleArrayRowToMiddle(arr, radius - x, radius + y);\n        fillCircleArrayRowToMiddle(arr, radius - x, radius - y);\n        fillCircleArrayRowToMiddle(arr, radius - y, radius - x);\n        fillCircleArrayRowToMiddle(arr, radius + y, radius - x);\n        fillCircleArrayRowToMiddle(arr, radius + x, radius - y);\n        y++;\n        error += 1 + 2 * y;\n        if (2 * (error - x) + 1 > 0) {\n            x -= 1;\n            error += 1 - 2 * x;\n        }\n    }\n    circleArrayCache[radius] = arr;\n    return arr;\n}\n/**\n * @param {!Object<string, Array<*>>} declutterReplays Declutter replays.\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {number} opacity Opacity.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n * @param {Array<import(\"../../PluggableMap.js\").DeclutterItems>} declutterItems Declutter items.\n */\nexport function replayDeclutte
 r(declutterReplays, context, rotation, opacity, snapToPixel, declutterItems) {\n    var zs = Object.keys(declutterReplays)\n        .map(Number)\n        .sort(numberSafeCompareFunction);\n    for (var z = 0, zz = zs.length; z < zz; ++z) {\n        var executorData = declutterReplays[zs[z].toString()];\n        var currentExecutor = void 0;\n        for (var i = 0, ii = executorData.length; i < ii;) {\n            var executor = executorData[i++];\n            var transform = executorData[i++];\n            executor.execute(context, 1, transform, rotation, snapToPixel);\n            if (executor !== currentExecutor && executor.declutterItems.length > 0) {\n                currentExecutor = executor;\n                declutterItems.push({\n                    items: executor.declutterItems,\n                    opacity: opacity,\n                });\n            }\n        }\n    }\n}\nexport default ExecutorGroup;\n//# sourceMappingURL=ExecutorGroup.js.map","/**\n * @module ol/rende
 r/canvas/hitdetet\n */\nimport CanvasImmediateRenderer from './Immediate.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport IconAnchorUnits from '../../style/IconAnchorUnits.js';\nimport { Icon } from '../../style.js';\nimport { createCanvasContext2D } from '../../dom.js';\nimport { intersects } from '../../extent.js';\nimport { numberSafeCompareFunction } from '../../array.js';\n/**\n * @param {import(\"../../size.js\").Size} size Canvas size in css pixels.\n * @param {Array<import(\"../../transform.js\").Transform>} transforms Transforms\n * for rendering features to all worlds of the viewport, from coordinates to css\n * pixels.\n * @param {Array<import(\"../../Feature.js\").FeatureLike>} features\n * Features to consider for hit detection.\n * @param {import(\"../../style/Style.js\").StyleFunction|undefined} styleFunction\n * Layer style function.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @para
 m {number} rotation Rotation.\n * @return {ImageData} Hit detection image data.\n */\nexport function createHitDetectionImageData(size, transforms, features, styleFunction, extent, resolution, rotation) {\n    var width = size[0] / 2;\n    var height = size[1] / 2;\n    var context = createCanvasContext2D(width, height);\n    context.imageSmoothingEnabled = false;\n    var canvas = context.canvas;\n    var renderer = new CanvasImmediateRenderer(context, 0.5, extent, null, rotation);\n    var featureCount = features.length;\n    // Stretch hit detection index to use the whole available color range\n    var indexFactor = Math.floor((256 * 256 * 256 - 1) / featureCount);\n    var featuresByZIndex = {};\n    for (var i = 1; i <= featureCount; ++i) {\n        var feature = features[i - 1];\n        var featureStyleFunction = feature.getStyleFunction() || styleFunction;\n        if (!styleFunction) {\n            continue;\n        }\n        var styles = featureStyleFunction(feature, res
 olution);\n        if (!styles) {\n            continue;\n        }\n        if (!Array.isArray(styles)) {\n            styles = [styles];\n        }\n        var index = i * indexFactor;\n        var color = '#' + ('000000' + index.toString(16)).slice(-6);\n        for (var j = 0, jj = styles.length; j < jj; ++j) {\n            var originalStyle = styles[j];\n            var style = originalStyle.clone();\n            var fill = style.getFill();\n            if (fill) {\n                fill.setColor(color);\n            }\n            var stroke = style.getStroke();\n            if (stroke) {\n                stroke.setColor(color);\n            }\n            style.setText(undefined);\n            var image = originalStyle.getImage();\n            if (image) {\n                var imgSize = image.getImageSize();\n                if (!imgSize) {\n                    continue;\n                }\n                var canvas_1 = document.createElement('canvas');\n                canv
 as_1.width = imgSize[0];\n                canvas_1.height = imgSize[1];\n                var imgContext = canvas_1.getContext('2d', { alpha: false });\n                imgContext.fillStyle = color;\n                var img = imgContext.canvas;\n                imgContext.fillRect(0, 0, img.width, img.height);\n                var width_1 = imgSize ? imgSize[0] : img.width;\n                var height_1 = imgSize ? imgSize[1] : img.height;\n                var iconContext = createCanvasContext2D(width_1, height_1);\n                iconContext.drawImage(img, 0, 0);\n                style.setImage(new Icon({\n                    img: img,\n                    imgSize: imgSize,\n                    anchor: image.getAnchor(),\n                    anchorXUnits: IconAnchorUnits.PIXELS,\n                    anchorYUnits: IconAnchorUnits.PIXELS,\n                    offset: image.getOrigin(),\n                    size: image.getSize(),\n                    opacity: image.getOpacity(),\n    
                 scale: image.getScale(),\n                    rotation: image.getRotation(),\n                    rotateWithView: image.getRotateWithView(),\n                }));\n            }\n            var zIndex = Number(style.getZIndex());\n            var byGeometryType = featuresByZIndex[zIndex];\n            if (!byGeometryType) {\n                byGeometryType = {};\n                featuresByZIndex[zIndex] = byGeometryType;\n                byGeometryType[GeometryType.POLYGON] = [];\n                byGeometryType[GeometryType.CIRCLE] = [];\n                byGeometryType[GeometryType.LINE_STRING] = [];\n                byGeometryType[GeometryType.POINT] = [];\n            }\n            var geometry = style.getGeometryFunction()(feature);\n            if (geometry && intersects(extent, geometry.getExtent())) {\n                byGeometryType[geometry.getType().replace('Multi', '')].push(geometry, style);\n            }\n        }\n    }\n    var zIndexKeys = Object.key
 s(featuresByZIndex)\n        .map(Number)\n        .sort(numberSafeCompareFunction);\n    for (var i = 0, ii = zIndexKeys.length; i < ii; ++i) {\n        var byGeometryType = featuresByZIndex[zIndexKeys[i]];\n        for (var type in byGeometryType) {\n            var geomAndStyle = byGeometryType[type];\n            for (var j = 0, jj = geomAndStyle.length; j < jj; j += 2) {\n                renderer.setStyle(geomAndStyle[j + 1]);\n                for (var k = 0, kk = transforms.length; k < kk; ++k) {\n                    renderer.setTransform(transforms[k]);\n                    renderer.drawGeometry(geomAndStyle[j]);\n                }\n            }\n        }\n    }\n    return context.getImageData(0, 0, canvas.width, canvas.height);\n}\n/**\n * @param {import(\"../../pixel\").Pixel} pixel Pixel coordinate on the hit\n * detection canvas in css pixels.\n * @param {Array<import(\"../../Feature\").FeatureLike>} features Features. Has to\n * match the `features` array that was pas
 sed to `createHitDetectionImageData()`.\n * @param {ImageData} imageData Hit detection image data generated by\n * `createHitDetectionImageData()`.\n * @return {Array<import(\"../../Feature\").FeatureLike>} features Features.\n */\nexport function hitDetect(pixel, features, imageData) {\n    var resultFeatures = [];\n    if (imageData) {\n        var index = (Math.round(pixel[0] / 2) + Math.round(pixel[1] / 2) * imageData.width) *\n            4;\n        var r = imageData.data[index];\n        var g = imageData.data[index + 1];\n        var b = imageData.data[index + 2];\n        var i = b + 256 * (g + 256 * r);\n        var indexFactor = Math.floor((256 * 256 * 256 - 1) / features.length);\n        if (i && i % indexFactor === 0) {\n            resultFeatures.push(features[i / indexFactor - 1]);\n        }\n    }\n    return resultFeatures;\n}\n//# sourceMappingURL=hitdetect.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b
 ) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasLayerRenderer from './Layer.js';\nimport ExecutorGroup, { replayDeclutter, } from '../../render/canvas/ExecutorGroup.js';\nimport ViewHint from '../../ViewHint.js';\nimport { apply, makeInverse, makeScale, toString as transformToString, } from '../../transform.js';\nimport { buffer, containsExtent, createEmpty, getWidth, intersects as intersectsExtent, wrap
 X as wrapExtentX, } from '../../extent.js';\nimport { createHitDetectionImageData, hitDetect, } from '../../render/canvas/hitdetect.js';\nimport { defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance, getSquaredTolerance as getSquaredRenderTolerance, renderFeature, } from '../vector.js';\nimport { fromUserExtent, getTransformFromProjections, getUserProjection, toUserExtent, } from '../../proj.js';\nimport { getUid } from '../../util.js';\nimport { wrapX as wrapCoordinateX } from '../../coordinate.js';\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nvar CanvasVectorLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasVectorLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/Vector.js\").default} vectorLayer Vector layer.\n     */\n    function CanvasVectorLayerRenderer(vectorLayer) {\n        var _this = _super.call(this, vectorLayer) || this;\n        /** @private */\n        _this.boundHandleStyleImage
 Change_ = _this.handleStyleImageChange_.bind(_this);\n        /**\n         * @type {boolean}\n         */\n        _this.animatingOrInteracting_;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.dirty_ = false;\n        /**\n         * @type {ImageData}\n         */\n        _this.hitDetectionImageData_ = null;\n        /**\n         * @type {Array<import(\"../../Feature.js\").default>}\n         */\n        _this.renderedFeatures_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedResolution_ = NaN;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.renderedExtent_ = createEmpty();\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRotation_;\n        /**\n         *
  @private\n         * @type {import(\"../../coordinate\").Coordinate}\n         */\n        _this.renderedCenter_ = null;\n        /**\n         * @private\n         * @type {import(\"../../proj/Projection\").default}\n         */\n        _this.renderedProjection_ = null;\n        /**\n         * @private\n         * @type {function(import(\"../../Feature.js\").default, import(\"../../Feature.js\").default): number|null}\n         */\n        _this.renderedRenderOrder_ = null;\n        /**\n         * @private\n         * @type {import(\"../../render/canvas/ExecutorGroup\").default}\n         */\n        _this.replayGroup_ = null;\n        /**\n         * A new replay group had to be created by `prepareFrame()`\n         * @type {boolean}\n         */\n        _this.replayGroupChanged = true;\n        /**\n         * Clipping to be performed by `renderFrame()`\n         * @type {boolean}\n         */\n        _this.clipping = true;\n        return _this;\n    }\n    /**\n     * Get
  a rendering container from an existing target, if compatible.\n     * @param {HTMLElement} target Potential render target.\n     * @param {string} transform CSS Transform.\n     * @param {number} opacity Opacity.\n     */\n    CanvasVectorLayerRenderer.prototype.useContainer = function (target, transform, opacity) {\n        if (opacity < 1) {\n            target = null;\n        }\n        _super.prototype.useContainer.call(this, target, transform, opacity);\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasVectorLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var pixelRatio = frameState.pixelRatio;\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        // set forward and inverse pixel tran
 sforms\n        makeScale(this.pixelTransform, 1 / pixelRatio, 1 / pixelRatio);\n        makeInverse(this.inversePixelTransform, this.pixelTransform);\n        var canvasTransform = transformToString(this.pixelTransform);\n        this.useContainer(target, canvasTransform, layerState.opacity);\n        var context = this.context;\n        var canvas = context.canvas;\n        var replayGroup = this.replayGroup_;\n        if (!replayGroup || replayGroup.isEmpty()) {\n            if (!this.containerReused && canvas.width > 0) {\n                canvas.width = 0;\n            }\n            return this.container;\n        }\n        // resize and clear\n        var width = Math.round(frameState.size[0] * pixelRatio);\n        var height = Math.round(frameState.size[1] * pixelRatio);\n        if (canvas.width != width || canvas.height != height) {\n            canvas.width = width;\n            canvas.height = height;\n            if (canvas.style.transform !== canvasTransform) {\n     
            canvas.style.transform = canvasTransform;\n            }\n        }\n        else if (!this.containerReused) {\n            context.clearRect(0, 0, width, height);\n        }\n        this.preRender(context, frameState);\n        var extent = frameState.extent;\n        var viewState = frameState.viewState;\n        var center = viewState.center;\n        var resolution = viewState.resolution;\n        var projection = viewState.projection;\n        var rotation = viewState.rotation;\n        var projectionExtent = projection.getExtent();\n        var vectorSource = this.getLayer().getSource();\n        // clipped rendering if layer extent is set\n        var clipped = false;\n        if (layerState.extent && this.clipping) {\n            var layerExtent = fromUserExtent(layerState.extent, projection);\n            clipped =\n                !containsExtent(layerExtent, frameState.extent) &&\n                    intersectsExtent(layerExtent, frameState.extent);\n         
    if (clipped) {\n                this.clipUnrotated(context, frameState, layerExtent);\n            }\n        }\n        var viewHints = frameState.viewHints;\n        var snapToPixel = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n        var transform = this.getRenderTransform(center, resolution, rotation, pixelRatio, width, height, 0);\n        var declutterReplays = this.getLayer().getDeclutter() ? {} : null;\n        replayGroup.execute(context, 1, transform, rotation, snapToPixel, undefined, declutterReplays);\n        if (vectorSource.getWrapX() &&\n            projection.canWrapX() &&\n            !containsExtent(projectionExtent, extent)) {\n            var startX = extent[0];\n            var worldWidth = getWidth(projectionExtent);\n            var world = 0;\n            var offsetX = void 0;\n            while (startX < projectionExtent[0]) {\n                --world;\n                offsetX = worldWidth * world;\n                var transfor
 m_1 = this.getRenderTransform(center, resolution, rotation, pixelRatio, width, height, offsetX);\n                replayGroup.execute(context, 1, transform_1, rotation, snapToPixel, undefined, declutterReplays);\n                startX += worldWidth;\n            }\n            world = 0;\n            startX = extent[2];\n            while (startX > projectionExtent[2]) {\n                ++world;\n                offsetX = worldWidth * world;\n                var transform_2 = this.getRenderTransform(center, resolution, rotation, pixelRatio, width, height, offsetX);\n                replayGroup.execute(context, 1, transform_2, rotation, snapToPixel, undefined, declutterReplays);\n                startX -= worldWidth;\n            }\n        }\n        if (declutterReplays) {\n            var viewHints_1 = frameState.viewHints;\n            var hifi = !(viewHints_1[ViewHint.ANIMATING] || viewHints_1[ViewHint.INTERACTING]);\n            replayDeclutter(declutterReplays, context, rota
 tion, 1, hifi, frameState.declutterItems);\n        }\n        if (clipped) {\n            context.restore();\n        }\n        this.postRender(context, frameState);\n        var opacity = layerState.opacity;\n        var container = this.container;\n        if (opacity !== parseFloat(container.style.opacity)) {\n            container.style.opacity = opacity === 1 ? '' : String(opacity);\n        }\n        if (this.renderedRotation_ !== viewState.rotation) {\n            this.renderedRotation_ = viewState.rotation;\n            this.hitDetectionImageData_ = null;\n        }\n        return this.container;\n    };\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n     */\n    CanvasVectorLayerRenderer.prototype.getFeatures = function (pixel) {\n        return new Promise(function (resolve, reject
 ) {\n            if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) {\n                var size = [this.context.canvas.width, this.context.canvas.height];\n                apply(this.pixelTransform, size);\n                var center = this.renderedCenter_;\n                var resolution = this.renderedResolution_;\n                var rotation = this.renderedRotation_;\n                var projection = this.renderedProjection_;\n                var extent = this.renderedExtent_;\n                var layer = this.getLayer();\n                var transforms = [];\n                var width = size[0] / 2;\n                var height = size[1] / 2;\n                transforms.push(this.getRenderTransform(center, resolution, rotation, 0.5, width, height, 0).slice());\n                var source = layer.getSource();\n                var projectionExtent = projection.getExtent();\n                if (source.getWrapX() &&\n                    projection.canWrapX() &&\n    
                 !containsExtent(projectionExtent, extent)) {\n                    var startX = extent[0];\n                    var worldWidth = getWidth(projectionExtent);\n                    var world = 0;\n                    var offsetX = void 0;\n                    while (startX < projectionExtent[0]) {\n                        --world;\n                        offsetX = worldWidth * world;\n                        transforms.push(this.getRenderTransform(center, resolution, rotation, 0.5, width, height, offsetX).slice());\n                        startX += worldWidth;\n                    }\n                    world = 0;\n                    startX = extent[2];\n                    while (startX > projectionExtent[2]) {\n                        ++world;\n                        offsetX = worldWidth * world;\n                        transforms.push(this.getRenderTransform(center, resolution, rotation, 0.5, width, height, offsetX).slice());\n                        startX -= wo
 rldWidth;\n                    }\n                }\n                this.hitDetectionImageData_ = createHitDetectionImageData(size, transforms, this.renderedFeatures_, layer.getStyleFunction(), extent, resolution, rotation);\n            }\n            resolve(hitDetect(pixel, this.renderedFeatures_, this.hitDetectionImageData_));\n        }.bind(this));\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n     * @return {T|void} Callback result.\n     * @template T\n     */\n    CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = fun
 ction (coordinate, frameState, hitTolerance, callback, declutteredFeatures) {\n        if (!this.replayGroup_) {\n            return undefined;\n        }\n        else {\n            var resolution = frameState.viewState.resolution;\n            var rotation = frameState.viewState.rotation;\n            var layer_1 = this.getLayer();\n            /** @type {!Object<string, boolean>} */\n            var features_1 = {};\n            var result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, \n            /**\n             * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n             * @return {?} Callback result.\n             */\n            function (feature) {\n                var key = getUid(feature);\n                if (!(key in features_1)) {\n                    features_1[key] = true;\n                    return callback(feature, layer_1);\n                }\n            }, layer_1.getDeclutter() ? declutt
 eredFeatures : null);\n            return result;\n        }\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     */\n    CanvasVectorLayerRenderer.prototype.handleFontsChanged = function () {\n        var layer = this.getLayer();\n        if (layer.getVisible() && this.replayGroup_) {\n            layer.changed();\n        }\n    };\n    /**\n     * Handle changes in image style state.\n     * @param {import(\"../../events/Event.js\").default} event Image style change event.\n     * @private\n     */\n    CanvasVectorLayerRenderer.prototype.handleStyleImageChange_ = function (event) {\n        this.renderIfReadyAndVisible();\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasVectorLayerRenderer.prototype.prepareFrame = function (frameState) {\n     
    var vectorLayer = this.getLayer();\n        var vectorSource = vectorLayer.getSource();\n        if (!vectorSource) {\n            return false;\n        }\n        var animating = frameState.viewHints[ViewHint.ANIMATING];\n        var interacting = frameState.viewHints[ViewHint.INTERACTING];\n        var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();\n        var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n        if ((!this.dirty_ && !updateWhileAnimating && animating) ||\n            (!updateWhileInteracting && interacting)) {\n            this.animatingOrInteracting_ = true;\n            return true;\n        }\n        this.animatingOrInteracting_ = false;\n        var frameStateExtent = frameState.extent;\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        var resolution = viewState.resolution;\n        var pixelRatio = frameState.pixelRatio;\n        var vectorLayerRevision = vectorLa
 yer.getRevision();\n        var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n        var vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n        if (vectorLayerRenderOrder === undefined) {\n            vectorLayerRenderOrder = defaultRenderOrder;\n        }\n        var center = viewState.center.slice();\n        var extent = buffer(frameStateExtent, vectorLayerRenderBuffer * resolution);\n        var loadExtents = [extent.slice()];\n        var projectionExtent = projection.getExtent();\n        if (vectorSource.getWrapX() &&\n            projection.canWrapX() &&\n            !containsExtent(projectionExtent, frameState.extent)) {\n            // For the replay group, we need an extent that intersects the real world\n            // (-180° to +180°). To support geometries in a coordinate range from -540°\n            // to +540°, we add at least 1 world width on each side of the projection\n            // extent. If the viewport is wider than the world, we n
 eed to add half of\n            // the viewport width to make sure we cover the whole viewport.\n            var worldWidth = getWidth(projectionExtent);\n            var gutter = Math.max(getWidth(extent) / 2, worldWidth);\n            extent[0] = projectionExtent[0] - gutter;\n            extent[2] = projectionExtent[2] + gutter;\n            wrapCoordinateX(center, projection);\n            var loadExtent = wrapExtentX(loadExtents[0], projection);\n            // If the extent crosses the date line, we load data for both edges of the worlds\n            if (loadExtent[0] < projectionExtent[0] &&\n                loadExtent[2] < projectionExtent[2]) {\n                loadExtents.push([\n                    loadExtent[0] + worldWidth,\n                    loadExtent[1],\n                    loadExtent[2] + worldWidth,\n                    loadExtent[3],\n                ]);\n            }\n            else if (loadExtent[0] > projectionExtent[0] &&\n                loadExtent[2] >
  projectionExtent[2]) {\n                loadExtents.push([\n                    loadExtent[0] - worldWidth,\n                    loadExtent[1],\n                    loadExtent[2] - worldWidth,\n                    loadExtent[3],\n                ]);\n            }\n        }\n        if (!this.dirty_ &&\n            this.renderedResolution_ == resolution &&\n            this.renderedRevision_ == vectorLayerRevision &&\n            this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n            containsExtent(this.renderedExtent_, extent)) {\n            this.replayGroupChanged = false;\n            return true;\n        }\n        this.replayGroup_ = null;\n        this.dirty_ = false;\n        var replayGroup = new CanvasBuilderGroup(getRenderTolerance(resolution, pixelRatio), extent, resolution, pixelRatio, vectorLayer.getDeclutter());\n        var userProjection = getUserProjection();\n        var userTransform;\n        if (userProjection) {\n            for (var i = 0, ii 
 = loadExtents.length; i < ii; ++i) {\n                vectorSource.loadFeatures(toUserExtent(loadExtents[i], projection), resolution, userProjection);\n            }\n            userTransform = getTransformFromProjections(userProjection, projection);\n        }\n        else {\n            for (var i = 0, ii = loadExtents.length; i < ii; ++i) {\n                vectorSource.loadFeatures(loadExtents[i], resolution, projection);\n            }\n        }\n        var squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n        /**\n         * @param {import(\"../../Feature.js\").default} feature Feature.\n         * @this {CanvasVectorLayerRenderer}\n         */\n        var render = function (feature) {\n            var styles;\n            var styleFunction = feature.getStyleFunction() || vectorLayer.getStyleFunction();\n            if (styleFunction) {\n                styles = styleFunction(feature, resolution);\n            }\n            if (styles) {\n       
          var dirty = this.renderFeature(feature, squaredTolerance, styles, replayGroup, userTransform);\n                this.dirty_ = this.dirty_ || dirty;\n            }\n        }.bind(this);\n        var userExtent = toUserExtent(extent, projection);\n        /** @type {Array<import(\"../../Feature.js\").default>} */\n        var features = vectorSource.getFeaturesInExtent(userExtent);\n        if (vectorLayerRenderOrder) {\n            features.sort(vectorLayerRenderOrder);\n        }\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            render(features[i]);\n        }\n        this.renderedFeatures_ = features;\n        var replayGroupInstructions = replayGroup.finish();\n        var executorGroup = new ExecutorGroup(extent, resolution, pixelRatio, vectorSource.getOverlaps(), replayGroupInstructions, vectorLayer.getRenderBuffer());\n        this.renderedResolution_ = resolution;\n        this.renderedRevision_ = vectorLayerRevision;\n        this.renderedR
 enderOrder_ = vectorLayerRenderOrder;\n        this.renderedExtent_ = extent;\n        this.renderedCenter_ = center;\n        this.renderedProjection_ = projection;\n        this.replayGroup_ = executorGroup;\n        this.hitDetectionImageData_ = null;\n        this.replayGroupChanged = true;\n        return true;\n    };\n    /**\n     * @param {import(\"../../Feature.js\").default} feature Feature.\n     * @param {number} squaredTolerance Squared render tolerance.\n     * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n     * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n     * @param {import(\"../../proj.js\").TransformFunction=} opt_transform Transform from user to view projection.\n     * @return {boolean} `true` if an image is loading.\n     */\n    CanvasVectorLayerRenderer.prototype.renderFeature = function (feature, squaredTolerance, styl
 es, builderGroup, opt_transform) {\n        if (!styles) {\n            return false;\n        }\n        var loading = false;\n        if (Array.isArray(styles)) {\n            for (var i = 0, ii = styles.length; i < ii; ++i) {\n                loading =\n                    renderFeature(builderGroup, feature, styles[i], squaredTolerance, this.boundHandleStyleImageChange_, opt_transform) || loading;\n            }\n        }\n        else {\n            loading = renderFeature(builderGroup, feature, styles, squaredTolerance, this.boundHandleStyleImageChange_, opt_transform);\n        }\n        return loading;\n    };\n    return CanvasVectorLayerRenderer;\n}(CanvasLayerRenderer));\nexport default CanvasVectorLayerRenderer;\n//# sourceMappingURL=VectorLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b
 ) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/VectorImageLayer\n */\nimport CanvasImageLayerRenderer from './ImageLayer.js';\nimport CanvasVectorLayerRenderer from './VectorLayer.js';\nimport EventType from '../../events/EventType.js';\nimport ImageCanvas from '../../ImageCanvas.js';\nimport ImageState from '../../ImageState.js';\nimport ViewHint from '../../ViewHint.js';\nimport { apply, compose, create } from '../../transform.js';\nimport { assign } from '../../obj.js';\nimport { getHeight, getWidth, isEmpty, scaleFromCenter } from '../../extent.js';\nimport { renderDeclutterItems } from '../../render.js';\n/**\n * @c
 lassdesc\n * Canvas renderer for image layers.\n * @api\n */\nvar CanvasVectorImageLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasVectorImageLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/VectorImage.js\").default} layer Vector image layer.\n     */\n    function CanvasVectorImageLayerRenderer(layer) {\n        var _this = _super.call(this, layer) || this;\n        /**\n         * @private\n         * @type {import(\"./VectorLayer.js\").default}\n         */\n        _this.vectorRenderer_ = new CanvasVectorLayerRenderer(layer);\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.layerImageRatio_ = layer.getImageRatio();\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.coordinateToVectorPixelTransform_ = create();\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n      
   _this.renderedPixelToCoordinateTransform_ = null;\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    CanvasVectorImageLayerRenderer.prototype.disposeInternal = function () {\n        this.vectorRenderer_.dispose();\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n     */\n    CanvasVectorImageLayerRenderer.prototype.getFeatures = function (pixel) {\n        if (this.vectorRenderer_) {\n            var vectorPixel = apply(this.coordinateToVectorPixelTransform_, apply(this.renderedPixelToCoordinateTransform_, pixel.slice()));\n            return this.vectorRenderer_.getFeatures(vectorPixel);\n        }\n        else {\n            var promise = new Promise(function (resolve, reject) {\n                resolve([]);\n 
            });\n            return promise;\n        }\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     */\n    CanvasVectorImageLayerRenderer.prototype.handleFontsChanged = function () {\n        this.vectorRenderer_.handleFontsChanged();\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasVectorImageLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var viewResolution = viewState.resolution;\n        var hints = frameState.viewHints;\n        var vectorRenderer = this.vectorRenderer_;\n        var renderedExtent = frameState.extent;\n        if (this.layerImageRatio_ !== 1) {\n            renderedExtent = renderedExtent.slice(0);\
 n            scaleFromCenter(renderedExtent, this.layerImageRatio_);\n        }\n        var width = getWidth(renderedExtent) / viewResolution;\n        var height = getHeight(renderedExtent) / viewResolution;\n        if (!hints[ViewHint.ANIMATING] &&\n            !hints[ViewHint.INTERACTING] &&\n            !isEmpty(renderedExtent)) {\n            vectorRenderer.useContainer(null, null, 1);\n            var context = vectorRenderer.context;\n            var imageFrameState_1 = /** @type {import(\"../../PluggableMap.js\").FrameState} */ (assign({}, frameState, {\n                declutterItems: [],\n                extent: renderedExtent,\n                size: [width, height],\n                viewState: /** @type {import(\"../../View.js\").State} */ (assign({}, frameState.viewState, {\n                    rotation: 0,\n                })),\n            }));\n            var image_1 = new ImageCanvas(renderedExtent, viewResolution, pixelRatio, context.canvas, function (callback) {
 \n                if (vectorRenderer.prepareFrame(imageFrameState_1) &&\n                    vectorRenderer.replayGroupChanged) {\n                    vectorRenderer.clipping = false;\n                    vectorRenderer.renderFrame(imageFrameState_1, null);\n                    renderDeclutterItems(imageFrameState_1, null);\n                    callback();\n                }\n            });\n            image_1.addEventListener(EventType.CHANGE, function () {\n                if (image_1.getState() === ImageState.LOADED) {\n                    this.image_ = image_1;\n                    var imageResolution = image_1.getResolution();\n                    var imagePixelRatio = image_1.getPixelRatio();\n                    var renderedResolution = (imageResolution * pixelRatio) / imagePixelRatio;\n                    this.renderedResolution = renderedResolution;\n                    this.coordinateToVectorPixelTransform_ = compose(this.coordinateToVectorPixelTransform_, width / 2, hei
 ght / 2, 1 / renderedResolution, -1 / renderedResolution, 0, -viewState.center[0], -viewState.center[1]);\n                }\n            }.bind(this));\n            image_1.load();\n        }\n        if (this.image_) {\n            this.renderedPixelToCoordinateTransform_ = frameState.pixelToCoordinateTransform.slice();\n        }\n        return !!this.image_;\n    };\n    /**\n     */\n    CanvasVectorImageLayerRenderer.prototype.preRender = function () { };\n    /**\n     */\n    CanvasVectorImageLayerRenderer.prototype.postRender = function () { };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {Array<import(\"../../Feature.js\").Featu
 reLike>} declutteredFeatures Decluttered features.\n     * @return {T|void} Callback result.\n     * @template T\n     */\n    CanvasVectorImageLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, declutteredFeatures) {\n        if (this.vectorRenderer_) {\n            return this.vectorRenderer_.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback, declutteredFeatures);\n        }\n        else {\n            return _super.prototype.forEachFeatureAtCoordinate.call(this, coordinate, frameState, hitTolerance, callback, declutteredFeatures);\n        }\n    };\n    return CanvasVectorImageLayerRenderer;\n}(CanvasImageLayerRenderer));\nexport default CanvasVectorImageLayerRenderer;\n//# sourceMappingURL=VectorImageLayer.js.map","/**\n * @module ol/layer/VectorTileRenderType\n */\n/**\n * @enum {string}\n * Render mode for vector tiles:\n *  * `'image'`: Vector tiles are rendered as images. Great performance,
  but\n *    point symbols and texts are always rotated with the view and pixels are\n *    scaled during zoom animations.\n *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels\n *    are scaled during zoom animations. Point symbols and texts are accurately\n *    rendered as vectors and can stay upright on rotated views.\n *  * `'vector'`: Everything is rendered as vectors. Use this mode for improved\n *    performance on vector tile layers with only a few rendered features (e.g.\n *    for highlighting a subset of features of another layer with the same\n *    source).\n * @api\n */\nexport default {\n    IMAGE: 'image',\n    HYBRID: 'hybrid',\n    VECTOR: 'vector',\n};\n//# sourceMappingURL=VectorTileRenderType.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }
 ) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/VectorTileLayer\n */\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasExecutorGroup, { replayDeclutter, } from '../../render/canvas/ExecutorGroup.js';\nimport CanvasTileLayerRenderer from './TileLayer.js';\nimport EventType from '../../events/EventType.js';\nimport ReplayType from '../../render/canvas/BuilderType.js';\nimport TileState from '../../TileState.js';\nimport VectorTileRenderType from '../../layer/VectorTileRenderType.js';\nimport ViewHint from '../../ViewHint.js';\nimport { apply as applyTransform, create as createTransform, multiply, reset as reset
 Transform, scale, scale as scaleTransform, translate as translateTransform, } from '../../transform.js';\nimport { buffer, containsCoordinate, containsExtent, equals, getIntersection, getTopLeft, intersects, } from '../../extent.js';\nimport { clear } from '../../obj.js';\nimport { createHitDetectionImageData, hitDetect, } from '../../render/canvas/hitdetect.js';\nimport { getSquaredTolerance as getSquaredRenderTolerance, renderFeature, } from '../vector.js';\nimport { getUid } from '../../util.js';\nimport { listen, unlistenByKey } from '../../events.js';\nimport { toSize } from '../../size.js';\nimport { wrapX } from '../../coordinate.js';\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas/BuilderType.js\").default>>}\n */\nvar IMAGE_REPLAYS = {\n    'image': [\n        ReplayType.POLYGON,\n        ReplayType.CIRCLE,\n        ReplayType.LINE_STRING,\n        ReplayType.IMAGE,\n        ReplayType.TEXT,\n    ],\n    'hybrid': [ReplayType.POLYGON, ReplayType.LINE_STRI
 NG],\n    'vector': [],\n};\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas/BuilderType.js\").default>>}\n */\nvar VECTOR_REPLAYS = {\n    'image': [ReplayType.DEFAULT],\n    'hybrid': [ReplayType.IMAGE, ReplayType.TEXT, ReplayType.DEFAULT],\n    'vector': [\n        ReplayType.POLYGON,\n        ReplayType.CIRCLE,\n        ReplayType.LINE_STRING,\n        ReplayType.IMAGE,\n        ReplayType.TEXT,\n        ReplayType.DEFAULT,\n    ],\n};\n/**\n * @classdesc\n * Canvas renderer for vector tile layers.\n * @api\n */\nvar CanvasVectorTileLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasVectorTileLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/VectorTile.js\").default} layer VectorTile layer.\n     */\n    function CanvasVectorTileLayerRenderer(layer) {\n        var _this = _super.call(this, layer) || this;\n        /** @private */\n        _this.boundHandleStyleImageChange_ = _this.handleStyleImageChange_.bind(_this);\n  
       /**\n         * @private\n         * @type {boolean}\n         */\n        _this.dirty_ = false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedLayerRevision_;\n        /**\n         * @private\n         * @type {import(\"../../transform\").Transform}\n         */\n        _this.renderedPixelToCoordinateTransform_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRotation_;\n        /**\n         * @private\n         * @type {!Object<string, import(\"../../VectorRenderTile.js\").default>}\n         */\n        _this.renderTileImageQueue_ = {};\n        /**\n         * @type {Object<string, import(\"../../events.js\").EventsKey>}\n         */\n        _this.tileListenerKeys_ = {};\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.tmpTransform_ = createTransform();\n        return _this;\n    }\n    /**\
 n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection\").default} projection Projection.\n     * @param {boolean} queue Queue tile for rendering.\n     * @return {boolean|undefined} Tile needs to be rendered.\n     */\n    CanvasVectorTileLayerRenderer.prototype.prepareTile = function (tile, pixelRatio, projection, queue) {\n        var render;\n        var tileUid = getUid(tile);\n        var state = tile.getState();\n        if (((state === TileState.LOADED && tile.hifi) ||\n            state === TileState.ERROR) &&\n            tileUid in this.tileListenerKeys_) {\n            unlistenByKey(this.tileListenerKeys_[tileUid]);\n            delete this.tileListenerKeys_[tileUid];\n        }\n        if (state === TileState.LOADED || state === TileState.ERROR) {\n            this.updateExecutorGroup_(tile, pixelRatio, projection);\n            if (this.tileImageNeedsRende
 r_(tile, pixelRatio, projection)) {\n                render = true;\n                if (queue) {\n                    this.renderTileImageQueue_[tileUid] = tile;\n                }\n            }\n        }\n        return render;\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {!import(\"../../Tile.js\").default} Tile.\n     */\n    CanvasVectorTileLayerRenderer.prototype.getTile = function (z, x, y, frameState) {\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var resolution = viewState.resolution;\n        var projection = viewState.projection;\n        var layer = this.getLayer();\n        var tile = layer.getSource().getTile(z, x, y, pixelRatio, projection);\n        if (tile.getState() < TileState.LOADED) {\n         
    tile.wantedResolution = resolution;\n            var tileUid = getUid(tile);\n            if (!(tileUid in this.tileListenerKeys_)) {\n                var listenerKey = listen(tile, EventType.CHANGE, this.prepareTile.bind(this, tile, pixelRatio, projection, true));\n                this.tileListenerKeys_[tileUid] = listenerKey;\n            }\n        }\n        else {\n            var viewHints = frameState.viewHints;\n            var hifi = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n            if (hifi || !tile.wantedResolution) {\n                tile.wantedResolution = resolution;\n            }\n            var render = this.prepareTile(tile, pixelRatio, projection, false);\n            if (render && layer.getRenderMode() !== VectorTileRenderType.VECTOR) {\n                this.renderTileImage_(tile, frameState);\n            }\n        }\n        return _super.prototype.getTile.call(this, z, x, y, frameState);\n    };\n    /**\n     * @param {imp
 ort(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @return {boolean} Tile is drawable.\n     */\n    CanvasVectorTileLayerRenderer.prototype.isDrawableTile = function (tile) {\n        var layer = this.getLayer();\n        return (_super.prototype.isDrawableTile.call(this, tile) &&\n            (layer.getRenderMode() === VectorTileRenderType.VECTOR\n                ? getUid(layer) in tile.executorGroups\n                : tile.hasContext(layer)));\n    };\n    /**\n     * @inheritDoc\n     */\n    CanvasVectorTileLayerRenderer.prototype.getTileImage = function (tile) {\n        return tile.getImage(this.getLayer());\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasVectorTileLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var layerRevision = this.getLayer().getRevision(
 );\n        if (this.renderedLayerRevision_ != layerRevision) {\n            this.renderedTiles.length = 0;\n        }\n        this.renderedLayerRevision_ = layerRevision;\n        return _super.prototype.prepareFrame.call(this, frameState);\n    };\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.updateExecutorGroup_ = function (tile, pixelRatio, projection) {\n        var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        var revision = layer.getRevision();\n        var renderOrder = layer.getRenderOrder() || null;\n        var resolution = tile.wantedResolution;\n        var builderState = tile.getReplayState(layer);\n        if (!builderState.dirty &&\n            builderState.renderedResolution ===
  resolution &&\n            builderState.renderedRevision == revision &&\n            builderState.renderedRenderOrder == renderOrder &&\n            builderState.renderedZ === tile.sourceZ) {\n            return;\n        }\n        var source = layer.getSource();\n        var sourceTileGrid = source.getTileGrid();\n        var tileGrid = source.getTileGridForProjection(projection);\n        var tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n        var sourceTiles = source.getSourceTiles(pixelRatio, projection, tile);\n        var layerUid = getUid(layer);\n        delete tile.hitDetectionImageData[layerUid];\n        tile.executorGroups[layerUid] = [];\n        var _loop_1 = function (t, tt) {\n            var sourceTile = sourceTiles[t];\n            if (sourceTile.getState() != TileState.LOADED) {\n                return \"continue\";\n            }\n            var sourceTileCoord = sourceTile.tileCoord;\n            var sourceTileExtent = sourceTileGrid.get
 TileCoordExtent(sourceTileCoord);\n            var sharedExtent = getIntersection(tileExtent, sourceTileExtent);\n            var bufferedExtent = equals(sourceTileExtent, sharedExtent)\n                ? null\n                : buffer(sharedExtent, layer.getRenderBuffer() * resolution, this_1.tmpExtent);\n            builderState.dirty = false;\n            var builderGroup = new CanvasBuilderGroup(0, sharedExtent, resolution, pixelRatio, layer.getDeclutter());\n            var squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n            /**\n             * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n             * @this {CanvasVectorTileLayerRenderer}\n             */\n            var render = function (feature) {\n                var styles;\n                var styleFunction = feature.getStyleFunction() || layer.getStyleFunction();\n                if (styleFunction) {\n                    styles = styleFunction(feature, resolution);
 \n                }\n                if (styles) {\n                    var dirty = this.renderFeature(feature, squaredTolerance, styles, builderGroup);\n                    this.dirty_ = this.dirty_ || dirty;\n                    builderState.dirty = builderState.dirty || dirty;\n                }\n            };\n            var features = sourceTile.getFeatures();\n            if (renderOrder && renderOrder !== builderState.renderedRenderOrder) {\n                features.sort(renderOrder);\n            }\n            for (var i = 0, ii = features.length; i < ii; ++i) {\n                var feature = features[i];\n                if (!bufferedExtent ||\n                    intersects(bufferedExtent, feature.getGeometry().getExtent())) {\n                    render.call(this_1, feature);\n                }\n            }\n            var executorGroupInstructions = builderGroup.finish();\n            // no need to clip when the render tile is covered by a single source tile\n     
        var replayExtent = layer.getRenderMode() !== VectorTileRenderType.VECTOR &&\n                layer.getDeclutter() &&\n                sourceTiles.length === 1\n                ? null\n                : sharedExtent;\n            var renderingReplayGroup = new CanvasExecutorGroup(replayExtent, resolution, pixelRatio, source.getOverlaps(), executorGroupInstructions, layer.getRenderBuffer());\n            tile.executorGroups[layerUid].push(renderingReplayGroup);\n        };\n        var this_1 = this;\n        for (var t = 0, tt = sourceTiles.length; t < tt; ++t) {\n            _loop_1(t, tt);\n        }\n        builderState.renderedRevision = revision;\n        builderState.renderedZ = tile.sourceZ;\n        builderState.renderedRenderOrder = renderOrder;\n        builderState.renderedResolution = resolution;\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameSta
 te Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n     * @return {T|void} Callback result.\n     * @template T\n     */\n    CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, declutteredFeatures) {\n        var resolution = frameState.viewState.resolution;\n        var rotation = frameState.viewState.rotation;\n        hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;\n        var layer = this.getLayer();\n        var declutter = layer.getDeclutter();\n        var source = layer.getSource();\n        var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);\n        /** @type {!Object<string, boolean>} 
 */\n        var features = {};\n        var renderedTiles = /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (this\n            .renderedTiles);\n        var found;\n        var i, ii;\n        var _loop_2 = function () {\n            var tile = renderedTiles[i];\n            var tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n            var tileContainsCoordinate = containsCoordinate(tileExtent, coordinate);\n            if (!declutter) {\n                // When not decluttering, we only need to consider the tile that contains the given\n                // coordinate, because each feature will be rendered for each tile that contains it.\n                if (!tileContainsCoordinate) {\n                    return \"continue\";\n                }\n            }\n            var executorGroups = tile.executorGroups[getUid(layer)];\n            for (var t = 0, tt = executorGroups.length; t < tt; ++t) {\n                var executorGroup = executorG
 roups[t];\n                found =\n                    found ||\n                        executorGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, \n                        /**\n                         * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n                         * @return {?} Callback result.\n                         */\n                        function (feature) {\n                            if (tileContainsCoordinate ||\n                                (declutteredFeatures &&\n                                    declutteredFeatures.indexOf(feature) !== -1)) {\n                                var key = feature.getId();\n                                if (key === undefined) {\n                                    key = getUid(feature);\n                                }\n                                if (!(key in features)) {\n                                    features[key] = true;\n                            
         return callback(feature, layer);\n                                }\n                            }\n                        }, layer.getDeclutter() ? declutteredFeatures : null);\n            }\n        };\n        for (i = 0, ii = renderedTiles.length; i < ii; ++i) {\n            _loop_2();\n        }\n        return found;\n    };\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n     */\n    CanvasVectorTileLayerRenderer.prototype.getFeatures = function (pixel) {\n        return new Promise(function (resolve, reject) {\n            var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n            var layerUid = getUid(layer);\n            var source = layer.getSource();\n            var projection = this.renderedProjection;\n            var projecti
 onExtent = projection.getExtent();\n            var resolution = this.renderedResolution;\n            var tileGrid = source.getTileGridForProjection(projection);\n            var coordinate = applyTransform(this.renderedPixelToCoordinateTransform_, pixel.slice());\n            var tileCoord = tileGrid.getTileCoordForCoordAndResolution(coordinate, resolution);\n            var tile;\n            for (var i = 0, ii = this.renderedTiles.length; i < ii; ++i) {\n                if (tileCoord.toString() === this.renderedTiles[i].tileCoord.toString()) {\n                    tile = this.renderedTiles[i];\n                    if (tile.getState() === TileState.LOADED && tile.hifi) {\n                        var extent_1 = tileGrid.getTileCoordExtent(tile.tileCoord);\n                        if (source.getWrapX() &&\n                            projection.canWrapX() &&\n                            !containsExtent(projectionExtent, extent_1)) {\n                            wrapX(coordinate, pr
 ojection);\n                        }\n                        break;\n                    }\n                    tile = undefined;\n                }\n            }\n            if (!tile || tile.loadingSourceTiles > 0) {\n                resolve([]);\n                return;\n            }\n            var extent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n            var corner = getTopLeft(extent);\n            var tilePixel = [\n                (coordinate[0] - corner[0]) / resolution,\n                (corner[1] - coordinate[1]) / resolution,\n            ];\n            var features = tile\n                .getSourceTiles()\n                .reduce(function (accumulator, sourceTile) {\n                return accumulator.concat(sourceTile.getFeatures());\n            }, []);\n            var hitDetectionImageData = tile.hitDetectionImageData[layerUid];\n            if (!hitDetectionImageData && !this.animatingOrInteracting_) {\n                var tileSize = toSize(
 tileGrid.getTileSize(tileGrid.getZForResolution(resolution)));\n                var size = [tileSize[0] / 2, tileSize[1] / 2];\n                var rotation = this.renderedRotation_;\n                var transforms = [\n                    this.getRenderTransform(tileGrid.getTileCoordCenter(tile.wrappedTileCoord), resolution, 0, 0.5, size[0], size[1], 0),\n                ];\n                hitDetectionImageData = createHitDetectionImageData(tileSize, transforms, features, layer.getStyleFunction(), tileGrid.getTileCoordExtent(tile.wrappedTileCoord), tile.getReplayState(layer).renderedResolution, rotation);\n                tile.hitDetectionImageData[layerUid] = hitDetectionImageData;\n            }\n            resolve(hitDetect(tilePixel, features, hitDetectionImageData));\n        }.bind(this));\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     */\n    CanvasVectorTileLayerRenderer.prototype.handleFontsChanged = function
  () {\n        clear(this.renderTileImageQueue_);\n        var layer = this.getLayer();\n        if (layer.getVisible() && this.renderedLayerRevision_ !== undefined) {\n            layer.changed();\n        }\n    };\n    /**\n     * Handle changes in image style state.\n     * @param {import(\"../../events/Event.js\").default} event Image style change event.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.handleStyleImageChange_ = function (event) {\n        this.renderIfReadyAndVisible();\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var viewHints = frameState.viewHints;\n        var hifi = !(viewHints[ViewHint.ANIMATING] || viewHints[Vie
 wHint.INTERACTING]);\n        this.renderQueuedTileImages_(hifi, frameState);\n        _super.prototype.renderFrame.call(this, frameState, target);\n        this.renderedPixelToCoordinateTransform_ = frameState.pixelToCoordinateTransform.slice();\n        this.renderedRotation_ = frameState.viewState.rotation;\n        var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        var renderMode = layer.getRenderMode();\n        if (renderMode === VectorTileRenderType.IMAGE) {\n            return this.container;\n        }\n        var source = layer.getSource();\n        // Unqueue tiles from the image queue when we don't need any more\n        var usedTiles = frameState.usedTiles[getUid(source)];\n        for (var tileUid in this.renderTileImageQueue_) {\n            if (!usedTiles || !(tileUid in usedTiles)) {\n                delete this.renderTileImageQueue_[tileUid];\n            }\n        }\n        var context = this.context;\n        v
 ar declutterReplays = layer.getDeclutter() ? {} : null;\n        var replayTypes = VECTOR_REPLAYS[renderMode];\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var center = viewState.center;\n        var resolution = viewState.resolution;\n        var rotation = viewState.rotation;\n        var size = frameState.size;\n        var width = Math.round(size[0] * pixelRatio);\n        var height = Math.round(size[1] * pixelRatio);\n        var tiles = this.renderedTiles;\n        var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);\n        var clips = [];\n        var clipZs = [];\n        for (var i = tiles.length - 1; i >= 0; --i) {\n            var tile = /** @type {import(\"../../VectorRenderTile.js\").default} */ (tiles[i]);\n            var tileCoord = tile.tileCoord;\n            var tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n            var worldOffset = tileGrid.getTileCo
 ordExtent(tileCoord, this.tmpExtent)[0] -\n                tileExtent[0];\n            var transform = multiply(scale(this.inversePixelTransform.slice(), 1 / pixelRatio, 1 / pixelRatio), this.getRenderTransform(center, resolution, rotation, pixelRatio, width, height, worldOffset));\n            var executorGroups = tile.executorGroups[getUid(layer)];\n            var clipped = false;\n            for (var t = 0, tt = executorGroups.length; t < tt; ++t) {\n                var executorGroup = executorGroups[t];\n                if (!executorGroup.hasExecutors(replayTypes)) {\n                    // sourceTile has no instructions of the types we want to render\n                    continue;\n                }\n                var currentZ = tile.tileCoord[0];\n                var currentClip = void 0;\n                if (!declutterReplays && !clipped) {\n                    currentClip = executorGroup.getClipCoords(transform);\n                    context.save();\n                    
 // Create a clip mask for regions in this low resolution tile that are\n                    // already filled by a higher resolution tile\n                    for (var j = 0, jj = clips.length; j < jj; ++j) {\n                        var clip = clips[j];\n                        if (currentZ < clipZs[j]) {\n                            context.beginPath();\n                            // counter-clockwise (outer ring) for current tile\n                            context.moveTo(currentClip[0], currentClip[1]);\n                            context.lineTo(currentClip[2], currentClip[3]);\n                            context.lineTo(currentClip[4], currentClip[5]);\n                            context.lineTo(currentClip[6], currentClip[7]);\n                            // clockwise (inner ring) for higher resolution tile\n                            context.moveTo(clip[6], clip[7]);\n                            context.lineTo(clip[4], clip[5]);\n                            context.lineTo
 (clip[2], clip[3]);\n                            context.lineTo(clip[0], clip[1]);\n                            context.clip();\n                        }\n                    }\n                }\n                executorGroup.execute(context, 1, transform, rotation, hifi, replayTypes, declutterReplays);\n                if (!declutterReplays && !clipped) {\n                    context.restore();\n                    clips.push(currentClip);\n                    clipZs.push(currentZ);\n                    clipped = true;\n                }\n            }\n        }\n        if (declutterReplays) {\n            var layerState = frameState.layerStatesArray[frameState.layerIndex];\n            replayDeclutter(declutterReplays, context, rotation, layerState.opacity, hifi, frameState.declutterItems);\n        }\n        return this.container;\n    };\n    /**\n     * @param {boolean} hifi We have time to render a high fidelity map image.\n     * @param {import('../../PluggableMap.js').F
 rameState} frameState Frame state.\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderQueuedTileImages_ = function (hifi, frameState) {\n        // When we don't have time to render hifi, only render tiles until we have used up\n        // half of the frame budget of 16 ms\n        for (var uid in this.renderTileImageQueue_) {\n            if (!hifi && Date.now() - frameState.time > 8) {\n                frameState.animate = true;\n                break;\n            }\n            var tile = this.renderTileImageQueue_[uid];\n            delete this.renderTileImageQueue_[uid];\n            this.renderTileImage_(tile, frameState);\n        }\n    };\n    /**\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n     * @param {import(\"../../render/canvas
 /BuilderGroup.js\").default} executorGroup Replay group.\n     * @return {boolean} `true` if an image is loading.\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderFeature = function (feature, squaredTolerance, styles, executorGroup) {\n        if (!styles) {\n            return false;\n        }\n        var loading = false;\n        if (Array.isArray(styles)) {\n            for (var i = 0, ii = styles.length; i < ii; ++i) {\n                loading =\n                    renderFeature(executorGroup, feature, styles[i], squaredTolerance, this.boundHandleStyleImageChange_) || loading;\n            }\n        }\n        else {\n            loading = renderFeature(executorGroup, feature, styles, squaredTolerance, this.boundHandleStyleImageChange_);\n        }\n        return loading;\n    };\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection.js\").de
 fault} projection Projection.\n     * @return {boolean} A new tile image was rendered.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.tileImageNeedsRender_ = function (tile, pixelRatio, projection) {\n        var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        var replayState = tile.getReplayState(layer);\n        var revision = layer.getRevision();\n        var sourceZ = tile.sourceZ;\n        var resolution = tile.wantedResolution;\n        return (replayState.renderedTileResolution !== resolution ||\n            replayState.renderedTileRevision !== revision ||\n            replayState.renderedTileZ !== sourceZ);\n    };\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @param {import(\"../../PluggableMap\").FrameState} frameState Frame state.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderTileImage_ = function (tile, frameState) {\n      
   var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        var replayState = tile.getReplayState(layer);\n        var revision = layer.getRevision();\n        var executorGroups = tile.executorGroups[getUid(layer)];\n        replayState.renderedTileRevision = revision;\n        replayState.renderedTileZ = tile.sourceZ;\n        var tileCoord = tile.wrappedTileCoord;\n        var z = tileCoord[0];\n        var source = layer.getSource();\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        var tileGrid = source.getTileGridForProjection(projection);\n        var tileResolution = tileGrid.getResolution(tile.tileCoord[0]);\n        var renderPixelRatio = (frameState.pixelRatio / tile.wantedResolution) * tileResolution;\n        var resolution = tileGrid.getResolution(z);\n        var context = tile.getContext(layer);\n        // Increase tile si
 ze when overzooming for low pixel ratio, to avoid blurry tiles\n        pixelRatio = Math.max(pixelRatio, renderPixelRatio / pixelRatio);\n        var size = source.getTilePixelSize(z, pixelRatio, projection);\n        context.canvas.width = size[0];\n        context.canvas.height = size[1];\n        var renderScale = pixelRatio / renderPixelRatio;\n        if (renderScale !== 1) {\n            var canvasTransform = resetTransform(this.tmpTransform_);\n            scaleTransform(canvasTransform, renderScale, renderScale);\n            context.setTransform.apply(context, canvasTransform);\n        }\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);\n        var pixelScale = renderPixelRatio / resolution;\n        var transform = resetTransform(this.tmpTransform_);\n        scaleTransform(transform, pixelScale, -pixelScale);\n        translateTransform(transform, -tileExtent[0], -tileExtent[3]);\n        for (var i = 0, ii = executorGroups.length; i < i
 i; ++i) {\n            var executorGroup = executorGroups[i];\n            executorGroup.execute(context, renderScale, transform, 0, true, IMAGE_REPLAYS[layer.getRenderMode()]);\n        }\n        replayState.renderedTileResolution = tile.wantedResolution;\n    };\n    return CanvasVectorTileLayerRenderer;\n}(CanvasTileLayerRenderer));\nexport default CanvasVectorTileLayerRenderer;\n//# sourceMappingURL=VectorTileLayer.js.map","/**\n * @module ol/geom/flat/interpolate\n */\nimport { binarySearch } from '../../array.js';\nimport { lerp } from '../../math.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array<number>=} opt_dest Destination.\n * @param {number=} opt_dimension Destination dimension (default is `2`)\n * @return {Array<number>} Destination.\n */\nexport function interpolatePoint(flatCoordinates, offset
 , end, stride, fraction, opt_dest, opt_dimension) {\n    var o, t;\n    var n = (end - offset) / stride;\n    if (n === 1) {\n        o = offset;\n    }\n    else if (n === 2) {\n        o = offset;\n        t = fraction;\n    }\n    else if (n !== 0) {\n        var x1 = flatCoordinates[offset];\n        var y1 = flatCoordinates[offset + 1];\n        var length_1 = 0;\n        var cumulativeLengths = [0];\n        for (var i = offset + stride; i < end; i += stride) {\n            var x2 = flatCoordinates[i];\n            var y2 = flatCoordinates[i + 1];\n            length_1 += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n            cumulativeLengths.push(length_1);\n            x1 = x2;\n            y1 = y2;\n        }\n        var target = fraction * length_1;\n        var index = binarySearch(cumulativeLengths, target);\n        if (index < 0) {\n            t =\n                (target - cumulativeLengths[-index - 2]) /\n                    (cumulativeLengths[-ind
 ex - 1] - cumulativeLengths[-index - 2]);\n            o = offset + (-index - 2) * stride;\n        }\n        else {\n            o = offset + index * stride;\n        }\n    }\n    var dimension = opt_dimension > 1 ? opt_dimension : 2;\n    var dest = opt_dest ? opt_dest : new Array(dimension);\n    for (var i = 0; i < dimension; ++i) {\n        dest[i] =\n            o === undefined\n                ? NaN\n                : t === undefined\n                    ? flatCoordinates[o + i]\n                    : lerp(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);\n    }\n    return dest;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringCoordinateAtM(flatCoordinates, offset, end, stride
 , m, extrapolate) {\n    if (end == offset) {\n        return null;\n    }\n    var coordinate;\n    if (m < flatCoordinates[offset + stride - 1]) {\n        if (extrapolate) {\n            coordinate = flatCoordinates.slice(offset, offset + stride);\n            coordinate[stride - 1] = m;\n            return coordinate;\n        }\n        else {\n            return null;\n        }\n    }\n    else if (flatCoordinates[end - 1] < m) {\n        if (extrapolate) {\n            coordinate = flatCoordinates.slice(end - stride, end);\n            coordinate[stride - 1] = m;\n            return coordinate;\n        }\n        else {\n            return null;\n        }\n    }\n    // FIXME use O(1) search\n    if (m == flatCoordinates[offset + stride - 1]) {\n        return flatCoordinates.slice(offset, offset + stride);\n    }\n    var lo = offset / stride;\n    var hi = end / stride;\n    while (lo < hi) {\n        var mid = (lo + hi) >> 1;\n        if (m < flatCoordinates[(mid + 1) *
  stride - 1]) {\n            hi = mid;\n        }\n        else {\n            lo = mid + 1;\n        }\n    }\n    var m0 = flatCoordinates[lo * stride - 1];\n    if (m == m0) {\n        return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n    }\n    var m1 = flatCoordinates[(lo + 1) * stride - 1];\n    var t = (m - m0) / (m1 - m0);\n    coordinate = [];\n    for (var i = 0; i < stride - 1; ++i) {\n        coordinate.push(lerp(flatCoordinates[(lo - 1) * stride + i], flatCoordinates[lo * stride + i], t));\n    }\n    coordinate.push(m);\n    return coordinate;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringsCoordinat
 eAtM(flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {\n    if (interpolate) {\n        return lineStringCoordinateAtM(flatCoordinates, offset, ends[ends.length - 1], stride, m, extrapolate);\n    }\n    var coordinate;\n    if (m < flatCoordinates[stride - 1]) {\n        if (extrapolate) {\n            coordinate = flatCoordinates.slice(0, stride);\n            coordinate[stride - 1] = m;\n            return coordinate;\n        }\n        else {\n            return null;\n        }\n    }\n    if (flatCoordinates[flatCoordinates.length - 1] < m) {\n        if (extrapolate) {\n            coordinate = flatCoordinates.slice(flatCoordinates.length - stride);\n            coordinate[stride - 1] = m;\n            return coordinate;\n        }\n        else {\n            return null;\n        }\n    }\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        if (offset == end) {\n            continue;\n        }\n        if (m < flat
 Coordinates[offset + stride - 1]) {\n            return null;\n        }\n        else if (m <= flatCoordinates[end - 1]) {\n            return lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, false);\n        }\n        offset = end;\n    }\n    return null;\n}\n//# sourceMappingURL=interpolate.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/LineString\n */\nimport GeometryLayout from './Geome
 tryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestPoint, maxSquaredDelta } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateCoordinates } from './flat/deflate.js';\nimport { douglasPeucker } from './flat/simplify.js';\nimport { extend } from '../array.js';\nimport { forEach as forEachSegment } from './flat/segments.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { interpolatePoint, lineStringCoordinateAtM } from './flat/interpolate.js';\nimport { intersectsLineString } from './flat/intersectsextent.js';\nimport { lineStringLength } from './flat/length.js';\n/**\n * @classdesc\n * Linestring geometry.\n *\n * @api\n */\nvar LineString = /** @class */ (function (_super) {\n    __extends(LineString, _super);\n    /**\n     * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n     *   
   For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    function LineString(coordinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        _this.flatMidpoint_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.flatMidpointRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n        }\n        else {\n            _this.setCoordinate
 s(\n            /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed coordinate to the coordinates of the linestring.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @api\n     */\n    LineString.prototype.appendCoordinate = function (coordinate) {\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = coordinate.slice();\n        }\n        else {\n            extend(this.flatCoordinates, coordinate);\n        }\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!LineString} Clone.\n     * @api\n     */\n    LineString.prototype.clone = function () {\n        return new LineString(this.flatCoordinates.slice(), this.layout);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closes
 tPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    LineString.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(maxSquaredDelta(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestPoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * Iterate over each segment, calling the provided callback.\n     * If the callback returns a truthy value the function returns that\n     * value immediately. Otherwi
 se the function returns `false`.\n     *\n     * @param {function(this: S, import(\"../coordinate.js\").Coordinate, import(\"../coordinate.js\").Coordinate): T} callback Function\n     *     called for each segment. The function will receive two arguments, the start and end coordinates of the segment.\n     * @return {T|boolean} Value.\n     * @template T,S\n     * @api\n     */\n    LineString.prototype.forEachSegment = function (callback) {\n        return forEachSegment(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, callback);\n    };\n    /**\n     * Returns the coordinate at `m` using linear interpolation, or `null` if no\n     * such coordinate exists.\n     *\n     * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n     * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n     * M will return the first coordinate and Ms greater than the last M will\n     * return the last coordinate.\n     *\n     * @param {
 number} m M.\n     * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n     * @api\n     */\n    LineString.prototype.getCoordinateAtM = function (m, opt_extrapolate) {\n        if (this.layout != GeometryLayout.XYM &&\n            this.layout != GeometryLayout.XYZM) {\n            return null;\n        }\n        var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n        return lineStringCoordinateAtM(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, m, extrapolate);\n    };\n    /**\n     * Return the coordinates of the linestring.\n     * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n     * @api\n     */\n    LineString.prototype.getCoordinates = function () {\n        return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * Return the coordinate at the provided frac
 tion along the linestring.\n     * The `fraction` is a number between 0 and 1, where 0 is the start of the\n     * linestring and 1 is the end.\n     * @param {number} fraction Fraction.\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_dest Optional coordinate whose values will\n     *     be modified. If not provided, a new coordinate will be returned.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinate of the interpolated point.\n     * @api\n     */\n    LineString.prototype.getCoordinateAt = function (fraction, opt_dest) {\n        return interpolatePoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, fraction, opt_dest, this.stride);\n    };\n    /**\n     * Return the length of the linestring on projected plane.\n     * @return {number} Length (on projected plane).\n     * @api\n     */\n    LineString.prototype.getLength = function () {\n        return lineStringLength(this.flatCoordinates, 0, this.flatCoordinates.length, this
 .stride);\n    };\n    /**\n     * @return {Array<number>} Flat midpoint.\n     */\n    LineString.prototype.getFlatMidpoint = function () {\n        if (this.flatMidpointRevision_ != this.getRevision()) {\n            this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_);\n            this.flatMidpointRevision_ = this.getRevision();\n        }\n        return this.flatMidpoint_;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LineString} Simplified LineString.\n     * @protected\n     */\n    LineString.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        simplifiedFlatCoordinates.length = douglasPeucker(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n        return new LineString(simplifiedFlatCoordinates, GeometryLayout.XY);\n    };\n    /**\n     * Get the type of this geometry.\n 
     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    LineString.prototype.getType = function () {\n        return GeometryType.LINE_STRING;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    LineString.prototype.intersectsExtent = function (extent) {\n        return intersectsLineString(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of the linestring.\n     * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    LineString.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 1);\n        i
 f (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\n    return LineString;\n}(SimpleGeometry));\nexport default LineString;\n//# sourceMappingURL=LineString.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Vector\n */\nimport BaseVectorLayer 
 from './BaseVector.js';\nimport CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends {BaseVectorLayer<import(\"../source/Vector.js\").default>}\n * @api\n */\nvar VectorLayer = /** @class */ (function (_super) {\n    __extends(VectorLayer, _super);\n    /**\n     * @param {import(\"./BaseVector.js\").Options=} opt_options Options.\n     */\n    function VectorLayer(opt_options) {\n        return _super.call(this, opt_options) || this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     */\n    VectorLayer.prototype.createRenderer = function () {\n        
 return new CanvasVectorLayerRenderer(this);\n    };\n    return VectorLayer;\n}(BaseVectorLayer));\nexport default VectorLayer;\n//# sourceMappingURL=Vector.js.map","/**\n * @module ol/geom/flat/geodesic\n */\nimport { get as getProjection, getTransform } from '../../proj.js';\nimport { squaredSegmentDistance, toDegrees, toRadians } from '../../math.js';\n/**\n * @param {function(number): import(\"../../coordinate.js\").Coordinate} interpolate Interpolate function.\n * @param {import(\"../../proj.js\").TransformFunction} transform Transform from longitude/latitude to\n *     projected coordinates.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nfunction line(interpolate, transform, squaredTolerance) {\n    // FIXME reduce garbage generation\n    // FIXME optimize stack operations\n    /** @type {Array<number>} */\n    var flatCoordinates = [];\n    var geoA = interpolate(0);\n    var geoB = interpolate(1);\n    var a = tran
 sform(geoA);\n    var b = transform(geoB);\n    /** @type {Array<import(\"../../coordinate.js\").Coordinate>} */\n    var geoStack = [geoB, geoA];\n    /** @type {Array<import(\"../../coordinate.js\").Coordinate>} */\n    var stack = [b, a];\n    /** @type {Array<number>} */\n    var fractionStack = [1, 0];\n    /** @type {!Object<string, boolean>} */\n    var fractions = {};\n    var maxIterations = 1e5;\n    var geoM, m, fracA, fracB, fracM, key;\n    while (--maxIterations > 0 && fractionStack.length > 0) {\n        // Pop the a coordinate off the stack\n        fracA = fractionStack.pop();\n        geoA = geoStack.pop();\n        a = stack.pop();\n        // Add the a coordinate if it has not been added yet\n        key = fracA.toString();\n        if (!(key in fractions)) {\n            flatCoordinates.push(a[0], a[1]);\n            fractions[key] = true;\n        }\n        // Pop the b coordinate off the stack\n        fracB = fractionStack.pop();\n        geoB = geoStack.pop
 ();\n        b = stack.pop();\n        // Find the m point between the a and b coordinates\n        fracM = (fracA + fracB) / 2;\n        geoM = interpolate(fracM);\n        m = transform(geoM);\n        if (squaredSegmentDistance(m[0], m[1], a[0], a[1], b[0], b[1]) <\n            squaredTolerance) {\n            // If the m point is sufficiently close to the straight line, then we\n            // discard it.  Just use the b coordinate and move on to the next line\n            // segment.\n            flatCoordinates.push(b[0], b[1]);\n            key = fracB.toString();\n            fractions[key] = true;\n        }\n        else {\n            // Otherwise, we need to subdivide the current line segment.  Split it\n            // into two and push the two line segments onto the stack.\n            fractionStack.push(fracB, fracM, fracM, fracA);\n            stack.push(b, m, m, a);\n            geoStack.push(geoB, geoM, geoM, geoA);\n        }\n    }\n    return flatCoordinates;\n}\
 n/**\n * Generate a great-circle arcs between two lat/lon points.\n * @param {number} lon1 Longitude 1 in degrees.\n * @param {number} lat1 Latitude 1 in degrees.\n * @param {number} lon2 Longitude 2 in degrees.\n * @param {number} lat2 Latitude 2 in degrees.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolerance) {\n    var geoProjection = getProjection('EPSG:4326');\n    var cosLat1 = Math.cos(toRadians(lat1));\n    var sinLat1 = Math.sin(toRadians(lat1));\n    var cosLat2 = Math.cos(toRadians(lat2));\n    var sinLat2 = Math.sin(toRadians(lat2));\n    var cosDeltaLon = Math.cos(toRadians(lon2 - lon1));\n    var sinDeltaLon = Math.sin(toRadians(lon2 - lon1));\n    var d = sinLat1 * sinLat2 + cosLat1 * cosLat2 * cosDeltaLon;\n    return line(\n    /**\n     * @param {n
 umber} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function (frac) {\n        if (1 <= d) {\n            return [lon2, lat2];\n        }\n        var D = frac * Math.acos(d);\n        var cosD = Math.cos(D);\n        var sinD = Math.sin(D);\n        var y = sinDeltaLon * cosLat2;\n        var x = cosLat1 * sinLat2 - sinLat1 * cosLat2 * cosDeltaLon;\n        var theta = Math.atan2(y, x);\n        var lat = Math.asin(sinLat1 * cosD + cosLat1 * sinD * Math.cos(theta));\n        var lon = toRadians(lon1) +\n            Math.atan2(Math.sin(theta) * sinD * cosLat1, cosD - sinLat1 * Math.sin(lat));\n        return [toDegrees(lon), toDegrees(lat)];\n    }, getTransform(geoProjection, projection), squaredTolerance);\n}\n/**\n * Generate a meridian (line at constant longitude).\n * @param {number} lon Longitude.\n * @param {number} lat1 Latitude 1.\n * @param {number} lat2 Latitude 2.\n * @param {import(\"../../proj/Projection.js\").de
 fault} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function meridian(lon, lat1, lat2, projection, squaredTolerance) {\n    var epsg4326Projection = getProjection('EPSG:4326');\n    return line(\n    /**\n     * @param {number} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function (frac) {\n        return [lon, lat1 + (lat2 - lat1) * frac];\n    }, getTransform(epsg4326Projection, projection), squaredTolerance);\n}\n/**\n * Generate a parallel (line at constant latitude).\n * @param {number} lat Latitude.\n * @param {number} lon1 Longitude 1.\n * @param {number} lon2 Longitude 2.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function parallel(lat, lon1, lon2, projection, squaredTolerance)
  {\n    var epsg4326Projection = getProjection('EPSG:4326');\n    return line(\n    /**\n     * @param {number} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function (frac) {\n        return [lon1 + (lon2 - lon1) * frac, lat];\n    }, getTransform(epsg4326Projection, projection), squaredTolerance);\n}\n//# sourceMappingURL=geodesic.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();
 \n/**\n * @module ol/layer/Graticule\n */\nimport Collection from '../Collection.js';\nimport EventType from '../render/EventType.js';\nimport Feature from '../Feature.js';\nimport Fill from '../style/Fill.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport Point from '../geom/Point.js';\nimport Stroke from '../style/Stroke.js';\nimport Style from '../style/Style.js';\nimport Text from '../style/Text.js';\nimport VectorLayer from './Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { applyTransform, approximatelyEquals, containsCoordinate, containsExtent, equals, getCenter, getHeight, getIntersection, getWidth, intersects, isEmpty, wrapX as wrapExtentX, } from '../extent.js';\nimport { assign } from '../obj.js';\nimport { clamp } from '../math.js';\nimport { degreesToStringHDMS } from '../coordinate.js';\nimport { equivalent as equivalentProjection, get as getProjection, getTransform, } from '../pr
 oj.js';\nimport { getVectorContext } from '../render.js';\nimport { meridian, parallel } from '../geom/flat/geodesic.js';\n/**\n * @type {Stroke}\n * @private\n * @const\n */\nvar DEFAULT_STROKE_STYLE = new Stroke({\n    color: 'rgba(0,0,0,0.2)',\n});\n/**\n * @type {Array<number>}\n * @private\n */\nvar INTERVALS = [\n    90,\n    45,\n    30,\n    20,\n    10,\n    5,\n    2,\n    1,\n    0.5,\n    0.2,\n    0.1,\n    0.05,\n    0.01,\n    0.005,\n    0.002,\n    0.001,\n];\n/**\n * @typedef {Object} GraticuleLabelDataType\n * @property {Point} geom\n * @property {string} text\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {numb
 er} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [maxLines=100] The maximum number of meridians and\n * parallels from the center of the map. The default value of 100 means that at\n * most 200 meridians and 200 parallels will be displayed. The defau
 lt value is\n * appropriate for conformal projections like Spherical Mercator. If you\n * increase the value, more lines will be drawn and the drawing performance will\n * decrease.\n * @property {Stroke} [strokeStyle='rgba(0,0,0,0.2)'] The\n * stroke style to use for drawing the graticule. If not provided, a not fully\n * opaque black will be used.\n * @property {number} [targetSize=100] The target size of the graticule cells,\n * in pixels.\n * @property {boolean} [showLabels=false] Render a label with the respective\n * latitude/longitude for each graticule line.\n * @property {function(number):string} [lonLabelFormatter] Label formatter for\n * longitudes. This function is called with the longitude as argument, and\n * should return a formatted string representing the longitude. By default,\n * labels are formatted as degrees, minutes, seconds and hemisphere.\n * @property {function(number):string} [latLabelFormatter] Label formatter for\n * latitudes. This function is called wi
 th the latitude as argument, and\n * should return a formatted string representing the latitude. By default,\n * labels are formatted as degrees, minutes, seconds and hemisphere.\n * @property {number} [lonLabelPosition=0] Longitude label position in fractions\n * (0..1) of view extent. 0 means at the bottom of the viewport, 1 means at the\n * top.\n * @property {number} [latLabelPosition=1] Latitude label position in fractions\n * (0..1) of view extent. 0 means at the left of the viewport, 1 means at the\n * right.\n * @property {Text} [lonLabelStyle] Longitude label text\n * style. If not provided, the following style will be used:\n * ```js\n * new Text({\n *   font: '12px Calibri,sans-serif',\n *   textBaseline: 'bottom',\n *   fill: new Fill({\n *     color: 'rgba(0,0,0,1)'\n *   }),\n *   stroke: new Stroke({\n *     color: 'rgba(255,255,255,1)',\n *     width: 3\n *   })\n * });\n * ```\n * Note that the default's `textBaseline` configuration will not work well for\n * `lonLa
 belPosition` configurations that position labels close to the top of\n * the viewport.\n * @property {Text} [latLabelStyle] Latitude label text style.\n * If not provided, the following style will be used:\n * ```js\n * new Text({\n *   font: '12px Calibri,sans-serif',\n *   textAlign: 'end',\n *   fill: new Fill({\n *     color: 'rgba(0,0,0,1)'\n *   }),\n *   stroke: Stroke({\n *     color: 'rgba(255,255,255,1)',\n *     width: 3\n *   })\n * });\n * ```\n * Note that the default's `textAlign` configuration will not work well for\n * `latLabelPosition` configurations that position labels close to the left of\n * the viewport.\n * @property {Array<number>} [intervals=[90, 45, 30, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.01, 0.005, 0.002, 0.001]]\n * Intervals (in degrees) for the graticule. Example to limit graticules to 30 and 10 degrees intervals:\n * ```js\n * [30, 10]\n * ```\n * @property {boolean} [wrapX=true] Whether to repeat the graticule horizontally.\n */\n/**\n * @classd
 esc\n * Layer that renders a grid for a coordinate system (currently only EPSG:4326 is supported).\n * Note that the view projection must define both extent and worldExtent.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n * @api\n */\nvar Graticule = /** @class */ (function (_super) {\n    __extends(Graticule, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Graticule(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({\n            updateWhileAnimating: true,\n            updateWhileInteracting: true,\n            renderBuffer: 0,\n        }, options);\n        delete baseOptions.maxLines;\n        delete baseOptions.strokeStyle;\n        delete baseOptions.targetSize;\n        delete baseOptions.showLabels;\n        delete baseOptions.lonLabelFormatter;\n        delete baseOptions.latLabelFormatter;\n        delete baseOptions.lonLabelPosition;\n      
   delete baseOptions.latLabelPosition;\n        delete baseOptions.lonLabelStyle;\n        delete baseOptions.latLabelStyle;\n        delete baseOptions.intervals;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.projection_ = null;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxLat_ = Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxLon_ = Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minLat_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minLon_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxX_ = Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxY_ = Infinity;\n
         /**\n         * @type {number}\n         * @private\n         */\n        _this.minX_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minY_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.targetSize_ =\n            options.targetSize !== undefined ? options.targetSize : 100;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100;\n        /**\n         * @type {Array<LineString>}\n         * @private\n         */\n        _this.meridians_ = [];\n        /**\n         * @type {Array<LineString>}\n         * @private\n         */\n        _this.parallels_ = [];\n        /**\n         * @type {Stroke}\n         * @private\n         */\n        _this.strokeStyle_ =\n            options.strokeStyle !== undefined\n                ? options.strokeStyle\n                : DEFA
 ULT_STROKE_STYLE;\n        /**\n         * @type {import(\"../proj.js\").TransformFunction|undefined}\n         * @private\n         */\n        _this.fromLonLatTransform_ = undefined;\n        /**\n         * @type {import(\"../proj.js\").TransformFunction|undefined}\n         * @private\n         */\n        _this.toLonLatTransform_ = undefined;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.projectionCenterLonLat_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.bottomLeft_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.bottomRight_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.topLeft_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordina
 te}\n         * @private\n         */\n        _this.topRight_ = null;\n        /**\n         * @type {Array<GraticuleLabelDataType>}\n         * @private\n         */\n        _this.meridiansLabels_ = null;\n        /**\n         * @type {Array<GraticuleLabelDataType>}\n         * @private\n         */\n        _this.parallelsLabels_ = null;\n        if (options.showLabels) {\n            /**\n             * @type {null|function(number):string}\n             * @private\n             */\n            _this.lonLabelFormatter_ =\n                options.lonLabelFormatter == undefined\n                    ? degreesToStringHDMS.bind(_this, 'EW')\n                    : options.lonLabelFormatter;\n            /**\n             * @type {function(number):string}\n             * @private\n             */\n            _this.latLabelFormatter_ =\n                options.latLabelFormatter == undefined\n                    ? degreesToStringHDMS.bind(_this, 'NS')\n                    : options.lat
 LabelFormatter;\n            /**\n             * Longitude label position in fractions (0..1) of view extent. 0 means\n             * bottom, 1 means top.\n             * @type {number}\n             * @private\n             */\n            _this.lonLabelPosition_ =\n                options.lonLabelPosition == undefined ? 0 : options.lonLabelPosition;\n            /**\n             * Latitude Label position in fractions (0..1) of view extent. 0 means left, 1\n             * means right.\n             * @type {number}\n             * @private\n             */\n            _this.latLabelPosition_ =\n                options.latLabelPosition == undefined ? 1 : options.latLabelPosition;\n            /**\n             * @type {Style}\n             * @private\n             */\n            _this.lonLabelStyleBase_ = new Style({\n                text: options.lonLabelStyle !== undefined\n                    ? options.lonLabelStyle.clone()\n                    : new Text({\n                  
       font: '12px Calibri,sans-serif',\n                        textBaseline: 'bottom',\n                        fill: new Fill({\n                            color: 'rgba(0,0,0,1)',\n                        }),\n                        stroke: new Stroke({\n                            color: 'rgba(255,255,255,1)',\n                            width: 3,\n                        }),\n                    }),\n            });\n            /**\n             * @private\n             * @param {import(\"../Feature\").default} feature Feature\n             * @return {Style} style\n             */\n            _this.lonLabelStyle_ = function (feature) {\n                var label = feature.get('graticule_label');\n                this.lonLabelStyleBase_.getText().setText(label);\n                return this.lonLabelStyleBase_;\n            }.bind(_this);\n            /**\n             * @type {Style}\n             * @private\n             */\n            _this.latLabelStyleBase_ = new Style(
 {\n                text: options.latLabelStyle !== undefined\n                    ? options.latLabelStyle.clone()\n                    : new Text({\n                        font: '12px Calibri,sans-serif',\n                        textAlign: 'right',\n                        fill: new Fill({\n                            color: 'rgba(0,0,0,1)',\n                        }),\n                        stroke: new Stroke({\n                            color: 'rgba(255,255,255,1)',\n                            width: 3,\n                        }),\n                    }),\n            });\n            /**\n             * @private\n             * @param {import(\"../Feature\").default} feature Feature\n             * @return {Style} style\n             */\n            _this.latLabelStyle_ = function (feature) {\n                var label = feature.get('graticule_label');\n                this.latLabelStyleBase_.getText().setText(label);\n                return this.latLabelStyleBase_;\n   
          }.bind(_this);\n            _this.meridiansLabels_ = [];\n            _this.parallelsLabels_ = [];\n            _this.addEventListener(EventType.POSTRENDER, _this.drawLabels_.bind(_this));\n        }\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        _this.intervals_ =\n            options.intervals !== undefined ? options.intervals : INTERVALS;\n        // use a source with a custom loader for lines & text\n        _this.setSource(new VectorSource({\n            loader: _this.loaderFunction.bind(_this),\n            strategy: _this.strategyFunction.bind(_this),\n            features: new Collection(),\n            overlaps: false,\n            useSpatialIndex: false,\n            wrapX: options.wrapX,\n        }));\n        /**\n         * feature pool to use when updating graticule\n         * @type {Array<Feature>}\n         * @private\n         */\n        _this.featurePool_ = [];\n        /**\n         * @type {Style}\n         * 
 @private\n         */\n        _this.lineStyle_ = new Style({\n            stroke: _this.strokeStyle_,\n        });\n        /**\n         * @type {?import(\"../extent.js\").Extent}\n         * @private\n         */\n        _this.loadedExtent_ = null;\n        /**\n         * @type {?import(\"../extent.js\").Extent}\n         */\n        _this.renderedExtent_ = null;\n        _this.setRenderOrder(null);\n        return _this;\n    }\n    /**\n     * Strategy function for loading features based on the view's extent and\n     * resolution.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @return {Array<import(\"../extent.js\").Extent>} Extents.\n     */\n    Graticule.prototype.strategyFunction = function (extent, resolution) {\n        // extents may be passed in different worlds, to avoid endless loop we use only one\n        var realWorldExtent = extent.slice();\n        if (this.projection_ && this.getSource().
 getWrapX()) {\n            wrapExtentX(realWorldExtent, this.projection_);\n        }\n        if (this.loadedExtent_) {\n            if (approximatelyEquals(this.loadedExtent_, realWorldExtent, resolution)) {\n                // make sure result is exactly equal to previous extent\n                realWorldExtent = this.loadedExtent_.slice();\n            }\n            else {\n                // we should not keep track of loaded extents\n                this.getSource().removeLoadedExtent(this.loadedExtent_);\n            }\n        }\n        return [realWorldExtent];\n    };\n    /**\n     * Update geometries in the source based on current view\n     * @param {import(\"../extent\").Extent} extent Extent\n     * @param {number} resolution Resolution\n     * @param {import(\"../proj/Projection.js\").default} projection Projection\n     */\n    Graticule.prototype.loaderFunction = function (extent, resolution, projection) {\n        this.loadedExtent_ = extent;\n        var source
  = this.getSource();\n        // only consider the intersection between our own extent & the requested one\n        var layerExtent = this.getExtent() || [\n            -Infinity,\n            -Infinity,\n            Infinity,\n            Infinity,\n        ];\n        var renderExtent = getIntersection(layerExtent, extent);\n        if (this.renderedExtent_ && equals(this.renderedExtent_, renderExtent)) {\n            return;\n        }\n        this.renderedExtent_ = renderExtent;\n        // bail out if nothing to render\n        if (isEmpty(renderExtent)) {\n            return;\n        }\n        // update projection info\n        var center = getCenter(renderExtent);\n        var squaredTolerance = (resolution * resolution) / 4;\n        var updateProjectionInfo = !this.projection_ || !equivalentProjection(this.projection_, projection);\n        if (updateProjectionInfo) {\n            this.updateProjectionInfo_(projection);\n        }\n        this.createGraticule_(renderExt
 ent, center, resolution, squaredTolerance);\n        // first make sure we have enough features in the pool\n        var featureCount = this.meridians_.length + this.parallels_.length;\n        if (this.meridiansLabels_) {\n            featureCount += this.meridians_.length;\n        }\n        if (this.parallelsLabels_) {\n            featureCount += this.parallels_.length;\n        }\n        var feature;\n        while (featureCount > this.featurePool_.length) {\n            feature = new Feature();\n            this.featurePool_.push(feature);\n        }\n        var featuresColl = source.getFeaturesCollection();\n        featuresColl.clear();\n        var poolIndex = 0;\n        // add features for the lines & labels\n        var i, l;\n        for (i = 0, l = this.meridians_.length; i < l; ++i) {\n            feature = this.featurePool_[poolIndex++];\n            feature.setGeometry(this.meridians_[i]);\n            feature.setStyle(this.lineStyle_);\n            featuresColl.
 push(feature);\n        }\n        for (i = 0, l = this.parallels_.length; i < l; ++i) {\n            feature = this.featurePool_[poolIndex++];\n            feature.setGeometry(this.parallels_[i]);\n            feature.setStyle(this.lineStyle_);\n            featuresColl.push(feature);\n        }\n    };\n    /**\n     * @param {number} lon Longitude.\n     * @param {number} minLat Minimal latitude.\n     * @param {number} maxLat Maximal latitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {number} Index.\n     * @private\n     */\n    Graticule.prototype.addMeridian_ = function (lon, minLat, maxLat, squaredTolerance, extent, index) {\n        var lineString = this.getMeridian_(lon, minLat, maxLat, squaredTolerance, index);\n        if (intersects(lineString.getExtent(), extent)) {\n            if (this.meridiansLabels_) {\n                var text = 
 this.lonLabelFormatter_(lon);\n                if (index in this.meridiansLabels_) {\n                    this.meridiansLabels_[index].text = text;\n                }\n                else {\n                    this.meridiansLabels_[index] = {\n                        geom: new Point([]),\n                        text: text,\n                    };\n                }\n            }\n            this.meridians_[index++] = lineString;\n        }\n        return index;\n    };\n    /**\n     * @param {number} lat Latitude.\n     * @param {number} minLon Minimal longitude.\n     * @param {number} maxLon Maximal longitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {number} Index.\n     * @private\n     */\n    Graticule.prototype.addParallel_ = function (lat, minLon, maxLon, squaredTolerance, extent, index) {\n        var lineString = this.getParallel_(l
 at, minLon, maxLon, squaredTolerance, index);\n        if (intersects(lineString.getExtent(), extent)) {\n            if (this.parallelsLabels_) {\n                var text = this.latLabelFormatter_(lat);\n                if (index in this.parallelsLabels_) {\n                    this.parallelsLabels_[index].text = text;\n                }\n                else {\n                    this.parallelsLabels_[index] = {\n                        geom: new Point([]),\n                        text: text,\n                    };\n                }\n            }\n            this.parallels_[index++] = lineString;\n        }\n        return index;\n    };\n    /**\n     * @param {import(\"../render/Event.js\").default} event Render event.\n     * @private\n     */\n    Graticule.prototype.drawLabels_ = function (event) {\n        var rotation = event.frameState.viewState.rotation;\n        var extent = event.frameState.extent;\n        var rotationCenter = getCenter(extent);\n        var rot
 ationExtent = extent;\n        if (rotation) {\n            var width = getWidth(extent);\n            var height = getHeight(extent);\n            var cr = Math.abs(Math.cos(rotation));\n            var sr = Math.abs(Math.sin(rotation));\n            var unrotatedWidth = (sr * height - cr * width) / (sr * sr - cr * cr);\n            var unrotatedHeight = (sr * width - cr * height) / (sr * sr - cr * cr);\n            rotationExtent = [\n                rotationCenter[0] - unrotatedWidth / 2,\n                rotationCenter[1] - unrotatedHeight / 2,\n                rotationCenter[0] + unrotatedWidth / 2,\n                rotationCenter[1] + unrotatedHeight / 2,\n            ];\n        }\n        var startWorld = 0;\n        var endWorld = 0;\n        var labelsAtStart = this.latLabelPosition_ < 0.5;\n        var projectionExtent = this.projection_.getExtent();\n        var worldWidth = getWidth(projectionExtent);\n        if (this.getSource().getWrapX() &&\n            this.project
 ion_.canWrapX() &&\n            !containsExtent(projectionExtent, extent)) {\n            startWorld = Math.floor((extent[0] - projectionExtent[0]) / worldWidth);\n            endWorld = Math.ceil((extent[2] - projectionExtent[2]) / worldWidth);\n            var inverted = Math.abs(rotation) > Math.PI / 2;\n            labelsAtStart = labelsAtStart !== inverted;\n        }\n        var vectorContext = getVectorContext(event);\n        for (var world = startWorld; world <= endWorld; ++world) {\n            var poolIndex = this.meridians_.length + this.parallels_.length;\n            var feature = void 0, index = void 0, l = void 0, textPoint = void 0;\n            if (this.meridiansLabels_) {\n                for (index = 0, l = this.meridiansLabels_.length; index < l; ++index) {\n                    var lineString = this.meridians_[index];\n                    if (!rotation && world === 0) {\n                        textPoint = this.getMeridianPoint_(lineString, extent, index);\n   
                  }\n                    else {\n                        var clone = lineString.clone();\n                        clone.translate(world * worldWidth, 0);\n                        clone.rotate(-rotation, rotationCenter);\n                        textPoint = this.getMeridianPoint_(clone, rotationExtent, index);\n                        textPoint.rotate(rotation, rotationCenter);\n                    }\n                    feature = this.featurePool_[poolIndex++];\n                    feature.setGeometry(textPoint);\n                    feature.set('graticule_label', this.meridiansLabels_[index].text);\n                    vectorContext.drawFeature(feature, this.lonLabelStyle_(feature));\n                }\n            }\n            if (this.parallelsLabels_) {\n                if ((world === startWorld && labelsAtStart) ||\n                    (world === endWorld && !labelsAtStart)) {\n                    for (index = 0, l = this.parallels_.length; index < l; ++index) 
 {\n                        var lineString = this.parallels_[index];\n                        if (!rotation && world === 0) {\n                            textPoint = this.getParallelPoint_(lineString, extent, index);\n                        }\n                        else {\n                            var clone = lineString.clone();\n                            clone.translate(world * worldWidth, 0);\n                            clone.rotate(-rotation, rotationCenter);\n                            textPoint = this.getParallelPoint_(clone, rotationExtent, index);\n                            textPoint.rotate(rotation, rotationCenter);\n                        }\n                        feature = this.featurePool_[poolIndex++];\n                        feature.setGeometry(textPoint);\n                        feature.set('graticule_label', this.parallelsLabels_[index].text);\n                        vectorContext.drawFeature(feature, this.latLabelStyle_(feature));\n                  
   }\n                }\n            }\n        }\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../coordinate.js\").Coordinate} center Center.\n     * @param {number} resolution Resolution.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @private\n     */\n    Graticule.prototype.createGraticule_ = function (extent, center, resolution, squaredTolerance) {\n        var interval = this.getInterval_(resolution);\n        if (interval == -1) {\n            this.meridians_.length = 0;\n            this.parallels_.length = 0;\n            if (this.meridiansLabels_) {\n                this.meridiansLabels_.length = 0;\n            }\n            if (this.parallelsLabels_) {\n                this.parallelsLabels_.length = 0;\n            }\n            return;\n        }\n        var wrapX = false;\n        var projectionExtent = this.projection_.getExtent();\n        var worldWidth = getWidth(projectionExtent);\
 n        if (this.getSource().getWrapX() &&\n            this.projection_.canWrapX() &&\n            !containsExtent(projectionExtent, extent)) {\n            if (getWidth(extent) >= worldWidth) {\n                extent[0] = projectionExtent[0];\n                extent[2] = projectionExtent[2];\n            }\n            else {\n                wrapX = true;\n            }\n        }\n        // Constrain the center to fit into the extent available to the graticule\n        var validCenterP = [\n            clamp(center[0], this.minX_, this.maxX_),\n            clamp(center[1], this.minY_, this.maxY_),\n        ];\n        // Transform the center to lon lat\n        // Some projections may have a void area at the poles\n        // so replace any NaN latitudes with the min or max value closest to a pole\n        var centerLonLat = this.toLonLatTransform_(validCenterP);\n        if (isNaN(centerLonLat[1])) {\n            centerLonLat[1] =\n                Math.abs(this.maxLat_) >= M
 ath.abs(this.minLat_)\n                    ? this.maxLat_\n                    : this.minLat_;\n        }\n        var centerLon = clamp(centerLonLat[0], this.minLon_, this.maxLon_);\n        var centerLat = clamp(centerLonLat[1], this.minLat_, this.maxLat_);\n        var maxLines = this.maxLines_;\n        var cnt, idx, lat, lon;\n        // Limit the extent to fit into the extent available to the graticule\n        var validExtentP = extent;\n        if (!wrapX) {\n            validExtentP = [\n                clamp(extent[0], this.minX_, this.maxX_),\n                clamp(extent[1], this.minY_, this.maxY_),\n                clamp(extent[2], this.minX_, this.maxX_),\n                clamp(extent[3], this.minY_, this.maxY_),\n            ];\n        }\n        // Transform the extent to get the lon lat ranges for the edges of the extent\n        var validExtent = applyTransform(validExtentP, this.toLonLatTransform_, undefined, 8);\n        var maxLat = validExtent[3];\n        var
  maxLon = validExtent[2];\n        var minLat = validExtent[1];\n        var minLon = validExtent[0];\n        if (!wrapX) {\n            // Check if extremities of the world extent lie inside the extent\n            // (for example the pole in a polar projection)\n            // and extend the extent as appropriate\n            if (containsCoordinate(validExtentP, this.bottomLeft_)) {\n                minLon = this.minLon_;\n                minLat = this.minLat_;\n            }\n            if (containsCoordinate(validExtentP, this.bottomRight_)) {\n                maxLon = this.maxLon_;\n                minLat = this.minLat_;\n            }\n            if (containsCoordinate(validExtentP, this.topLeft_)) {\n                minLon = this.minLon_;\n                maxLat = this.maxLat_;\n            }\n            if (containsCoordinate(validExtentP, this.topRight_)) {\n                maxLon = this.maxLon_;\n                maxLat = this.maxLat_;\n            }\n            // The
  transformed center may also extend the lon lat ranges used for rendering\n            maxLat = clamp(maxLat, centerLat, this.maxLat_);\n            maxLon = clamp(maxLon, centerLon, this.maxLon_);\n            minLat = clamp(minLat, this.minLat_, centerLat);\n            minLon = clamp(minLon, this.minLon_, centerLon);\n        }\n        // Create meridians\n        centerLon = Math.floor(centerLon / interval) * interval;\n        lon = clamp(centerLon, this.minLon_, this.maxLon_);\n        idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, 0);\n        cnt = 0;\n        if (wrapX) {\n            while ((lon -= interval) >= minLon && cnt++ < maxLines) {\n                idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n            }\n        }\n        else {\n            while (lon != this.minLon_ && cnt++ < maxLines) {\n                lon = Math.max(lon - interval, this.minLon_);\n                idx = this.addMeridian_(lon, minLa
 t, maxLat, squaredTolerance, extent, idx);\n            }\n        }\n        lon = clamp(centerLon, this.minLon_, this.maxLon_);\n        cnt = 0;\n        if (wrapX) {\n            while ((lon += interval) <= maxLon && cnt++ < maxLines) {\n                idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n            }\n        }\n        else {\n            while (lon != this.maxLon_ && cnt++ < maxLines) {\n                lon = Math.min(lon + interval, this.maxLon_);\n                idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n            }\n        }\n        this.meridians_.length = idx;\n        if (this.meridiansLabels_) {\n            this.meridiansLabels_.length = idx;\n        }\n        // Create parallels\n        centerLat = Math.floor(centerLat / interval) * interval;\n        lat = clamp(centerLat, this.minLat_, this.maxLat_);\n        idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, 0
 );\n        cnt = 0;\n        while (lat != this.minLat_ && cnt++ < maxLines) {\n            lat = Math.max(lat - interval, this.minLat_);\n            idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);\n        }\n        lat = clamp(centerLat, this.minLat_, this.maxLat_);\n        cnt = 0;\n        while (lat != this.maxLat_ && cnt++ < maxLines) {\n            lat = Math.min(lat + interval, this.maxLat_);\n            idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);\n        }\n        this.parallels_.length = idx;\n        if (this.parallelsLabels_) {\n            this.parallelsLabels_.length = idx;\n        }\n    };\n    /**\n     * @param {number} resolution Resolution.\n     * @return {number} The interval in degrees.\n     * @private\n     */\n    Graticule.prototype.getInterval_ = function (resolution) {\n        var centerLon = this.projectionCenterLonLat_[0];\n        var centerLat = this.projectionCenterLonLat_[1];\n 
        var interval = -1;\n        var target = Math.pow(this.targetSize_ * resolution, 2);\n        /** @type {Array<number>} **/\n        var p1 = [];\n        /** @type {Array<number>} **/\n        var p2 = [];\n        for (var i = 0, ii = this.intervals_.length; i < ii; ++i) {\n            var delta = clamp(this.intervals_[i] / 2, 0, 90);\n            // Don't attempt to transform latitudes beyond the poles!\n            var clampedLat = clamp(centerLat, -90 + delta, 90 - delta);\n            p1[0] = centerLon - delta;\n            p1[1] = clampedLat - delta;\n            p2[0] = centerLon + delta;\n            p2[1] = clampedLat + delta;\n            this.fromLonLatTransform_(p1, p1);\n            this.fromLonLatTransform_(p2, p2);\n            var dist = Math.pow(p2[0] - p1[0], 2) + Math.pow(p2[1] - p1[1], 2);\n            if (dist <= target) {\n                break;\n            }\n            interval = this.intervals_[i];\n        }\n        return interval;\n    };\n    
 /**\n     * @param {number} lon Longitude.\n     * @param {number} minLat Minimal latitude.\n     * @param {number} maxLat Maximal latitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LineString} The meridian line string.\n     * @param {number} index Index.\n     * @private\n     */\n    Graticule.prototype.getMeridian_ = function (lon, minLat, maxLat, squaredTolerance, index) {\n        var flatCoordinates = meridian(lon, minLat, maxLat, this.projection_, squaredTolerance);\n        var lineString = this.meridians_[index];\n        if (!lineString) {\n            lineString = new LineString(flatCoordinates, GeometryLayout.XY);\n            this.meridians_[index] = lineString;\n        }\n        else {\n            lineString.setFlatCoordinates(GeometryLayout.XY, flatCoordinates);\n            lineString.changed();\n        }\n        return lineString;\n    };\n    /**\n     * @param {LineString} lineString Meridian\n     * @param {import(\"../ex
 tent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {Point} Meridian point.\n     * @private\n     */\n    Graticule.prototype.getMeridianPoint_ = function (lineString, extent, index) {\n        var flatCoordinates = lineString.getFlatCoordinates();\n        var bottom = 1;\n        var top = flatCoordinates.length - 1;\n        if (flatCoordinates[bottom] > flatCoordinates[top]) {\n            bottom = top;\n            top = 1;\n        }\n        var clampedBottom = Math.max(extent[1], flatCoordinates[bottom]);\n        var clampedTop = Math.min(extent[3], flatCoordinates[top]);\n        var lat = clamp(extent[1] + Math.abs(extent[1] - extent[3]) * this.lonLabelPosition_, clampedBottom, clampedTop);\n        var coordinate0 = flatCoordinates[bottom - 1] +\n            ((flatCoordinates[top - 1] - flatCoordinates[bottom - 1]) *\n                (lat - flatCoordinates[bottom])) /\n                (flatCoordinates[top] - flatCoordinates[bottom]);\n
         var coordinate = [coordinate0, lat];\n        var point = this.meridiansLabels_[index].geom;\n        point.setCoordinates(coordinate);\n        return point;\n    };\n    /**\n     * Get the list of meridians.  Meridians are lines of equal longitude.\n     * @return {Array<LineString>} The meridians.\n     * @api\n     */\n    Graticule.prototype.getMeridians = function () {\n        return this.meridians_;\n    };\n    /**\n     * @param {number} lat Latitude.\n     * @param {number} minLon Minimal longitude.\n     * @param {number} maxLon Maximal longitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LineString} The parallel line string.\n     * @param {number} index Index.\n     * @private\n     */\n    Graticule.prototype.getParallel_ = function (lat, minLon, maxLon, squaredTolerance, index) {\n        var flatCoordinates = parallel(lat, minLon, maxLon, this.projection_, squaredTolerance);\n        var lineString = this.parallels_[index]
 ;\n        if (!lineString) {\n            lineString = new LineString(flatCoordinates, GeometryLayout.XY);\n        }\n        else {\n            lineString.setFlatCoordinates(GeometryLayout.XY, flatCoordinates);\n            lineString.changed();\n        }\n        return lineString;\n    };\n    /**\n     * @param {LineString} lineString Parallels.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {Point} Parallel point.\n     * @private\n     */\n    Graticule.prototype.getParallelPoint_ = function (lineString, extent, index) {\n        var flatCoordinates = lineString.getFlatCoordinates();\n        var left = 0;\n        var right = flatCoordinates.length - 2;\n        if (flatCoordinates[left] > flatCoordinates[right]) {\n            left = right;\n            right = 0;\n        }\n        var clampedLeft = Math.max(extent[0], flatCoordinates[left]);\n        var clampedRight = Math.min(extent[2], flatCoordi
 nates[right]);\n        var lon = clamp(extent[0] + Math.abs(extent[0] - extent[2]) * this.latLabelPosition_, clampedLeft, clampedRight);\n        var coordinate1 = flatCoordinates[left + 1] +\n            ((flatCoordinates[right + 1] - flatCoordinates[left + 1]) *\n                (lon - flatCoordinates[left])) /\n                (flatCoordinates[right] - flatCoordinates[left]);\n        var coordinate = [lon, coordinate1];\n        var point = this.parallelsLabels_[index].geom;\n        point.setCoordinates(coordinate);\n        return point;\n    };\n    /**\n     * Get the list of parallels.  Parallels are lines of equal latitude.\n     * @return {Array<LineString>} The parallels.\n     * @api\n     */\n    Graticule.prototype.getParallels = function () {\n        return this.parallels_;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @private\n     */\n    Graticule.prototype.updateProjectionInfo_ = function (projection
 ) {\n        var epsg4326Projection = getProjection('EPSG:4326');\n        var worldExtent = projection.getWorldExtent();\n        this.maxLat_ = worldExtent[3];\n        this.maxLon_ = worldExtent[2];\n        this.minLat_ = worldExtent[1];\n        this.minLon_ = worldExtent[0];\n        // If the world extent crosses the dateline define a custom transform to\n        // return longitudes which wrap the dateline\n        var toLonLatTransform = getTransform(projection, epsg4326Projection);\n        if (this.minLon_ < this.maxLon_) {\n            this.toLonLatTransform_ = toLonLatTransform;\n        }\n        else {\n            var split_1 = this.minLon_ + this.maxLon_ / 2;\n            this.maxLon_ += 360;\n            this.toLonLatTransform_ = function (coordinates, opt_output, opt_dimension) {\n                var dimension = opt_dimension || 2;\n                var lonLatCoordinates = toLonLatTransform(coordinates, opt_output, dimension);\n                for (var i = 0, l = 
 lonLatCoordinates.length; i < l; i += dimension) {\n                    if (lonLatCoordinates[i] < split_1) {\n                        lonLatCoordinates[i] += 360;\n                    }\n                }\n                return lonLatCoordinates;\n            };\n        }\n        // Transform the extent to get the limits of the view projection extent\n        // which should be available to the graticule\n        this.fromLonLatTransform_ = getTransform(epsg4326Projection, projection);\n        var worldExtentP = applyTransform([this.minLon_, this.minLat_, this.maxLon_, this.maxLat_], this.fromLonLatTransform_, undefined, 8);\n        this.minX_ = worldExtentP[0];\n        this.maxX_ = worldExtentP[2];\n        this.minY_ = worldExtentP[1];\n        this.maxY_ = worldExtentP[3];\n        // Determine the view projection coordinates of the extremities of the world extent\n        // as these may lie inside a view extent (for example the pole in a polar projection)\n        this.b
 ottomLeft_ = this.fromLonLatTransform_([this.minLon_, this.minLat_]);\n        this.bottomRight_ = this.fromLonLatTransform_([this.maxLon_, this.minLat_]);\n        this.topLeft_ = this.fromLonLatTransform_([this.minLon_, this.maxLat_]);\n        this.topRight_ = this.fromLonLatTransform_([this.maxLon_, this.maxLat_]);\n        // Transform the projection center to lon lat\n        // Some projections may have a void area at the poles\n        // so replace any NaN latitudes with the min or max value closest to a pole\n        this.projectionCenterLonLat_ = this.toLonLatTransform_(getCenter(projection.getExtent()));\n        if (isNaN(this.projectionCenterLonLat_[1])) {\n            this.projectionCenterLonLat_[1] =\n                Math.abs(this.maxLat_) >= Math.abs(this.minLat_)\n                    ? this.maxLat_\n                    : this.minLat_;\n        }\n        this.projection_ = projection;\n    };\n    return Graticule;\n}(VectorLayer));\nexport default Graticule;\n//# 
 sourceMappingURL=Graticule.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Heatmap\n */\nimport VectorLayer from './Vector.js';\nimport WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';\nimport { assign } from '../obj.js';\nimport { clamp } from '../math.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { getChangeEventType } from '../Object.js';\n/**\n * @typedef {Object} Optio
 ns\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above wh
 ich this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<string>} [gradient=['#00f', '#0ff', '#0f0', '#ff0', '#f00']] The color gradient\n * of the heatmap, specified as an array of CSS color strings.\n * @property {number} [radius=8] Radius size in pixels.\n * @property {number} [blur=15] Blur size in pixels.\n * @property {string|function(import(\"../Feature.js\").default):number} [weight='weight'] The feature\n * attribute to use for the weight or a function that returns a weight from a feature. Weight values\n * should range from 0 to 1 (and values outside will be clamped to that range).\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n */\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    BLUR: 'blur',\n    GRADIENT: 'gradient',\n    RADIUS: 'radius',\n};\n/**\n * @const\n * @type {Array<string>}\n */\nvar DEFAULT_GRADIENT = ['
 #00f', '#0ff', '#0f0', '#ff0', '#f00'];\n/**\n * @classdesc\n * Layer for rendering vector data as a heatmap.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n * @api\n */\nvar Heatmap = /** @class */ (function (_super) {\n    __extends(Heatmap, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Heatmap(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({}, options);\n        delete baseOptions.gradient;\n        delete baseOptions.radius;\n        delete baseOptions.blur;\n        delete baseOptions.weight;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @typ
 e {HTMLCanvasElement}\n         */\n        _this.gradient_ = null;\n        _this.addEventListener(getChangeEventType(Property.GRADIENT), _this.handleGradientChanged_);\n        _this.setGradient(options.gradient ? options.gradient : DEFAULT_GRADIENT);\n        _this.setBlur(options.blur !== undefined ? options.blur : 15);\n        _this.setRadius(options.radius !== undefined ? options.radius : 8);\n        var weight = options.weight ? options.weight : 'weight';\n        if (typeof weight === 'string') {\n            _this.weightFunction_ = function (feature) {\n                return feature.get(weight);\n            };\n        }\n        else {\n            _this.weightFunction_ = weight;\n        }\n        // For performance reasons, don't sort the features before rendering.\n        // The render order is not relevant for a heatmap representation.\n        _this.setRenderOrder(null);\n        return _this;\n    }\n    /**\n     * Return the blur size in pixels.\n     * @retu
 rn {number} Blur size in pixels.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.getBlur = function () {\n        return /** @type {number} */ (this.get(Property.BLUR));\n    };\n    /**\n     * Return the gradient colors as array of strings.\n     * @return {Array<string>} Colors.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.getGradient = function () {\n        return /** @type {Array<string>} */ (this.get(Property.GRADIENT));\n    };\n    /**\n     * Return the size of the radius in pixels.\n     * @return {number} Radius size in pixel.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.getRadius = function () {\n        return /** @type {number} */ (this.get(Property.RADIUS));\n    };\n    /**\n     * @private\n     */\n    Heatmap.prototype.handleGradientChanged_ = function () {\n        this.gradient_ = createGradient(this.getGradient());\n    };\n    /**\n     * Set the blur size in pixels.\n     * @param {number} blur Blur si
 ze in pixels.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.setBlur = function (blur) {\n        this.set(Property.BLUR, blur);\n    };\n    /**\n     * Set the gradient colors as array of strings.\n     * @param {Array<string>} colors Gradient.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.setGradient = function (colors) {\n        this.set(Property.GRADIENT, colors);\n    };\n    /**\n     * Set the size of the radius in pixels.\n     * @param {number} radius Radius size in pixel.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.setRadius = function (radius) {\n        this.set(Property.RADIUS, radius);\n    };\n    /**\n     * Create a renderer for this layer.\n     * @return {WebGLPointsLayerRenderer} A layer renderer.\n     */\n    Heatmap.prototype.createRenderer = function () {\n        return new WebGLPointsLayerRenderer(this, {\n            attributes: [\n                {\n                    name: 'weight',\n          
           callback: function (feature) {\n                        var weight = this.weightFunction_(feature);\n                        return weight !== undefined ? clamp(weight, 0, 1) : 1;\n                    }.bind(this),\n                },\n            ],\n            vertexShader: \"\\n        precision mediump float;\\n        uniform mat4 u_projectionMatrix;\\n        uniform mat4 u_offsetScaleMatrix;\\n        uniform float u_size;\\n        attribute vec2 a_position;\\n        attribute float a_index;\\n        attribute float a_weight;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n\\n        void main(void) {\\n          mat4 offsetMatrix = u_offsetScaleMatrix;\\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\\n          gl_Position = 
 u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\\n          v_texCoord = vec2(u, v);\\n          v_weight = a_weight;\\n        }\",\n            fragmentShader: \"\\n        precision mediump float;\\n        uniform float u_blurSlope;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n\\n        void main(void) {\\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\\n          gl_FragColor = vec4(alpha, alpha, alpha, alpha);\\n        }\",\n            hitVertexShader: \"\\n        precision mediump float;\\n        uniform mat4 u_projectionMatrix;\\n        uniform mat4 u_offsetScaleMatrix;\\n    
     uniform float u_size;\\n        attribute vec2 a_position;\\n        attribute float a_index;\\n        attribute float a_weight;\\n        attribute vec4 a_hitColor;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n        varying vec4 v_hitColor;\\n\\n        void main(void) {\\n          mat4 offsetMatrix = u_offsetScaleMatrix;\\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\\n          v_texCoord = vec2(u, v);\\n          v_hitColor = a_hitColor;\\n          v_weight = a_weight;\\n        }\",\n            hitFragmentShader
 : \"\\n        precision mediump float;\\n        uniform float u_blurSlope;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n        varying vec4 v_hitColor;\\n\\n        void main(void) {\\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\\n          if (alpha < 0.05) {\\n            discard;\\n          }\\n\\n          gl_FragColor = v_hitColor;\\n        }\",\n            uniforms: {\n                u_size: function () {\n                    return (this.get(Property.RADIUS) + this.get(Property.BLUR)) * 2;\n                }.bind(this),\n                u_blurSlope: function () {\n                    return (this.get(Property.RADIUS) / Math.max(1, this.get(Property.BLUR)));\n                }.bind(this),\n            },\n            p
 ostProcesses: [\n                {\n                    fragmentShader: \"\\n            precision mediump float;\\n\\n            uniform sampler2D u_image;\\n            uniform sampler2D u_gradientTexture;\\n\\n            varying vec2 v_texCoord;\\n\\n            void main() {\\n              vec4 color = texture2D(u_image, v_texCoord);\\n              gl_FragColor.a = color.a;\\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\\n              gl_FragColor.rgb *= gl_FragColor.a;\\n            }\",\n                    uniforms: {\n                        u_gradientTexture: function () {\n                            return this.gradient_;\n                        }.bind(this),\n                    },\n                },\n            ],\n        });\n    };\n    return Heatmap;\n}(VectorLayer));\n/**\n * @param {Array<string>} colors A list of colored.\n * @return {HTMLCanvasElement} canvas with gradient texture.\n */\nfunction createGradient(
 colors) {\n    var width = 1;\n    var height = 256;\n    var context = createCanvasContext2D(width, height);\n    var gradient = context.createLinearGradient(0, 0, width, height);\n    var step = 1 / (colors.length - 1);\n    for (var i = 0, ii = colors.length; i < ii; ++i) {\n        gradient.addColorStop(i * step, colors[i]);\n    }\n    context.fillStyle = gradient;\n    context.fillRect(0, 0, width, height);\n    return context.canvas;\n}\nexport default Heatmap;\n//# sourceMappingURL=Heatmap.js.map","/**\n * @module ol/format/Feature\n */\nimport Units from '../proj/Units.js';\nimport { abstract } from '../util.js';\nimport { assign } from '../obj.js';\nimport { equivalent as equivalentProjection, get as getProjection, transformExtent, } from '../proj.js';\n/**\n * @typedef {Object} ReadOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are reading.\n * If not provided, the projection will be derived from the data (where po
 ssible) or\n * the `dataProjection` of the format is assigned (where set). If the projection\n * can not be derived from the data and if no `dataProjection` is set for a format,\n * the features will not be reprojected.\n * @property {import(\"../extent.js\").Extent} [extent] Tile extent in map units of the tile being read.\n * This is only required when reading data with tile pixels as geometry units. When configured,\n * a `dataProjection` with `TILE_PIXELS` as `units` and the tile's pixel extent as `extent` needs to be\n * provided.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * created by the format reader. If not provided, features will be returned in the\n * `dataProjection`.\n */\n/**\n * @typedef {Object} WriteOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are writing.\n * If not provided, the `dataProjection` of the format is assigned (where set).\n 
 * If no `dataProjection` is set for a format, the features will be returned\n * in the `featureProjection`.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * that will be serialized by the format writer. If not provided, geometries are assumed\n * to be in the `dataProjection` if that is set; in other words, they are not transformed.\n * @property {boolean} [rightHanded] When writing geometries, follow the right-hand\n * rule for linear ring orientation.  This means that polygons will have counter-clockwise\n * exterior rings and clockwise interior rings.  By default, coordinates are serialized\n * as they are provided at construction.  If `true`, the right-hand rule will\n * be applied.  If `false`, the left-hand rule will be applied (clockwise for\n * exterior and counter-clockwise for interior rings).  Note that not all\n * formats support this.  The GeoJSON format does use this property when writing\n * geometries.
 \n * @property {number} [decimals] Maximum number of decimal places for coordinates.\n * Coordinates are stored internally as floats, but floating-point arithmetic can create\n * coordinates with a large number of decimal places, not generally wanted on output.\n * Set a number here to round coordinates. Can also be used to ensure that\n * coordinates read in can be written back out with the same number of decimals.\n * Default is no rounding.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for feature formats.\n * {@link module:ol/format/Feature~FeatureFormat} subclasses provide the ability to decode and encode\n * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial\n * file formats.  See the documentation for each format for more details.\n *\n * @abstract\n * @api\n */\nvar FeatureFormat = /** @class */ (function () {\n    function FeatureFormat() {\n    
     /**\n         * @protected\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        this.dataProjection = null;\n        /**\n         * @protected\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        this.defaultFeatureProjection = null;\n    }\n    /**\n     * Adds the data projection to the read options.\n     * @param {Document|Element|Object|string} source Source.\n     * @param {ReadOptions=} opt_options Options.\n     * @return {ReadOptions|undefined} Options.\n     * @protected\n     */\n    FeatureFormat.prototype.getReadOptions = function (source, opt_options) {\n        var options;\n        if (opt_options) {\n            var dataProjection = opt_options.dataProjection\n                ? getProjection(opt_options.dataProjection)\n                : this.readProjection(source);\n            if (opt_options.extent &&\n                dataProjection &&\n                dataProjection.getUnits() === Units.TILE_PIXE
 LS) {\n                dataProjection = getProjection(dataProjection);\n                dataProjection.setWorldExtent(opt_options.extent);\n            }\n            options = {\n                dataProjection: dataProjection,\n                featureProjection: opt_options.featureProjection,\n            };\n        }\n        return this.adaptOptions(options);\n    };\n    /**\n     * Sets the `dataProjection` on the options, if no `dataProjection`\n     * is set.\n     * @param {WriteOptions|ReadOptions|undefined} options\n     *     Options.\n     * @protected\n     * @return {WriteOptions|ReadOptions|undefined}\n     *     Updated options.\n     */\n    FeatureFormat.prototype.adaptOptions = function (options) {\n        return assign({\n            dataProjection: this.dataProjection,\n            featureProjection: this.defaultFeatureProjection,\n        }, options);\n    };\n    /**\n     * @abstract\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n  
   FeatureFormat.prototype.getType = function () {\n        return abstract();\n    };\n    /**\n     * Read a single feature from a source.\n     *\n     * @abstract\n     * @param {Document|Element|Object|string} source Source.\n     * @param {ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").FeatureLike} Feature.\n     */\n    FeatureFormat.prototype.readFeature = function (source, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read all features from a source.\n     *\n     * @abstract\n     * @param {Document|Element|ArrayBuffer|Object|string} source Source.\n     * @param {ReadOptions=} opt_options Read options.\n     * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n     */\n    FeatureFormat.prototype.readFeatures = function (source, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read a single geometry from a source.\n     *\n     * @abstract\n     * @param {Document|Element|Object|str
 ing} source Source.\n     * @param {ReadOptions=} opt_options Read options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    FeatureFormat.prototype.readGeometry = function (source, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the projection from a source.\n     *\n     * @abstract\n     * @param {Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    FeatureFormat.prototype.readProjection = function (source) {\n        return abstract();\n    };\n    /**\n     * Encode a feature in this format.\n     *\n     * @abstract\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {WriteOptions=} opt_options Write options.\n     * @return {string} Result.\n     */\n    FeatureFormat.prototype.writeFeature = function (feature, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode an array of features in t
 his format.\n     *\n     * @abstract\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {WriteOptions=} opt_options Write options.\n     * @return {string} Result.\n     */\n    FeatureFormat.prototype.writeFeatures = function (features, opt_options) {\n        return abstract();\n    };\n    /**\n     * Write a single geometry in this format.\n     *\n     * @abstract\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {WriteOptions=} opt_options Write options.\n     * @return {string} Result.\n     */\n    FeatureFormat.prototype.writeGeometry = function (geometry, opt_options) {\n        return abstract();\n    };\n    return FeatureFormat;\n}());\nexport default FeatureFormat;\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {boolean} write Set to true for writing, false for reading.\n * @param {(WriteOptions|ReadOptions)=} opt_options Options.\n * @return {imp
 ort(\"../geom/Geometry.js\").default} Transformed geometry.\n */\nexport function transformGeometryWithOptions(geometry, write, opt_options) {\n    var featureProjection = opt_options\n        ? getProjection(opt_options.featureProjection)\n        : null;\n    var dataProjection = opt_options\n        ? getProjection(opt_options.dataProjection)\n        : null;\n    var transformed;\n    if (featureProjection &&\n        dataProjection &&\n        !equivalentProjection(featureProjection, dataProjection)) {\n        transformed = (write ? geometry.clone() : geometry).transform(write ? featureProjection : dataProjection, write ? dataProjection : featureProjection);\n    }\n    else {\n        transformed = geometry;\n    }\n    if (write &&\n        opt_options &&\n        /** @type {WriteOptions} */ (opt_options).decimals !== undefined) {\n        var power_1 = Math.pow(10, \n        /** @type {WriteOptions} */ (opt_options).decimals);\n        // if decimals option on write, round 
 each coordinate appropriately\n        /**\n         * @param {Array<number>} coordinates Coordinates.\n         * @return {Array<number>} Transformed coordinates.\n         */\n        var transform = function (coordinates) {\n            for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n                coordinates[i] = Math.round(coordinates[i] * power_1) / power_1;\n            }\n            return coordinates;\n        };\n        if (transformed === geometry) {\n            transformed = geometry.clone();\n        }\n        transformed.applyTransform(transform);\n    }\n    return transformed;\n}\n/**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {ReadOptions=} opt_options Read options.\n * @return {import(\"../extent.js\").Extent} Transformed extent.\n */\nexport function transformExtentWithOptions(extent, opt_options) {\n    var featureProjection = opt_options\n        ? getProjection(opt_options.featureProjection)\n        : null;\n    var d
 ataProjection = opt_options\n        ? getProjection(opt_options.dataProjection)\n        : null;\n    if (featureProjection &&\n        dataProjection &&\n        !equivalentProjection(featureProjection, dataProjection)) {\n        return transformExtent(extent, dataProjection, featureProjection);\n    }\n    else {\n        return extent;\n    }\n}\n//# sourceMappingURL=Feature.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n 
 * @module ol/geom/MultiLineString\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LineString from './LineString.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { arrayMaxSquaredDelta, assignClosestArrayPoint } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateCoordinatesArray } from './flat/deflate.js';\nimport { douglasPeuckerArray } from './flat/simplify.js';\nimport { extend } from '../array.js';\nimport { inflateCoordinatesArray } from './flat/inflate.js';\nimport { interpolatePoint, lineStringsCoordinateAtM, } from './flat/interpolate.js';\nimport { intersectsLineStringArray } from './flat/intersectsextent.js';\n/**\n * @classdesc\n * Multi-linestring geometry.\n *\n * @api\n */\nvar MultiLineString = /** @class */ (function (_super) {\n    __extends(MultiLineString, _super);\n    /**\n     * @param {Array<Array<import(\"../coordinate.js\").Coordinat
 e>|LineString>|Array<number>} coordinates\n     *     Coordinates or LineString geometries. (For internal use, flat coordinates in\n     *     combination with `opt_layout` and `opt_ends` are also accepted.)\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @param {Array<number>=} opt_ends Flat coordinate ends for internal use.\n     */\n    function MultiLineString(coordinates, opt_layout, opt_ends) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        _this.ends_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        if (Array.isArray(coordinates[0])) {\n            _this.setCoordinates(\n            /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates), opt_
 layout);\n        }\n        else if (opt_layout !== undefined && opt_ends) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n            _this.ends_ = opt_ends;\n        }\n        else {\n            var layout = _this.getLayout();\n            var lineStrings = /** @type {Array<LineString>} */ (coordinates);\n            var flatCoordinates = [];\n            var ends = [];\n            for (var i = 0, ii = lineStrings.length; i < ii; ++i) {\n                var lineString = lineStrings[i];\n                if (i === 0) {\n                    layout = lineString.getLayout();\n                }\n                extend(flatCoordinates, lineString.getFlatCoordinates());\n                ends.push(flatCoordinates.length);\n            }\n            _this.setFlatCoordinates(layout, flatCoordinates);\n            _this.ends_ = ends;\n        }\n        return _this;\n    }\n    /**\n     * Append the passed linestring to th
 e multilinestring.\n     * @param {LineString} lineString LineString.\n     * @api\n     */\n    MultiLineString.prototype.appendLineString = function (lineString) {\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = lineString.getFlatCoordinates().slice();\n        }\n        else {\n            extend(this.flatCoordinates, lineString.getFlatCoordinates().slice());\n        }\n        this.ends_.push(this.flatCoordinates.length);\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!MultiLineString} Clone.\n     * @api\n     */\n    MultiLineString.prototype.clone = function () {\n        return new MultiLineString(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n    
  * @return {number} Minimum squared distance.\n     */\n    MultiLineString.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates, 0, this.ends_, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestArrayPoint(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * Returns the coordinate at `m` using linear interpolation, or `null` if no\n     * such coordinate exists.\n     *\n     * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n     * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n  
    * M will return the first coordinate and Ms greater than the last M will\n     * return the last coordinate.\n     *\n     * `opt_interpolate` controls interpolation between consecutive LineStrings\n     * within the MultiLineString. If `opt_interpolate` is `true` the coordinates\n     * will be linearly interpolated between the last coordinate of one LineString\n     * and the first coordinate of the next LineString.  If `opt_interpolate` is\n     * `false` then the function will return `null` for Ms falling between\n     * LineStrings.\n     *\n     * @param {number} m M.\n     * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.\n     * @param {boolean=} opt_interpolate Interpolate. Default is `false`.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n     * @api\n     */\n    MultiLineString.prototype.getCoordinateAtM = function (m, opt_extrapolate, opt_interpolate) {\n        if ((this.layout != GeometryLayout.XYM &&\n            this.lay
 out != GeometryLayout.XYZM) ||\n            this.flatCoordinates.length === 0) {\n            return null;\n        }\n        var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n        var interpolate = opt_interpolate !== undefined ? opt_interpolate : false;\n        return lineStringsCoordinateAtM(this.flatCoordinates, 0, this.ends_, this.stride, m, extrapolate, interpolate);\n    };\n    /**\n     * Return the coordinates of the multilinestring.\n     * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n     * @api\n     */\n    MultiLineString.prototype.getCoordinates = function () {\n        return inflateCoordinatesArray(this.flatCoordinates, 0, this.ends_, this.stride);\n    };\n    /**\n     * @return {Array<number>} Ends.\n     */\n    MultiLineString.prototype.getEnds = function () {\n        return this.ends_;\n    };\n    /**\n     * Return the linestring at the specified index.\n     * @param {number} index Index.\n  
    * @return {LineString} LineString.\n     * @api\n     */\n    MultiLineString.prototype.getLineString = function (index) {\n        if (index < 0 || this.ends_.length <= index) {\n            return null;\n        }\n        return new LineString(this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n    };\n    /**\n     * Return the linestrings of this multilinestring.\n     * @return {Array<LineString>} LineStrings.\n     * @api\n     */\n    MultiLineString.prototype.getLineStrings = function () {\n        var flatCoordinates = this.flatCoordinates;\n        var ends = this.ends_;\n        var layout = this.layout;\n        /** @type {Array<LineString>} */\n        var lineStrings = [];\n        var offset = 0;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var lineString = new LineString(flatCoordinates.slice(offset, end), layout);\n            lineStrings.push(lineString)
 ;\n            offset = end;\n        }\n        return lineStrings;\n    };\n    /**\n     * @return {Array<number>} Flat midpoints.\n     */\n    MultiLineString.prototype.getFlatMidpoints = function () {\n        var midpoints = [];\n        var flatCoordinates = this.flatCoordinates;\n        var offset = 0;\n        var ends = this.ends_;\n        var stride = this.stride;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var midpoint = interpolatePoint(flatCoordinates, offset, end, stride, 0.5);\n            extend(midpoints, midpoint);\n            offset = end;\n        }\n        return midpoints;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {MultiLineString} Simplified MultiLineString.\n     * @protected\n     */\n    MultiLineString.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        var simplifiedEn
 ds = [];\n        simplifiedFlatCoordinates.length = douglasPeuckerArray(this.flatCoordinates, 0, this.ends_, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0, simplifiedEnds);\n        return new MultiLineString(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    MultiLineString.prototype.getType = function () {\n        return GeometryType.MULTI_LINE_STRING;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    MultiLineString.prototype.intersectsExtent = function (extent) {\n        return intersectsLineStringArray(this.flatCoordinates, 0, this.ends_, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of
  the multilinestring.\n     * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n     * @param {GeometryLayout=} opt_layout Layout.\n     * @api\n     */\n    MultiLineString.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 2);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        var ends = deflateCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n        this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n        this.changed();\n    };\n    return MultiLineString;\n}(SimpleGeometry));\nexport default MultiLineString;\n//# sourceMappingURL=MultiLineString.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) 
 { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/MultiPoint\n */\nimport GeometryType from './GeometryType.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { closestSquaredDistanceXY, containsXY } from '../extent.js';\nimport { deflateCoordinates } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { squaredDistance as squaredDx } from '../math.js';\n/**\n * @classdesc\n * Multi-point geometry.\n *\n * @api\n */\nvar MultiPoint = /** @class */ (function (_super) {\n    __extends(MultiPoint, _super);\n    /**\n 
     * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n     *     For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    function MultiPoint(coordinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        if (opt_layout && !Array.isArray(coordinates[0])) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed point to this multipoint.\n     * @param {Point} point Point.\n     * @api\n     */\n    MultiPoint.prototype.appendPoint = function (point) {\n        if (!this.flatCoordinates) {\n            this.f
 latCoordinates = point.getFlatCoordinates().slice();\n        }\n        else {\n            extend(this.flatCoordinates, point.getFlatCoordinates());\n        }\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!MultiPoint} Clone.\n     * @api\n     */\n    MultiPoint.prototype.clone = function () {\n        var multiPoint = new MultiPoint(this.flatCoordinates.slice(), this.layout);\n        return multiPoint;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    MultiPoint.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n     
    var flatCoordinates = this.flatCoordinates;\n        var stride = this.stride;\n        for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n            var squaredDistance = squaredDx(x, y, flatCoordinates[i], flatCoordinates[i + 1]);\n            if (squaredDistance < minSquaredDistance) {\n                minSquaredDistance = squaredDistance;\n                for (var j = 0; j < stride; ++j) {\n                    closestPoint[j] = flatCoordinates[i + j];\n                }\n                closestPoint.length = stride;\n            }\n        }\n        return minSquaredDistance;\n    };\n    /**\n     * Return the coordinates of the multipoint.\n     * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n     * @api\n     */\n    MultiPoint.prototype.getCoordinates = function () {\n        return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * Return the point at the specified i
 ndex.\n     * @param {number} index Index.\n     * @return {Point} Point.\n     * @api\n     */\n    MultiPoint.prototype.getPoint = function (index) {\n        var n = !this.flatCoordinates\n            ? 0\n            : this.flatCoordinates.length / this.stride;\n        if (index < 0 || n <= index) {\n            return null;\n        }\n        return new Point(this.flatCoordinates.slice(index * this.stride, (index + 1) * this.stride), this.layout);\n    };\n    /**\n     * Return the points of this multipoint.\n     * @return {Array<Point>} Points.\n     * @api\n     */\n    MultiPoint.prototype.getPoints = function () {\n        var flatCoordinates = this.flatCoordinates;\n        var layout = this.layout;\n        var stride = this.stride;\n        /** @type {Array<Point>} */\n        var points = [];\n        for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n            var point = new Point(flatCoordinates.slice(i, i + stride), layout);\n            poin
 ts.push(point);\n        }\n        return points;\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    MultiPoint.prototype.getType = function () {\n        return GeometryType.MULTI_POINT;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    MultiPoint.prototype.intersectsExtent = function (extent) {\n        var flatCoordinates = this.flatCoordinates;\n        var stride = this.stride;\n        for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n            var x = flatCoordinates[i];\n            var y = flatCoordinates[i + 1];\n            if (containsXY(extent, x, y)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * 
 Set the coordinates of the multipoint.\n     * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    MultiPoint.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 1);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\n    return MultiPoint;\n}(SimpleGeometry));\nexport default MultiPoint;\n//# sourceMappingURL=MultiPoint.js.map","/**\n * @module ol/geom/flat/center\n */\nimport { createEmpty, createOrUpdateFromFlatCoordinates } from '../../extent.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {numbe
 r} stride Stride.\n * @return {Array<number>} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n    var flatCenters = [];\n    var extent = createEmpty();\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        extent = createOrUpdateFromFlatCoordinates(flatCoordinates, offset, ends[0], stride);\n        flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n        offset = ends[ends.length - 1];\n    }\n    return flatCenters;\n}\n//# sourceMappingURL=center.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        ext
 endStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/MultiPolygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport MultiPoint from './MultiPoint.js';\nimport Polygon from './Polygon.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestMultiArrayPoint, multiArrayMaxSquaredDelta, } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateMultiCoordinatesArray } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { getInteriorPointsOfMultiArray } from './flat/interiorpoint.js';\nimport { inflateMultiCoordinatesArray } from './flat/inflate.js';\nimport { intersectsLinearRingMultiArray } from './flat/intersectsextent.js';\nimport { linearRingssAreOriented, orientLinearRingsArray, } from './f
 lat/orient.js';\nimport { linearRingss as linearRingssArea } from './flat/area.js';\nimport { linearRingss as linearRingssCenter } from './flat/center.js';\nimport { linearRingssContainsXY } from './flat/contains.js';\nimport { quantizeMultiArray } from './flat/simplify.js';\n/**\n * @classdesc\n * Multi-polygon geometry.\n *\n * @api\n */\nvar MultiPolygon = /** @class */ (function (_super) {\n    __extends(MultiPolygon, _super);\n    /**\n     * @param {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.\n     *     For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @param {Array<Array<number>>=} opt_endss Array of ends for internal use with flat coordinates.\n     */\n    function MultiPolygon(coordinates, opt_layout, opt_endss) {\n        var _this = _super.call(this) || this;\n        /*
 *\n         * @type {Array<Array<number>>}\n         * @private\n         */\n        _this.endss_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.flatInteriorPointsRevision_ = -1;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.flatInteriorPoints_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.orientedRevision_ = -1;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.orientedFlatCoordinates_ = null;\n        if (!opt_endss && !Array.isArray(coordinates[0])) {\n            var layout = _this.getLayout();\n            var polygons = /** @type {Array<Polygon>} */ (coordinates);\n     
        var flatCoordinates = [];\n            var endss = [];\n            for (var i = 0, ii = polygons.length; i < ii; ++i) {\n                var polygon = polygons[i];\n                if (i === 0) {\n                    layout = polygon.getLayout();\n                }\n                var offset = flatCoordinates.length;\n                var ends = polygon.getEnds();\n                for (var j = 0, jj = ends.length; j < jj; ++j) {\n                    ends[j] += offset;\n                }\n                extend(flatCoordinates, polygon.getFlatCoordinates());\n                endss.push(ends);\n            }\n            opt_layout = layout;\n            coordinates = flatCoordinates;\n            opt_endss = endss;\n        }\n        if (opt_layout !== undefined && opt_endss) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n            _this.endss_ = opt_endss;\n        }\n        else {\n            _this.setCoo
 rdinates(\n            /** @type {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed polygon to this multipolygon.\n     * @param {Polygon} polygon Polygon.\n     * @api\n     */\n    MultiPolygon.prototype.appendPolygon = function (polygon) {\n        /** @type {Array<number>} */\n        var ends;\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = polygon.getFlatCoordinates().slice();\n            ends = polygon.getEnds().slice();\n            this.endss_.push();\n        }\n        else {\n            var offset = this.flatCoordinates.length;\n            extend(this.flatCoordinates, polygon.getFlatCoordinates());\n            ends = polygon.getEnds().slice();\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                ends[i] += offset;\n            }\n        }\n        this.endss_.push(ends);\n        this.changed();\n 
    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!MultiPolygon} Clone.\n     * @api\n     */\n    MultiPolygon.prototype.clone = function () {\n        var len = this.endss_.length;\n        var newEndss = new Array(len);\n        for (var i = 0; i < len; ++i) {\n            newEndss[i] = this.endss_[i].slice();\n        }\n        return new MultiPolygon(this.flatCoordinates.slice(), this.layout, newEndss);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    MultiPolygon.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevisio
 n_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(multiArrayMaxSquaredDelta(this.flatCoordinates, 0, this.endss_, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestMultiArrayPoint(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    MultiPolygon.prototype.containsXY = function (x, y) {\n        return linearRingssContainsXY(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y);\n    };\n    /**\n     * Return the area of the multipolygon on projected plane.\n     * @return {number} Area (on projected plane).\n     * @api\n     */\n    MultiPolygon.prototype.getArea = function () {\n        return linearRingssArea(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride);\n    
 };\n    /**\n     * Get the coordinate array for this geometry.  This array has the structure\n     * of a GeoJSON coordinate array for multi-polygons.\n     *\n     * @param {boolean=} opt_right Orient coordinates according to the right-hand\n     *     rule (counter-clockwise for exterior and clockwise for interior rings).\n     *     If `false`, coordinates will be oriented according to the left-hand rule\n     *     (clockwise for exterior and counter-clockwise for interior rings).\n     *     By default, coordinate orientation will depend on how the geometry was\n     *     constructed.\n     * @return {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} Coordinates.\n     * @api\n     */\n    MultiPolygon.prototype.getCoordinates = function (opt_right) {\n        var flatCoordinates;\n        if (opt_right !== undefined) {\n            flatCoordinates = this.getOrientedFlatCoordinates().slice();\n            orientLinearRingsArray(flatCoordinates, 0, this.endss_, thi
 s.stride, opt_right);\n        }\n        else {\n            flatCoordinates = this.flatCoordinates;\n        }\n        return inflateMultiCoordinatesArray(flatCoordinates, 0, this.endss_, this.stride);\n    };\n    /**\n     * @return {Array<Array<number>>} Endss.\n     */\n    MultiPolygon.prototype.getEndss = function () {\n        return this.endss_;\n    };\n    /**\n     * @return {Array<number>} Flat interior points.\n     */\n    MultiPolygon.prototype.getFlatInteriorPoints = function () {\n        if (this.flatInteriorPointsRevision_ != this.getRevision()) {\n            var flatCenters = linearRingssCenter(this.flatCoordinates, 0, this.endss_, this.stride);\n            this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, flatCenters);\n            this.flatInteriorPointsRevision_ = this.getRevision();\n        }\n        return this.flatInteriorPoints_;\n    };\n    /**\n     * Return the interior point
 s as {@link module:ol/geom/MultiPoint multipoint}.\n     * @return {MultiPoint} Interior points as XYM coordinates, where M is\n     * the length of the horizontal intersection that the point belongs to.\n     * @api\n     */\n    MultiPolygon.prototype.getInteriorPoints = function () {\n        return new MultiPoint(this.getFlatInteriorPoints().slice(), GeometryLayout.XYM);\n    };\n    /**\n     * @return {Array<number>} Oriented flat coordinates.\n     */\n    MultiPolygon.prototype.getOrientedFlatCoordinates = function () {\n        if (this.orientedRevision_ != this.getRevision()) {\n            var flatCoordinates = this.flatCoordinates;\n            if (linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)) {\n                this.orientedFlatCoordinates_ = flatCoordinates;\n            }\n            else {\n                this.orientedFlatCoordinates_ = flatCoordinates.slice();\n                this.orientedFlatCoordinates_.length = orientLinearRingsArray(t
 his.orientedFlatCoordinates_, 0, this.endss_, this.stride);\n            }\n            this.orientedRevision_ = this.getRevision();\n        }\n        return this.orientedFlatCoordinates_;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {MultiPolygon} Simplified MultiPolygon.\n     * @protected\n     */\n    MultiPolygon.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        var simplifiedEndss = [];\n        simplifiedFlatCoordinates.length = quantizeMultiArray(this.flatCoordinates, 0, this.endss_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEndss);\n        return new MultiPolygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEndss);\n    };\n    /**\n     * Return the polygon at the specified index.\n     * @param {number} index Index.\n     * @return {Polygon} Polygon.\n     * @api\n     */\n    MultiPolygon.prototy
 pe.getPolygon = function (index) {\n        if (index < 0 || this.endss_.length <= index) {\n            return null;\n        }\n        var offset;\n        if (index === 0) {\n            offset = 0;\n        }\n        else {\n            var prevEnds = this.endss_[index - 1];\n            offset = prevEnds[prevEnds.length - 1];\n        }\n        var ends = this.endss_[index].slice();\n        var end = ends[ends.length - 1];\n        if (offset !== 0) {\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                ends[i] -= offset;\n            }\n        }\n        return new Polygon(this.flatCoordinates.slice(offset, end), this.layout, ends);\n    };\n    /**\n     * Return the polygons of this multipolygon.\n     * @return {Array<Polygon>} Polygons.\n     * @api\n     */\n    MultiPolygon.prototype.getPolygons = function () {\n        var layout = this.layout;\n        var flatCoordinates = this.flatCoordinates;\n        var endss = this.endss_;\n        
 var polygons = [];\n        var offset = 0;\n        for (var i = 0, ii = endss.length; i < ii; ++i) {\n            var ends = endss[i].slice();\n            var end = ends[ends.length - 1];\n            if (offset !== 0) {\n                for (var j = 0, jj = ends.length; j < jj; ++j) {\n                    ends[j] -= offset;\n                }\n            }\n            var polygon = new Polygon(flatCoordinates.slice(offset, end), layout, ends);\n            polygons.push(polygon);\n            offset = end;\n        }\n        return polygons;\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    MultiPolygon.prototype.getType = function () {\n        return GeometryType.MULTI_POLYGON;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and t
 he extent intersect.\n     * @api\n     */\n    MultiPolygon.prototype.intersectsExtent = function (extent) {\n        return intersectsLinearRingMultiArray(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of the multipolygon.\n     * @param {!Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    MultiPolygon.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 3);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        var endss = deflateMultiCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.endss_);\n        if (endss.length === 0) {\n            this.flatCoordinates.length = 0;\n        }\n        else {\n            var lastEnds = endss[endss.length - 1]
 ;\n            this.flatCoordinates.length =\n                lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];\n        }\n        this.changed();\n    };\n    return MultiPolygon;\n}(SimpleGeometry));\nexport default MultiPolygon;\n//# sourceMappingURL=MultiPolygon.js.map","/**\n * @module ol/render/Feature\n */\nimport GeometryType from '../geom/GeometryType.js';\nimport { compose as composeTransform, create as createTransform, } from '../transform.js';\nimport { createOrUpdateFromCoordinate, createOrUpdateFromFlatCoordinates, getCenter, getHeight, } from '../extent.js';\nimport { extend } from '../array.js';\nimport { getInteriorPointOfArray, getInteriorPointsOfMultiArray, } from '../geom/flat/interiorpoint.js';\nimport { get as getProjection } from '../proj.js';\nimport { interpolatePoint } from '../geom/flat/interpolate.js';\nimport { linearRingss as linearRingssCenter } from '../geom/flat/center.js';\nimport { transform2D } from '../geom/flat/transform.js';\n/**\n * 
 @type {import(\"../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n/**\n * Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like\n * structure, optimized for vector tile rendering and styling. Geometry access\n * through the API is limited to getting the type and extent of the geometry.\n */\nvar RenderFeature = /** @class */ (function () {\n    /**\n     * @param {import(\"../geom/GeometryType.js\").default} type Geometry type.\n     * @param {Array<number>} flatCoordinates Flat coordinates. These always need\n     *     to be right-handed for polygons.\n     * @param {Array<number>|Array<Array<number>>} ends Ends or Endss.\n     * @param {Object<string, *>} properties Properties.\n     * @param {number|string|undefined} id Feature id.\n     */\n    function RenderFeature(type, flatCoordinates, ends, properties, id) {\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent|und
 efined}\n         */\n        this.extent_;\n        /**\n         * @private\n         * @type {number|string|undefined}\n         */\n        this.id_ = id;\n        /**\n         * @private\n         * @type {import(\"../geom/GeometryType.js\").default}\n         */\n        this.type_ = type;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.flatCoordinates_ = flatCoordinates;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.flatInteriorPoints_ = null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.flatMidpoints_ = null;\n        /**\n         * @private\n         * @type {Array<number>|Array<Array<number>>}\n         */\n        this.ends_ = ends;\n        /**\n         * @private\n         * @type {Object<string, *>}\n         */\n        this.properties_ = properties;\n    }\n    /**\n     * Get a feature property by its key.\n     * @para
 m {string} key Key\n     * @return {*} Value for the requested key.\n     * @api\n     */\n    RenderFeature.prototype.get = function (key) {\n        return this.properties_[key];\n    };\n    /**\n     * Get the extent of this feature's geometry.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    RenderFeature.prototype.getExtent = function () {\n        if (!this.extent_) {\n            this.extent_ =\n                this.type_ === GeometryType.POINT\n                    ? createOrUpdateFromCoordinate(this.flatCoordinates_)\n                    : createOrUpdateFromFlatCoordinates(this.flatCoordinates_, 0, this.flatCoordinates_.length, 2);\n        }\n        return this.extent_;\n    };\n    /**\n     * @return {Array<number>} Flat interior points.\n     */\n    RenderFeature.prototype.getFlatInteriorPoint = function () {\n        if (!this.flatInteriorPoints_) {\n            var flatCenter = getCenter(this.getExtent());\n            this.flatIn
 teriorPoints_ = getInteriorPointOfArray(this.flatCoordinates_, 0, \n            /** @type {Array<number>} */ (this.ends_), 2, flatCenter, 0);\n        }\n        return this.flatInteriorPoints_;\n    };\n    /**\n     * @return {Array<number>} Flat interior points.\n     */\n    RenderFeature.prototype.getFlatInteriorPoints = function () {\n        if (!this.flatInteriorPoints_) {\n            var flatCenters = linearRingssCenter(this.flatCoordinates_, 0, \n            /** @type {Array<Array<number>>} */ (this.ends_), 2);\n            this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(this.flatCoordinates_, 0, \n            /** @type {Array<Array<number>>} */ (this.ends_), 2, flatCenters);\n        }\n        return this.flatInteriorPoints_;\n    };\n    /**\n     * @return {Array<number>} Flat midpoint.\n     */\n    RenderFeature.prototype.getFlatMidpoint = function () {\n        if (!this.flatMidpoints_) {\n            this.flatMidpoints_ = interpolatePoint(this.flatCoordin
 ates_, 0, this.flatCoordinates_.length, 2, 0.5);\n        }\n        return this.flatMidpoints_;\n    };\n    /**\n     * @return {Array<number>} Flat midpoints.\n     */\n    RenderFeature.prototype.getFlatMidpoints = function () {\n        if (!this.flatMidpoints_) {\n            this.flatMidpoints_ = [];\n            var flatCoordinates = this.flatCoordinates_;\n            var offset = 0;\n            var ends = /** @type {Array<number>} */ (this.ends_);\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                var end = ends[i];\n                var midpoint = interpolatePoint(flatCoordinates, offset, end, 2, 0.5);\n                extend(this.flatMidpoints_, midpoint);\n                offset = end;\n            }\n        }\n        return this.flatMidpoints_;\n    };\n    /**\n     * Get the feature identifier.  This is a stable identifier for the feature and\n     * is set when reading data from a remote source.\n     * @return {number|string|undefined}
  Id.\n     * @api\n     */\n    RenderFeature.prototype.getId = function () {\n        return this.id_;\n    };\n    /**\n     * @return {Array<number>} Flat coordinates.\n     */\n    RenderFeature.prototype.getOrientedFlatCoordinates = function () {\n        return this.flatCoordinates_;\n    };\n    /**\n     * For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when\n     * determining the geometry type in style function (see {@link #getType}).\n     * @return {RenderFeature} Feature.\n     * @api\n     */\n    RenderFeature.prototype.getGeometry = function () {\n        return this;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {RenderFeature} Simplified geometry.\n     */\n    RenderFeature.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        return this;\n    };\n    /**\n     * Get a transformed and simplified version of the geometry.\n     * @abstract\n     * @param {number} s
 quaredTolerance Squared tolerance.\n     * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n     * @return {RenderFeature} Simplified geometry.\n     */\n    RenderFeature.prototype.simplifyTransformed = function (squaredTolerance, opt_transform) {\n        return this;\n    };\n    /**\n     * Get the feature properties.\n     * @return {Object<string, *>} Feature properties.\n     * @api\n     */\n    RenderFeature.prototype.getProperties = function () {\n        return this.properties_;\n    };\n    /**\n     * @return {number} Stride.\n     */\n    RenderFeature.prototype.getStride = function () {\n        return 2;\n    };\n    /**\n     * @return {undefined}\n     */\n    RenderFeature.prototype.getStyleFunction = function () {\n        return undefined;\n    };\n    /**\n     * Get the type of this feature's geometry.\n     * @return {import(\"../geom/GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    RenderFea
 ture.prototype.getType = function () {\n        return this.type_;\n    };\n    /**\n     * Transform geometry coordinates from tile pixel space to projected.\n     * The SRS of the source and destination are expected to be the same.\n     *\n     * @param {import(\"../proj.js\").ProjectionLike} source The current projection\n     * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.\n     */\n    RenderFeature.prototype.transform = function (source, destination) {\n        source = getProjection(source);\n        var pixelExtent = source.getExtent();\n        var projectedExtent = source.getWorldExtent();\n        var scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n        composeTransform(tmpTransform, projectedExtent[0], projectedExtent[3], scale, -scale, 0, 0, 0);\n        transform2D(this.flatCoordinates_, 0, this.flatCoordinates_.length, 2, tmpTransform, this.flatCoordinates_);\n    };\n    /**\n     * @return {Array<number>|Array<A
 rray<number>>} Ends or endss.\n     */\n    RenderFeature.prototype.getEnds = function () {\n        return this.ends_;\n    };\n    return RenderFeature;\n}());\nRenderFeature.prototype.getEndss = RenderFeature.prototype.getEnds;\n/**\n * @return {Array<number>} Flat coordinates.\n */\nRenderFeature.prototype.getFlatCoordinates =\n    RenderFeature.prototype.getOrientedFlatCoordinates;\nexport default RenderFeature;\n//# sourceMappingURL=Feature.js.map","/**\n * @module ol/format/MVT\n */\n//FIXME Implement projection handling\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() 
 { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport FeatureFormat, { transformGeometryWithOptions } from './Feature.js';\nimport FormatType from './FormatType.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport PBF from 'pbf';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport Projection from '../proj/Projection.js';\nimport RenderFeature from '../render/Feature.js';\nimport Units from '../proj/Units.js';\nimport { assert } from '../asserts.js';\nimport { get } from '../proj.js';\nimport { linearRingIsClockwise } from '../geom/flat/orient.js';\n/**\n * @typedef {Object} Options\
 n * @property {import(\"../Feature.js\").FeatureClass} [featureClass] Class for features returned by\n * {@link module:ol/format/MVT#readFeatures}. Set to {@link module:ol/Feature~Feature} to get full editing and geometry\n * support at the cost of decreased rendering performance. The default is\n * {@link module:ol/render/Feature~RenderFeature}, which is optimized for rendering and hit detection.\n * @property {string} [geometryName='geometry'] Geometry name to use when creating features.\n * @property {string} [layerName='layer'] Name of the feature attribute that holds the layer name.\n * @property {Array<string>} [layers] Layers to read features from. If not provided, features will be read from all\n * @property {string} [idProperty] Optional property that will be assigned as the feature id and removed from the properties.\n * layers.\n */\n/**\n * @classdesc\n * Feature format for reading data in the Mapbox MVT format.\n *\n * @param {Options=} opt_options Options.\n * @api\n *
 /\nvar MVT = /** @class */ (function (_super) {\n    __extends(MVT, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function MVT(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {Projection}\n         */\n        _this.dataProjection = new Projection({\n            code: '',\n            units: Units.TILE_PIXELS,\n        });\n        /**\n         * @private\n         * @type {import(\"../Feature.js\").FeatureClass}\n         */\n        _this.featureClass_ = options.featureClass\n            ? options.featureClass\n            : RenderFeature;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.geometryName_ = options.geometryName;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.layerName_ = options.layerName ? options.layerName : 'layer';\n        /**\n         * @
 private\n         * @type {Array<string>}\n         */\n        _this.layers_ = options.layers ? options.layers : null;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.idProperty_ = options.idProperty;\n        return _this;\n    }\n    /**\n     * Read the raw geometry from the pbf offset stored in a raw feature's geometry\n     * property.\n     * @param {PBF} pbf PBF.\n     * @param {Object} feature Raw feature.\n     * @param {Array<number>} flatCoordinates Array to store flat coordinates in.\n     * @param {Array<number>} ends Array to store ends in.\n     * @private\n     */\n    MVT.prototype.readRawGeometry_ = function (pbf, feature, flatCoordinates, ends) {\n        pbf.pos = feature.geometry;\n        var end = pbf.readVarint() + pbf.pos;\n        var cmd = 1;\n        var length = 0;\n        var x = 0;\n        var y = 0;\n        var coordsLen = 0;\n        var currentEnd = 0;\n        while (pbf.pos < end) {\n            if (!le
 ngth) {\n                var cmdLen = pbf.readVarint();\n                cmd = cmdLen & 0x7;\n                length = cmdLen >> 3;\n            }\n            length--;\n            if (cmd === 1 || cmd === 2) {\n                x += pbf.readSVarint();\n                y += pbf.readSVarint();\n                if (cmd === 1) {\n                    // moveTo\n                    if (coordsLen > currentEnd) {\n                        ends.push(coordsLen);\n                        currentEnd = coordsLen;\n                    }\n                }\n                flatCoordinates.push(x, y);\n                coordsLen += 2;\n            }\n            else if (cmd === 7) {\n                if (coordsLen > currentEnd) {\n                    // close polygon\n                    flatCoordinates.push(flatCoordinates[currentEnd], flatCoordinates[currentEnd + 1]);\n                    coordsLen += 2;\n                }\n            }\n            else {\n                assert(false, 59); // 
 Invalid command found in the PBF\n            }\n        }\n        if (coordsLen > currentEnd) {\n            ends.push(coordsLen);\n            currentEnd = coordsLen;\n        }\n    };\n    /**\n     * @private\n     * @param {PBF} pbf PBF\n     * @param {Object} rawFeature Raw Mapbox feature.\n     * @param {import(\"./Feature.js\").ReadOptions} options Read options.\n     * @return {import(\"../Feature.js\").FeatureLike} Feature.\n     */\n    MVT.prototype.createFeature_ = function (pbf, rawFeature, options) {\n        var type = rawFeature.type;\n        if (type === 0) {\n            return null;\n        }\n        var feature;\n        var values = rawFeature.properties;\n        var id;\n        if (!this.idProperty_) {\n            id = rawFeature.id;\n        }\n        else {\n            id = values[this.idProperty_];\n            delete values[this.idProperty_];\n        }\n        values[this.layerName_] = rawFeature.layer.name;\n        var flatCoordinates = [];\n
         var ends = [];\n        this.readRawGeometry_(pbf, rawFeature, flatCoordinates, ends);\n        var geometryType = getGeometryType(type, ends.length);\n        if (this.featureClass_ === RenderFeature) {\n            feature = new this.featureClass_(geometryType, flatCoordinates, ends, values, id);\n            feature.transform(options.dataProjection, options.featureProjection);\n        }\n        else {\n            var geom = void 0;\n            if (geometryType == GeometryType.POLYGON) {\n                var endss = [];\n                var offset = 0;\n                var prevEndIndex = 0;\n                for (var i = 0, ii = ends.length; i < ii; ++i) {\n                    var end = ends[i];\n                    // classifies an array of rings into polygons with outer rings and holes\n                    if (!linearRingIsClockwise(flatCoordinates, offset, end, 2)) {\n                        endss.push(ends.slice(prevEndIndex, i + 1));\n                    }\n       
              else {\n                        if (endss.length === 0) {\n                            continue;\n                        }\n                        endss[endss.length - 1].push(ends[prevEndIndex]);\n                    }\n                    prevEndIndex = i + 1;\n                    offset = end;\n                }\n                if (endss.length > 1) {\n                    geom = new MultiPolygon(flatCoordinates, GeometryLayout.XY, endss);\n                }\n                else {\n                    geom = new Polygon(flatCoordinates, GeometryLayout.XY, ends);\n                }\n            }\n            else {\n                geom =\n                    geometryType === GeometryType.POINT\n                        ? new Point(flatCoordinates, GeometryLayout.XY)\n                        : geometryType === GeometryType.LINE_STRING\n                            ? new LineString(flatCoordinates, GeometryLayout.XY)\n                            : geometryType === Ge
 ometryType.POLYGON\n                                ? new Polygon(flatCoordinates, GeometryLayout.XY, ends)\n                                : geometryType === GeometryType.MULTI_POINT\n                                    ? new MultiPoint(flatCoordinates, GeometryLayout.XY)\n                                    : geometryType === GeometryType.MULTI_LINE_STRING\n                                        ? new MultiLineString(flatCoordinates, GeometryLayout.XY, ends)\n                                        : null;\n            }\n            var ctor = /** @type {typeof import(\"../Feature.js\").default} */ (this\n                .featureClass_);\n            feature = new ctor();\n            if (this.geometryName_) {\n                feature.setGeometryName(this.geometryName_);\n            }\n            var geometry = transformGeometryWithOptions(geom, false, options);\n            feature.setGeometry(geometry);\n            feature.setId(id);\n            feature.setProperties(valu
 es, true);\n        }\n        return feature;\n    };\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    MVT.prototype.getType = function () {\n        return FormatType.ARRAY_BUFFER;\n    };\n    /**\n     * Read all features.\n     *\n     * @param {ArrayBuffer} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n     * @api\n     */\n    MVT.prototype.readFeatures = function (source, opt_options) {\n        var layers = this.layers_;\n        var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (this.adaptOptions(opt_options));\n        var dataProjection = get(options.dataProjection);\n        dataProjection.setWorldExtent(options.extent);\n        options.dataProjection = dataProjection;\n        var pbf = new PBF(/** @type {ArrayBuffer} */ (source));\n        var pbfLayers = pbf.readFields(layersPBFReader, {});\n 
        var features = [];\n        for (var name_1 in pbfLayers) {\n            if (layers && layers.indexOf(name_1) == -1) {\n                continue;\n            }\n            var pbfLayer = pbfLayers[name_1];\n            var extent = pbfLayer ? [0, 0, pbfLayer.extent, pbfLayer.extent] : null;\n            dataProjection.setExtent(extent);\n            for (var i = 0, ii = pbfLayer.length; i < ii; ++i) {\n                var rawFeature = readRawFeature(pbf, pbfLayer, i);\n                features.push(this.createFeature_(pbf, rawFeature, options));\n            }\n        }\n        return features;\n    };\n    /**\n     * Read the projection from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    MVT.prototype.readProjection = function (source) {\n        return this.dataProjection;\n    };\n    /**\n     * Sets the layers that features will be r
 ead from.\n     * @param {Array<string>} layers Layers.\n     * @api\n     */\n    MVT.prototype.setLayers = function (layers) {\n        this.layers_ = layers;\n    };\n    return MVT;\n}(FeatureFormat));\n/**\n * Reader callback for parsing layers.\n * @param {number} tag The tag.\n * @param {Object} layers The layers object.\n * @param {PBF} pbf The PBF.\n */\nfunction layersPBFReader(tag, layers, pbf) {\n    if (tag === 3) {\n        var layer = {\n            keys: [],\n            values: [],\n            features: [],\n        };\n        var end = pbf.readVarint() + pbf.pos;\n        pbf.readFields(layerPBFReader, layer, end);\n        layer.length = layer.features.length;\n        if (layer.length) {\n            layers[layer.name] = layer;\n        }\n    }\n}\n/**\n * Reader callback for parsing layer.\n * @param {number} tag The tag.\n * @param {Object} layer The layer object.\n * @param {PBF} pbf The PBF.\n */\nfunction layerPBFReader(tag, layer, pbf) {\n    if (tag ===
  15) {\n        layer.version = pbf.readVarint();\n    }\n    else if (tag === 1) {\n        layer.name = pbf.readString();\n    }\n    else if (tag === 5) {\n        layer.extent = pbf.readVarint();\n    }\n    else if (tag === 2) {\n        layer.features.push(pbf.pos);\n    }\n    else if (tag === 3) {\n        layer.keys.push(pbf.readString());\n    }\n    else if (tag === 4) {\n        var value = null;\n        var end = pbf.readVarint() + pbf.pos;\n        while (pbf.pos < end) {\n            tag = pbf.readVarint() >> 3;\n            value =\n                tag === 1\n                    ? pbf.readString()\n                    : tag === 2\n                        ? pbf.readFloat()\n                        : tag === 3\n                            ? pbf.readDouble()\n                            : tag === 4\n                                ? pbf.readVarint64()\n                                : tag === 5\n                                    ? pbf.readVarint()\n                 
                    : tag === 6\n                                        ? pbf.readSVarint()\n                                        : tag === 7\n                                            ? pbf.readBoolean()\n                                            : null;\n        }\n        layer.values.push(value);\n    }\n}\n/**\n * Reader callback for parsing feature.\n * @param {number} tag The tag.\n * @param {Object} feature The feature object.\n * @param {PBF} pbf The PBF.\n */\nfunction featurePBFReader(tag, feature, pbf) {\n    if (tag == 1) {\n        feature.id = pbf.readVarint();\n    }\n    else if (tag == 2) {\n        var end = pbf.readVarint() + pbf.pos;\n        while (pbf.pos < end) {\n            var key = feature.layer.keys[pbf.readVarint()];\n            var value = feature.layer.values[pbf.readVarint()];\n            feature.properties[key] = value;\n        }\n    }\n    else if (tag == 3) {\n        feature.type = pbf.readVarint();\n    }\n    else if (tag == 4) {\n  
       feature.geometry = pbf.pos;\n    }\n}\n/**\n * Read a raw feature from the pbf offset stored at index `i` in the raw layer.\n * @param {PBF} pbf PBF.\n * @param {Object} layer Raw layer.\n * @param {number} i Index of the feature in the raw layer's `features` array.\n * @return {Object} Raw feature.\n */\nfunction readRawFeature(pbf, layer, i) {\n    pbf.pos = layer.features[i];\n    var end = pbf.readVarint() + pbf.pos;\n    var feature = {\n        layer: layer,\n        type: 0,\n        properties: {},\n    };\n    pbf.readFields(featurePBFReader, feature, end);\n    return feature;\n}\n/**\n * @param {number} type The raw feature's geometry type\n * @param {number} numEnds Number of ends of the flat coordinates of the\n * geometry.\n * @return {import(\"../geom/GeometryType.js\").default} The geometry type.\n */\nfunction getGeometryType(type, numEnds) {\n    /** @type {import(\"../geom/GeometryType.js\").default} */\n    var geometryType;\n    if (type === 1) {\n        
 geometryType =\n            numEnds === 1 ? GeometryType.POINT : GeometryType.MULTI_POINT;\n    }\n    else if (type === 2) {\n        geometryType =\n            numEnds === 1 ? GeometryType.LINE_STRING : GeometryType.MULTI_LINE_STRING;\n    }\n    else if (type === 3) {\n        geometryType = GeometryType.POLYGON;\n        // MultiPolygon not relevant for rendering - winding order determines\n        // outer rings of polygons.\n    }\n    return geometryType;\n}\nexport default MVT;\n//# sourceMappingURL=MVT.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.c
 onstructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/VectorTile\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorTileLayerRenderer from '../renderer/canvas/VectorTileLayer.js';\nimport TileProperty from './TileProperty.js';\nimport VectorTileRenderType from './VectorTileRenderType.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, fir
 st by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The
  buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {import(\"./VectorTileRenderType.js\").default|string} [renderMode='hybrid'] Render mode for vector tiles:\n *  * `'image'`: Vector tiles are rendered as images. Great performance, but point symbols and texts\n *    are always rotated with the view and pixels are scaled during zoom animations. When `declutter`\n *    is set to `true`, the decluttering is done per tile resulting in labels and point symbols getting\n *    cut off at tile boundaries.\n *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n *    animations. Point symbols and texts are accurate
 ly rendered as vectors and can stay upright on\n *    rotated views.\n *  * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector\n *    tile layers with only a few rendered features (e.g. for highlighting a subset of features of\n *    another layer with the same source).\n * @property {import(\"../source/VectorTile.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the la
 yer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link module:ol/style} for default style which will be used if this is not defined.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n
  * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n/**\n * @classdesc\n * Layer for vector tile data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @param {Options=} opt_options Options.\n * @extends {BaseVectorLayer<import(\"../source/VectorTile.js\").default>}\n * @api\n */\nvar VectorTileLayer = /** @class */ (function (_super) {\n    __extends(VectorTileLayer, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function VectorTileLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = /** @type {Object} */ (assign({}, options));\n        delete baseOptions.preload;\n        delete baseOptions.useInterimTilesO
 nError;\n        _this = _super.call(this, /** @type {import(\"./BaseVector.js\").Options} */ (baseOptions)) || this;\n        var renderMode = options.renderMode || VectorTileRenderType.HYBRID;\n        assert(renderMode == undefined ||\n            renderMode == VectorTileRenderType.IMAGE ||\n            renderMode == VectorTileRenderType.HYBRID ||\n            renderMode == VectorTileRenderType.VECTOR, 28); // `renderMode` must be `'image'`, `'hybrid'` or `'vector'`.\n        /**\n         * @private\n         * @type {import(\"./VectorTileRenderType.js\").default}\n         */\n        _this.renderMode_ = renderMode;\n        _this.setPreload(options.preload ? options.preload : 0);\n        _this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined\n            ? options.useInterimTilesOnError\n            : true);\n        return _this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer 
 renderer.\n     * @protected\n     */\n    VectorTileLayer.prototype.createRenderer = function () {\n        return new CanvasVectorTileLayerRenderer(this);\n    };\n    /**\n     * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n     * that resolves with an array of features. The array will either contain the topmost feature\n     * when a hit was detected, or it will be empty.\n     *\n     * The hit detection algorithm used for this method is optimized for performance, but is less\n     * accurate than the one used in {@link import(\"../PluggableMap.js\").default#getFeaturesAtPixel}: Text\n     * is not considered, and icons are only represented by their bounding box instead of the exact\n     * image.\n     *\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with an array of features.\n     * @api\n     */\n    VectorTileLayer.prototype.get
 Features = function (pixel) {\n        return _super.prototype.getFeatures.call(this, pixel);\n    };\n    /**\n     * @return {import(\"./VectorTileRenderType.js\").default} The render mode.\n     */\n    VectorTileLayer.prototype.getRenderMode = function () {\n        return this.renderMode_;\n    };\n    /**\n     * Return the level as number to which we will preload tiles up to.\n     * @return {number} The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.getPreload = function () {\n        return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n    };\n    /**\n     * Whether we use interim tiles on error.\n     * @return {boolean} Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.getUseInterimTilesOnError = function () {\n        return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));\n    };\n    /**\n     * Set the level as number to whi
 ch we will preload tiles up to.\n     * @param {number} preload The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.setPreload = function (preload) {\n        this.set(TileProperty.PRELOAD, preload);\n    };\n    /**\n     * Set whether we use interim tiles on error.\n     * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.setUseInterimTilesOnError = function (useInterimTilesOnError) {\n        this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n    };\n    return VectorTileLayer;\n}(BaseVectorLayer));\nexport default VectorTileLayer;\n//# sourceMappingURL=VectorTile.js.map","import { listen } from 'ol/events';\nimport EventType from 'ol/events/EventType';\nimport { labelCache } from 'ol/render/canvas';\nexport function deg2rad(degrees) {\n    return degrees * Math.PI / 180;\n}\nexport var defaultResolutions = (fun
 ction () {\n    var resolutions = [];\n    for (var res = 78271.51696402048; resolutions.length <= 24; res /= 2) {\n        resolutions.push(res);\n    }\n    return resolutions;\n})();\n/**\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @return {HTMLCanvasElement} Canvas.\n */\nexport function createCanvas(width, height) {\n    if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && typeof OffscreenCanvas !== 'undefined') { // eslint-disable-line\n        return /** @type {?} */ (new OffscreenCanvas(width, height));\n    }\n    else {\n        var canvas = document.createElement('canvas');\n        canvas.width = width;\n        canvas.height = height;\n        return canvas;\n    }\n}\nexport function getZoomForResolution(resolution, resolutions) {\n    var i = 0;\n    var ii = resolutions.length;\n    for (; i < ii; ++i) {\n        var candidate = resolutions[i];\n        if (candidate < resolution 
 && i + 1 < ii) {\n            var zoomFactor = resolutions[i] / resolutions[i + 1];\n            return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n        }\n    }\n    return ii - 1;\n}\nvar hairSpacePool = Array(256).join('\\u200A');\nexport function applyLetterSpacing(text, letterSpacing) {\n    if (letterSpacing >= 0.05) {\n        var textWithLetterSpacing = '';\n        var lines = text.split('\\n');\n        var joinSpaceString = hairSpacePool.slice(0, Math.round(letterSpacing / 0.1));\n        for (var l = 0, ll = lines.length; l < ll; ++l) {\n            if (l > 0) {\n                textWithLetterSpacing += '\\n';\n            }\n            textWithLetterSpacing += lines[l].split('').join(joinSpaceString);\n        }\n        return textWithLetterSpacing;\n    }\n    return text;\n}\nvar measureContext;\nfunction getMeasureContext() {\n    if (!measureContext) {\n        measureContext = createCanvas(1, 1).getContext('2d');\n    }\n    return measu
 reContext;\n}\nfunction measureText(text, letterSpacing) {\n    return getMeasureContext().measureText(text).width + (text.length - 1) * letterSpacing;\n}\nvar measureCache = {};\nif (labelCache) {\n    // Only available when using ES modules\n    listen(labelCache, EventType.CLEAR, function () {\n        measureCache = {};\n    });\n}\nexport function wrapText(text, font, em, letterSpacing) {\n    if (text.indexOf('\\n') !== -1) {\n        var hardLines = text.split('\\n');\n        var lines = [];\n        for (var i = 0, ii = hardLines.length; i < ii; ++i) {\n            lines.push(wrapText(hardLines[i], font, em, letterSpacing));\n        }\n        return lines.join('\\n');\n    }\n    var key = em + ',' + font + ',' + text + ',' + letterSpacing;\n    var wrappedText = measureCache[key];\n    if (!wrappedText) {\n        var words = text.split(' ');\n        if (words.length > 1) {\n            var ctx = getMeasureContext();\n            ctx.font = font;\n            var oneEm 
 = ctx.measureText('M').width;\n            var maxWidth = oneEm * em;\n            var line = '';\n            var lines = [];\n            // Pass 1 - wrap lines to not exceed maxWidth\n            for (var i = 0, ii = words.length; i < ii; ++i) {\n                var word = words[i];\n                var testLine = line + (line ? ' ' : '') + word;\n                if (measureText(testLine, letterSpacing) <= maxWidth) {\n                    line = testLine;\n                }\n                else {\n                    if (line) {\n                        lines.push(line);\n                    }\n                    line = word;\n                }\n            }\n            if (line) {\n                lines.push(line);\n            }\n            // Pass 2 - add lines with a width of less than 30% of maxWidth to the previous or next line\n            for (var i = 0; i < lines.length; ++i) {\n                var line_1 = lines[i];\n                if (measureText(line_1, letterSp
 acing) < maxWidth * 0.35) {\n                    var prevWidth = i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity;\n                    var nextWidth = i < lines.length - 1 ? measureText(lines[i + 1], letterSpacing) : Infinity;\n                    lines.splice(i, 1);\n                    if (prevWidth < nextWidth) {\n                        lines[i - 1] += ' ' + line_1;\n                        i -= 1;\n                    }\n                    else {\n                        lines[i] = line_1 + ' ' + lines[i];\n                    }\n                }\n            }\n            // Pass 3 - try to fill 80% of maxWidth for each line\n            for (var i = 0, ii = lines.length - 1; i < ii; ++i) {\n                var line_2 = lines[i];\n                var next = lines[i + 1];\n                if (measureText(line_2, letterSpacing) > maxWidth * 0.7 &&\n                    measureText(next, letterSpacing) < maxWidth * 0.6) {\n                    var lineWords = line_2.
 split(' ');\n                    var lastWord = lineWords.pop();\n                    if (measureText(lastWord, letterSpacing) < maxWidth * 0.2) {\n                        lines[i] = lineWords.join(' ');\n                        lines[i + 1] = lastWord + ' ' + next;\n                    }\n                    ii -= 1;\n                }\n            }\n            wrappedText = lines.join('\\n');\n        }\n        else {\n            wrappedText = text;\n        }\n        wrappedText = applyLetterSpacing(wrappedText, letterSpacing);\n        measureCache[key] = wrappedText;\n    }\n    return wrappedText;\n}\n//# sourceMappingURL=util.js.map","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\nimport Style from 'ol/style/Style';\nimport Fill from 'ol/style/Fill';\nimport Stroke from 'ol/style/Stroke';\nimport Icon from 'ol/sty
 le/Icon';\nimport Text from 'ol/style/Text';\nimport Circle from 'ol/style/Circle';\nimport RenderFeature from 'ol/render/Feature';\nimport { derefLayers } from '@mapbox/mapbox-gl-style-spec';\nimport { expression, Color, function as fn, latest as spec, featureFilter as createFilter } from '@mapbox/mapbox-gl-style-spec';\nimport mb2css from 'mapbox-to-css-font';\nimport { deg2rad, defaultResolutions, getZoomForResolution, wrapText, applyLetterSpacing, createCanvas } from './util';\n/**\n * @typedef {import(\"ol/layer/Vector\").default} VectorLayer\n * @typedef {import(\"ol/layer/VectorTile\").default} VectorTileLayer\n * @typedef {import(\"ol/style/Style\").StyleFunction} StyleFunction\n */\nvar isFunction = fn.isFunction;\nvar convertFunction = fn.convertFunction;\nvar isExpression = expression.isExpression;\nvar createPropertyExpression = expression.createPropertyExpression;\nvar types = {\n    'Point': 1,\n    'MultiPoint': 1,\n    'LineString': 2,\n    'MultiLineString': 2,\n   
  'Polygon': 3,\n    'MultiPolygon': 3\n};\nvar anchor = {\n    'center': [0.5, 0.5],\n    'left': [0, 0.5],\n    'right': [1, 0.5],\n    'top': [0.5, 0],\n    'bottom': [0.5, 1],\n    'top-left': [0, 0],\n    'top-right': [1, 0],\n    'bottom-left': [0, 1],\n    'bottom-right': [1, 1]\n};\nvar expressionData = function (rawExpression, propertySpec) {\n    var compiledExpression = createPropertyExpression(rawExpression, propertySpec);\n    if (compiledExpression.result === 'error') {\n        throw new Error(compiledExpression.value.map(function (err) { return err.key + \": \" + err.message; }).join(', '));\n    }\n    return compiledExpression.value;\n};\nvar emptyObj = {};\nvar zoomObj = { zoom: 0 };\n/** @private */\nvar functionCache = {};\nvar renderFeatureCoordinates, renderFeature;\n/**\n * @private\n * @param {Object} layer Gl object layer.\n * @param {string} layoutOrPaint 'layout' or 'paint'.\n * @param {string} property Feature property.\n * @param {number} zoom Zoom.\n * 
 @param {Object} feature Gl feature.\n * @return {?} Value.\n */\nexport function getValue(layer, layoutOrPaint, property, zoom, feature) {\n    var layerId = layer.id;\n    if (!functionCache[layerId]) {\n        functionCache[layerId] = {};\n    }\n    var functions = functionCache[layerId];\n    if (!functions[property]) {\n        var value_1 = (layer[layoutOrPaint] || emptyObj)[property];\n        var propertySpec = spec[layoutOrPaint + \"_\" + layer.type][property];\n        if (value_1 === undefined) {\n            value_1 = propertySpec.default;\n        }\n        var isExpr = isExpression((value_1));\n        if (!isExpr && isFunction(value_1)) {\n            value_1 = convertFunction(value_1, propertySpec);\n            isExpr = true;\n        }\n        if (isExpr) {\n            var compiledExpression = expressionData(value_1, propertySpec);\n            functions[property] = compiledExpression.evaluate.bind(compiledExpression);\n        }\n        else {\n            if
  (propertySpec.type == 'color') {\n                value_1 = Color.parse(value_1);\n            }\n            functions[property] = function () {\n                return value_1;\n            };\n        }\n    }\n    zoomObj.zoom = zoom;\n    return functions[property](zoomObj, feature);\n}\n/** @private */\nvar filterCache = {};\n/**\n * @private\n * @param {string} layerId Layer id.\n * @param {?} filter Filter.\n * @param {Object} feature Feature.\n * @param {number} zoom Zoom.\n * @return {boolean} Filter result.\n */\nfunction evaluateFilter(layerId, filter, feature, zoom) {\n    if (!(layerId in filterCache)) {\n        filterCache[layerId] = createFilter(filter).filter;\n    }\n    zoomObj.zoom = zoom;\n    return filterCache[layerId](zoomObj, feature);\n}\n/**\n * @private\n * @param {?} color Color.\n * @param {number} opacity Opacity.\n * @return {string} Color.\n */\nfunction colorWithOpacity(color, opacity) {\n    if (color) {\n        if (color.a === 0 || opacity === 
 0) {\n            return undefined;\n        }\n        var a = color.a;\n        opacity = opacity === undefined ? 1 : opacity;\n        return 'rgba(' + Math.round(color.r * 255 / a) + ',' + Math.round(color.g * 255 / a) +\n            ',' + Math.round(color.b * 255 / a) + ',' + (a * opacity) + ')';\n    }\n    return color;\n}\nvar templateRegEx = /^([^]*)\\{(.*)\\}([^]*)$/;\n/**\n * @private\n * @param {string} text Text.\n * @param {Object} properties Properties.\n * @return {string} Text.\n */\nfunction fromTemplate(text, properties) {\n    var parts;\n    do {\n        parts = text.match(templateRegEx);\n        if (parts) {\n            var value = properties[parts[2]] || '';\n            text = parts[1] + value + parts[3];\n        }\n    } while (parts);\n    return text;\n}\n/**\n * ```js\n * import stylefunction from 'ol-mapbox-style/dist/stylefunction';\n * ```\n * Creates a style function from the `glStyle` object for all layers that use\n * the specified `source`, whi
 ch needs to be a `\"type\": \"vector\"` or\n * `\"type\": \"geojson\"` source and applies it to the specified OpenLayers layer.\n *\n * Two additional properties will be set on the provided layer:\n *\n *  * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n *    OpenLayers layer was created from. Usually `apply()` creates one\n *    OpenLayers layer per Mapbox Style source, unless the layer stack has\n *    layers from different sources in between.\n *  * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n *    included in the OpenLayers layer.\n *\n * This function also works in a web worker. In worker mode, the main thread needs\n * to listen to messages from the worker and respond with another message to make\n * sure that sprite image loading works:\n *\n * ```js\n *  worker.addEventListener('message', event => {\n *   if (event.data.action === 'loadImage') {\n *     const image = new Image();\n *     image.crossOrigin = 'anonymou
 s';\n *     image.addEventListener('load', function() {\n *       createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => {\n *         worker.postMessage({\n *           action: 'imageLoaded',\n *           image: imageBitmap,\n *           src: event.data.src\n *         }, [imageBitmap]);\n *       });\n *     });\n *     image.src = event.data.src;\n *   }\n * });\n * ```\n *\n * @param {VectorLayer|VectorTileLayer} olLayer OpenLayers layer to\n * apply the style to. In addition to the style, the layer will get two\n * properties: `mapbox-source` will be the `id` of the `glStyle`'s source used\n * for the layer, and `mapbox-layers` will be an array of the `id`s of the\n * `glStyle`'s layers.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array<string>} source `source` key or an array of layer `id`s\n * from the Mapbox Style object. When a `source` key is provided, all layers for\n * the specified source will be included in the st
 yle function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {Array<number>} [resolutions=[78271.51696402048, 39135.75848201024,\n   19567.87924100512, 9783.93962050256, 4891.96981025128, 2445.98490512564,\n   1222.99245256282, 611.49622628141, 305.748113140705, 152.8740565703525,\n   76.43702828517625, 38.21851414258813, 19.109257071294063, 9.554628535647032,\n   4.777314267823516, 2.388657133911758, 1.194328566955879, 0.5971642834779395,\n   0.29858214173896974, 0.14929107086948487, 0.07464553543474244]]\n * Resolutions for mapping resolution to zoom level.\n * @param {Object} [spriteData=undefined] Sprite data from the url specified in\n * the Mapbox Style object's `sprite` property. Only required if a `sprite`\n * property is specified in the Mapbox Style object.\n * @param {Object} [spriteImageUrl=undefined] Sprite image url for the sprite\n * specified in the Mapbox Style object's `sprite` property. Only required if a\n * `spri
 te` property is specified in the Mapbox Style object.\n * @param {function(Array<string>):Array<string>} [getFonts=undefined] Function that\n * receives a font stack as arguments, and returns a (modified) font stack that\n * is available. Font names are the names used in the Mapbox Style object. If\n * not provided, the font stack will be used as-is. This function can also be\n * used for loading web fonts.\n * @return {StyleFunction} Style function for use in\n * `ol.layer.Vector` or `ol.layer.VectorTile`.\n */\nexport default function (olLayer, glStyle, source, resolutions, spriteData, spriteImageUrl, getFonts) {\n    if (resolutions === void 0) { resolutions = defaultResolutions; }\n    if (typeof glStyle == 'string') {\n        glStyle = JSON.parse(glStyle);\n    }\n    if (glStyle.version != 8) {\n        throw new Error('glStyle version 8 required.');\n    }\n    var spriteImage, spriteImgSize;\n    if (spriteImageUrl) {\n        if (typeof Image !== 'undefined') {\n          
   var img_1 = new Image();\n            img_1.crossOrigin = 'anonymous';\n            img_1.onload = function () {\n                spriteImage = img_1;\n                spriteImgSize = [img_1.width, img_1.height];\n                olLayer.changed();\n                img_1.onload = null;\n            };\n            img_1.src = spriteImageUrl;\n        }\n        else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { //eslint-disable-line\n            var worker = /** @type {*} */ (self);\n            // Main thread needs to handle 'loadImage' and dispatch 'imageLoaded'\n            worker.postMessage({\n                action: 'loadImage',\n                src: spriteImageUrl\n            });\n            worker.addEventListener('message', function handler(event) {\n                if (event.data.action === 'imageLoaded' && event.data.src === spriteImageUrl) {\n                    spriteImage = event.data.image;\n                    spriteImgSize 
 = [spriteImage.width, spriteImage.height];\n                }\n            });\n        }\n    }\n    var allLayers = derefLayers(glStyle.layers);\n    var layersBySourceLayer = {};\n    var mapboxLayers = [];\n    var mapboxSource;\n    for (var i = 0, ii = allLayers.length; i < ii; ++i) {\n        var layer = allLayers[i];\n        var layerId = layer.id;\n        if (typeof source == 'string' && layer.source == source ||\n            source.indexOf(layerId) !== -1) {\n            var sourceLayer = layer['source-layer'];\n            if (!mapboxSource) {\n                mapboxSource = layer.source;\n                var source_1 = glStyle.sources[mapboxSource];\n                if (!source_1) {\n                    throw new Error(\"Source \\\"\" + mapboxSource + \"\\\" is not defined\");\n                }\n                var type = source_1.type;\n                if (type !== 'vector' && type !== 'geojson') {\n                    throw new Error(\"Source \\\"\" + mapboxSource +
  \"\\\" is not of type \\\"vector\\\" or \\\"geojson\\\", but \\\"\" + type + \"\\\"\");\n                }\n            }\n            var layers = layersBySourceLayer[sourceLayer];\n            if (!layers) {\n                layers = layersBySourceLayer[sourceLayer] = [];\n            }\n            layers.push({\n                layer: layer,\n                index: i\n            });\n            mapboxLayers.push(layerId);\n        }\n        // TODO revisit when diffing gets added\n        delete functionCache[layerId];\n        delete filterCache[layerId];\n    }\n    var textHalo = new Stroke();\n    var textColor = new Fill();\n    var iconImageCache = {};\n    var patternCache = {};\n    var styles = [];\n    var styleFunction = function (feature, resolution) {\n        var properties = feature.getProperties();\n        var layers = layersBySourceLayer[properties.layer];\n        if (!layers) {\n            return;\n        }\n        var zoom = resolutions.indexOf(resolu
 tion);\n        if (zoom == -1) {\n            zoom = getZoomForResolution(resolution, resolutions);\n        }\n        var type = types[feature.getGeometry().getType()];\n        var f = {\n            properties: properties,\n            type: type\n        };\n        var stylesLength = -1;\n        var _loop_1 = function (i, ii) {\n            var layerData = layers[i];\n            var layer = layerData.layer;\n            var layerId = layer.id;\n            var layout = layer.layout || emptyObj;\n            var paint = layer.paint || emptyObj;\n            if (layout.visibility === 'none' || ('minzoom' in layer && zoom < layer.minzoom) ||\n                ('maxzoom' in layer && zoom >= layer.maxzoom)) {\n                return \"continue\";\n            }\n            var filter = layer.filter;\n            if (!filter || evaluateFilter(layerId, filter, f, zoom)) {\n                var color = void 0, opacity = void 0, fill = void 0, stroke = void 0, strokeColor = void 0, s
 tyle = void 0;\n                var index = layerData.index;\n                if (type == 3 && layer.type == 'fill') {\n                    opacity = getValue(layer, 'paint', 'fill-opacity', zoom, f);\n                    if ('fill-pattern' in paint) {\n                        var fillIcon = getValue(layer, 'paint', 'fill-pattern', zoom, f);\n                        if (fillIcon) {\n                            var icon_1 = typeof fillIcon === 'string'\n                                ? fromTemplate(fillIcon, properties)\n                                : fillIcon.toString();\n                            if (spriteImage && spriteData && spriteData[icon_1]) {\n                                ++stylesLength;\n                                style = styles[stylesLength];\n                                if (!style || !style.getFill() || style.getStroke() || style.getText()) {\n                                    style = styles[stylesLength] = new Style({\n                               
          fill: new Fill()\n                                    });\n                                }\n                                fill = style.getFill();\n                                style.setZIndex(index);\n                                var icon_cache_key = icon_1 + '.' + opacity;\n                                var pattern = patternCache[icon_cache_key];\n                                if (!pattern) {\n                                    var spriteImageData = spriteData[icon_1];\n                                    var canvas = createCanvas(spriteImageData.width, spriteImageData.height);\n                                    var ctx = /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n                                    ctx.globalAlpha = opacity;\n                                    ctx.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, 0, 0, spriteImageData.width, spriteImageData.height);\n     
                                pattern = ctx.createPattern(canvas, 'repeat');\n                                    patternCache[icon_cache_key] = pattern;\n                                }\n                                fill.setColor(pattern);\n                            }\n                        }\n                    }\n                    else {\n                        color = colorWithOpacity(getValue(layer, 'paint', 'fill-color', zoom, f), opacity);\n                        if (color) {\n                            if ('fill-outline-color' in paint) {\n                                strokeColor = colorWithOpacity(getValue(layer, 'paint', 'fill-outline-color', zoom, f), opacity);\n                            }\n                            if (!strokeColor) {\n                                strokeColor = color;\n                            }\n                            ++stylesLength;\n                            style = styles[stylesLength];\n                           
  if (!style || !(style.getFill() && style.getStroke()) || style.getText()) {\n                                style = styles[stylesLength] = new Style({\n                                    fill: new Fill(),\n                                    stroke: new Stroke()\n                                });\n                            }\n                            fill = style.getFill();\n                            fill.setColor(color);\n                            stroke = style.getStroke();\n                            stroke.setColor(strokeColor);\n                            stroke.setWidth(1);\n                            style.setZIndex(index);\n                        }\n                    }\n                }\n                if (type != 1 && layer.type == 'line') {\n                    color = !('line-pattern' in paint) && 'line-color' in paint ?\n                        colorWithOpacity(getValue(layer, 'paint', 'line-color', zoom, f), getValue(layer, 'paint', 'line-opacity',
  zoom, f)) :\n                        undefined;\n                    var width_1 = getValue(layer, 'paint', 'line-width', zoom, f);\n                    if (color && width_1 > 0) {\n                        ++stylesLength;\n                        style = styles[stylesLength];\n                        if (!style || !style.getStroke() || style.getFill() || style.getText()) {\n                            style = styles[stylesLength] = new Style({\n                                stroke: new Stroke()\n                            });\n                        }\n                        stroke = style.getStroke();\n                        stroke.setLineCap(getValue(layer, 'layout', 'line-cap', zoom, f));\n                        stroke.setLineJoin(getValue(layer, 'layout', 'line-join', zoom, f));\n                        stroke.setMiterLimit(getValue(layer, 'layout', 'line-miter-limit', zoom, f));\n                        stroke.setColor(color);\n                        stroke.setWidth(wi
 dth_1);\n                        stroke.setLineDash(paint['line-dasharray'] ?\n                            getValue(layer, 'paint', 'line-dasharray', zoom, f).map(function (x) {\n                                return x * width_1;\n                            }) : null);\n                        style.setZIndex(index);\n                    }\n                }\n                var hasImage = false;\n                var text = null;\n                var placementAngle = 0;\n                var icon = void 0, iconImg = void 0, skipLabel = void 0;\n                if ((type == 1 || type == 2) && 'icon-image' in layout) {\n                    var iconImage = getValue(layer, 'layout', 'icon-image', zoom, f);\n                    if (iconImage) {\n                        icon = typeof iconImage === 'string'\n                            ? fromTemplate(iconImage, properties)\n                            : iconImage.toString();\n                        var styleGeom = undefined;\n           
              if (spriteImage && spriteData && spriteData[icon]) {\n                            var iconRotationAlignment = getValue(layer, 'layout', 'icon-rotation-alignment', zoom, f);\n                            if (type == 2) {\n                                var geom = feature.getGeometry();\n                                // ol package and ol-debug.js only\n                                if (geom.getFlatMidpoint || geom.getFlatMidpoints) {\n                                    var extent = geom.getExtent();\n                                    var size = Math.sqrt(Math.max(Math.pow((extent[2] - extent[0]) / resolution, 2), Math.pow((extent[3] - extent[1]) / resolution, 2)));\n                                    if (size > 150) {\n                                        //FIXME Do not hard-code a size of 150\n                                        var midpoint = geom.getType() === 'MultiLineString' ? geom.getFlatMidpoints() : geom.getFlatMidpoint();\n                        
                 if (!renderFeature) {\n                                            renderFeatureCoordinates = [NaN, NaN];\n                                            renderFeature = new RenderFeature('Point', renderFeatureCoordinates, [], {}, null);\n                                        }\n                                        styleGeom = renderFeature;\n                                        renderFeatureCoordinates[0] = midpoint[0];\n                                        renderFeatureCoordinates[1] = midpoint[1];\n                                        var placement = getValue(layer, 'layout', 'symbol-placement', zoom, f);\n                                        if (placement === 'line' && iconRotationAlignment === 'map') {\n                                            var stride = geom.getStride();\n                                            var coordinates = geom.getFlatCoordinates();\n                                            for (var i_1 = 0, ii_1 = coordinates.le
 ngth - stride; i_1 < ii_1; i_1 += stride) {\n                                                var x1 = coordinates[i_1];\n                                                var y1 = coordinates[i_1 + 1];\n                                                var x2 = coordinates[i_1 + stride];\n                                                var y2 = coordinates[i_1 + stride + 1];\n                                                var minX = Math.min(x1, x2);\n                                                var minY = Math.min(y1, y2);\n                                                var maxX = Math.max(x1, x2);\n                                                var maxY = Math.max(y1, y2);\n                                                if (midpoint[0] >= minX && midpoint[0] <= maxX &&\n                                                    midpoint[1] >= minY && midpoint[1] <= maxY) {\n                                                    placementAngle = Math.atan2(y1 - y2, x2 - x1);\n            
                                         break;\n                                                }\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                            if (type !== 2 || styleGeom) {\n                                ++stylesLength;\n                                style = styles[stylesLength];\n                                if (!style || !style.getImage() || style.getFill() || style.getStroke()) {\n                                    style = styles[stylesLength] = new Style();\n                                }\n                                style.setGeometry(styleGeom);\n                                var iconSize = getValue(layer, 'layout', 'icon-size', zoom, f);\n                                var iconColor = paint['icon-color'] !== undefined ? getValue(layer, 'paint', 'icon-color', zoom, f) : null;\n      
                           var icon_cache_key = icon + '.' + iconSize;\n                                if (iconColor !== null) {\n                                    icon_cache_key += '.' + iconColor;\n                                }\n                                iconImg = iconImageCache[icon_cache_key];\n                                if (!iconImg) {\n                                    var spriteImageData = spriteData[icon];\n                                    if (iconColor !== null) {\n                                        // cut out the sprite and color it\n                                        var canvas = createCanvas(spriteImageData.width, spriteImageData.height);\n                                        var ctx = /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n                                        ctx.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, 0, 0, spriteImageData.width, sprite
 ImageData.height);\n                                        var data = ctx.getImageData(0, 0, canvas.width, canvas.height);\n                                        for (var c = 0, cc = data.data.length; c < cc; c += 4) {\n                                            var a = iconColor.a;\n                                            if (a !== 0) {\n                                                data.data[c] = iconColor.r * 255 / a;\n                                                data.data[c + 1] = iconColor.g * 255 / a;\n                                                data.data[c + 2] = iconColor.b * 255 / a;\n                                            }\n                                            data.data[c + 3] = a;\n                                        }\n                                        ctx.putImageData(data, 0, 0);\n                                        iconImg = iconImageCache[icon_cache_key] = new Icon({\n                                            img: canvas,
 \n                                            imgSize: [canvas.width, canvas.height],\n                                            scale: iconSize / spriteImageData.pixelRatio\n                                        });\n                                    }\n                                    else {\n                                        iconImg = iconImageCache[icon_cache_key] = new Icon({\n                                            img: spriteImage,\n                                            imgSize: spriteImgSize,\n                                            size: [spriteImageData.width, spriteImageData.height],\n                                            offset: [spriteImageData.x, spriteImageData.y],\n                                            rotateWithView: iconRotationAlignment === 'map',\n                                            scale: iconSize / spriteImageData.pixelRatio\n                                        });\n                                    }\n    
                             }\n                                iconImg.setRotation(placementAngle + deg2rad(getValue(layer, 'layout', 'icon-rotate', zoom, f)));\n                                iconImg.setOpacity(getValue(layer, 'paint', 'icon-opacity', zoom, f));\n                                iconImg.setAnchor(anchor[getValue(layer, 'layout', 'icon-anchor', zoom, f)]);\n                                style.setImage(iconImg);\n                                text = style.getText();\n                                style.setText(undefined);\n                                style.setZIndex(index);\n                                hasImage = true;\n                                skipLabel = false;\n                            }\n                            else {\n                                skipLabel = true;\n                            }\n                        }\n                    }\n                }\n                if (type == 1 && 'circle-radius' in paint) {\n       
              ++stylesLength;\n                    style = styles[stylesLength];\n                    if (!style || !style.getImage() || style.getFill() || style.getStroke()) {\n                        style = styles[stylesLength] = new Style();\n                    }\n                    var circleRadius = getValue(layer, 'paint', 'circle-radius', zoom, f);\n                    var circleStrokeColor = colorWithOpacity(getValue(layer, 'paint', 'circle-stroke-color', zoom, f), getValue(layer, 'paint', 'circle-stroke-opacity', zoom, f));\n                    var circleColor = colorWithOpacity(getValue(layer, 'paint', 'circle-color', zoom, f), getValue(layer, 'paint', 'circle-opacity', zoom, f));\n                    var circleStrokeWidth = getValue(layer, 'paint', 'circle-stroke-width', zoom, f);\n                    var cache_key = circleRadius + '.' + circleStrokeColor + '.' +\n                        circleColor + '.' + circleStrokeWidth;\n                    iconImg = iconImageCach
 e[cache_key];\n                    if (!iconImg) {\n                        iconImg = iconImageCache[cache_key] = new Circle({\n                            radius: circleRadius,\n                            stroke: circleStrokeColor && circleStrokeWidth > 0 ? new Stroke({\n                                width: circleStrokeWidth,\n                                color: circleStrokeColor\n                            }) : undefined,\n                            fill: circleColor ? new Fill({\n                                color: circleColor\n                            }) : undefined\n                        });\n                    }\n                    style.setImage(iconImg);\n                    text = style.getText();\n                    style.setText(undefined);\n                    style.setGeometry(undefined);\n                    style.setZIndex(index);\n                    hasImage = true;\n                }\n                var label = void 0;\n                if ('text
 -field' in layout) {\n                    var textField = getValue(layer, 'layout', 'text-field', zoom, f).toString();\n                    label = fromTemplate(textField, properties).trim();\n                    opacity = getValue(layer, 'paint', 'text-opacity', zoom, f);\n                }\n                if (label && opacity && !skipLabel) {\n                    if (!hasImage) {\n                        ++stylesLength;\n                        style = styles[stylesLength];\n                        if (!style || !style.getText() || style.getFill() || style.getStroke()) {\n                            style = styles[stylesLength] = new Style();\n                        }\n                        style.setImage(undefined);\n                        style.setGeometry(undefined);\n                    }\n                    if (!style.getText()) {\n                        style.setText(text || new Text({\n                            padding: [2, 2, 2, 2]\n                        }));\n 
                    }\n                    text = style.getText();\n                    var textSize = Math.round(getValue(layer, 'layout', 'text-size', zoom, f));\n                    var fontArray = getValue(layer, 'layout', 'text-font', zoom, f);\n                    var textLineHeight = getValue(layer, 'layout', 'text-line-height', zoom, f);\n                    var font = mb2css(getFonts ? getFonts(fontArray) : fontArray, textSize, textLineHeight);\n                    var textTransform = layout['text-transform'];\n                    if (textTransform == 'uppercase') {\n                        label = label.toUpperCase();\n                    }\n                    else if (textTransform == 'lowercase') {\n                        label = label.toLowerCase();\n                    }\n                    var maxTextWidth = getValue(layer, 'layout', 'text-max-width', zoom, f);\n                    var letterSpacing = getValue(layer, 'layout', 'text-letter-spacing', zoom, f);\n     
                var wrappedLabel = type == 2 ? applyLetterSpacing(label, letterSpacing) : wrapText(label, font, maxTextWidth, letterSpacing);\n                    text.setText(wrappedLabel);\n                    text.setFont(font);\n                    text.setRotation(deg2rad(getValue(layer, 'layout', 'text-rotate', zoom, f)));\n                    var textAnchor = getValue(layer, 'layout', 'text-anchor', zoom, f);\n                    var placement = (hasImage || type == 1) ? 'point' : getValue(layer, 'layout', 'symbol-placement', zoom, f);\n                    text.setPlacement(placement);\n                    var textHaloWidth = getValue(layer, 'paint', 'text-halo-width', zoom, f);\n                    var textOffset = getValue(layer, 'layout', 'text-offset', zoom, f);\n                    var textTranslate = getValue(layer, 'paint', 'text-translate', zoom, f);\n                    // Text offset has to take halo width and line height into account\n                    var vOffset
  = 0;\n                    var hOffset = 0;\n                    if (placement == 'point') {\n                        var textAlign = 'center';\n                        if (textAnchor.indexOf('left') !== -1) {\n                            textAlign = 'left';\n                            hOffset = textHaloWidth;\n                        }\n                        else if (textAnchor.indexOf('right') !== -1) {\n                            textAlign = 'right';\n                            hOffset = -textHaloWidth;\n                        }\n                        text.setTextAlign(textAlign);\n                        var textRotationAlignment = getValue(layer, 'layout', 'text-rotation-alignment', zoom, f);\n                        text.setRotateWithView(textRotationAlignment == 'map');\n                    }\n                    else {\n                        text.setMaxAngle(deg2rad(getValue(layer, 'layout', 'text-max-angle', zoom, f)) * label.length / wrappedLabel.length);\n      
                   text.setTextAlign();\n                        text.setRotateWithView(false);\n                    }\n                    var textBaseline = 'middle';\n                    if (textAnchor.indexOf('bottom') == 0) {\n                        textBaseline = 'bottom';\n                        vOffset = -textHaloWidth - (0.5 * (textLineHeight - 1)) * textSize;\n                    }\n                    else if (textAnchor.indexOf('top') == 0) {\n                        textBaseline = 'top';\n                        vOffset = textHaloWidth + (0.5 * (textLineHeight - 1)) * textSize;\n                    }\n                    text.setTextBaseline(textBaseline);\n                    text.setOffsetX(textOffset[0] * textSize + hOffset + textTranslate[0]);\n                    text.setOffsetY(textOffset[1] * textSize + vOffset + textTranslate[1]);\n                    textColor.setColor(colorWithOpacity(getValue(layer, 'paint', 'text-color', zoom, f), opacity));\n              
       text.setFill(textColor);\n                    var haloColor = colorWithOpacity(getValue(layer, 'paint', 'text-halo-color', zoom, f), opacity);\n                    if (haloColor) {\n                        textHalo.setColor(haloColor);\n                        // spec here : https://docs.mapbox.com/mapbox-gl-js/style-spec/#paint-symbol-text-halo-width\n                        // Halo width must be doubled because it is applied around the center of the text outline\n                        textHaloWidth *= 2;\n                        // 1/4 of text size (spec) x 2\n                        var halfTextSize = 0.5 * textSize;\n                        textHalo.setWidth(textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize);\n                        text.setStroke(textHalo);\n                    }\n                    else {\n                        text.setStroke(undefined);\n                    }\n                    var textPadding = getValue(layer, 'layout', 'text-padding
 ', zoom, f);\n                    var padding = text.getPadding();\n                    if (textPadding !== padding[0]) {\n                        padding[0] = padding[1] = padding[2] = padding[3] = textPadding;\n                    }\n                    style.setZIndex(index);\n                }\n            }\n        };\n        for (var i = 0, ii = layers.length; i < ii; ++i) {\n            _loop_1(i, ii);\n        }\n        if (stylesLength > -1) {\n            styles.length = stylesLength + 1;\n            return styles;\n        }\n    };\n    olLayer.setStyle(styleFunction);\n    olLayer.set('mapbox-source', mapboxSource);\n    olLayer.set('mapbox-layers', mapboxLayers);\n    return styleFunction;\n}\nexport { colorWithOpacity as _colorWithOpacity, filterCache as _filterCache, evaluateFilter as _evaluateFilter, fromTemplate as _fromTemplate, getValue as _getValue, functionCache as _functionCache };\n//# sourceMappingURL=stylefunction.js.map","var __extends = (this && this.
 __extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/GeometryCollection\n */\nimport EventType from '../events/EventType.js';\nimport Geometry from './Geometry.js';\nimport GeometryType from './GeometryType.js';\nimport { closestSquaredDistanceXY, createOrUpdateEmpty, extend, getCenter, } from '../extent.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @classdesc\n * An array of {@link module:ol/geom/Geometry} objects.\n *\n * @api\n
  */\nvar GeometryCollection = /** @class */ (function (_super) {\n    __extends(GeometryCollection, _super);\n    /**\n     * @param {Array<Geometry>=} opt_geometries Geometries.\n     */\n    function GeometryCollection(opt_geometries) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {Array<Geometry>}\n         */\n        _this.geometries_ = opt_geometries ? opt_geometries : null;\n        /**\n         * @type {Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.changeEventsKeys_ = [];\n        _this.listenGeometriesChange_();\n        return _this;\n    }\n    /**\n     * @private\n     */\n    GeometryCollection.prototype.unlistenGeometriesChange_ = function () {\n        this.changeEventsKeys_.forEach(unlistenByKey);\n        this.changeEventsKeys_.length = 0;\n    };\n    /**\n     * @private\n     */\n    GeometryCollection.prototype.listenGeometriesChange_ = function () {\n        if (!this.geometries_)
  {\n            return;\n        }\n        for (var i = 0, ii = this.geometries_.length; i < ii; ++i) {\n            this.changeEventsKeys_.push(listen(this.geometries_[i], EventType.CHANGE, this.changed, this));\n        }\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!GeometryCollection} Clone.\n     * @api\n     */\n    GeometryCollection.prototype.clone = function () {\n        var geometryCollection = new GeometryCollection(null);\n        geometryCollection.setGeometries(this.geometries_);\n        return geometryCollection;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    GeometryCollection.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance <
  closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            minSquaredDistance = geometries[i].closestPointXY(x, y, closestPoint, minSquaredDistance);\n        }\n        return minSquaredDistance;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    GeometryCollection.prototype.containsXY = function (x, y) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            if (geometries[i].containsXY(x, y)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    GeometryCollection.protot
 ype.computeExtent = function (extent) {\n        createOrUpdateEmpty(extent);\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            extend(extent, geometries[i].getExtent());\n        }\n        return extent;\n    };\n    /**\n     * Return the geometries that make up this geometry collection.\n     * @return {Array<Geometry>} Geometries.\n     * @api\n     */\n    GeometryCollection.prototype.getGeometries = function () {\n        return cloneGeometries(this.geometries_);\n    };\n    /**\n     * @return {Array<Geometry>} Geometries.\n     */\n    GeometryCollection.prototype.getGeometriesArray = function () {\n        return this.geometries_;\n    };\n    /**\n     * @return {Array<Geometry>} Geometries.\n     */\n    GeometryCollection.prototype.getGeometriesArrayRecursive = function () {\n        /** @type {Array<Geometry>} */\n        var geometriesArray = [];\n        var geometries = this.geometries_;\n      
   for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            if (geometries[i].getType() === this.getType()) {\n                geometriesArray = geometriesArray.concat(\n                /** @type {GeometryCollection} */ (geometries[i]).getGeometriesArrayRecursive());\n            }\n            else {\n                geometriesArray.push(geometries[i]);\n            }\n        }\n        return geometriesArray;\n    };\n    /**\n     * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {GeometryCollection} Simplified GeometryCollection.\n     */\n    GeometryCollection.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        if (this.simplifiedGeometryRevision !== this.getRevision()) {\n            this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n            this.simplifiedGeometryRevision = this.getRevision();\n        }\n        if (squaredTolera
 nce < 0 ||\n            (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n                squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)) {\n            return this;\n        }\n        var simplifiedGeometries = [];\n        var geometries = this.geometries_;\n        var simplified = false;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            var geometry = geometries[i];\n            var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);\n            simplifiedGeometries.push(simplifiedGeometry);\n            if (simplifiedGeometry !== geometry) {\n                simplified = true;\n            }\n        }\n        if (simplified) {\n            var simplifiedGeometryCollection = new GeometryCollection(null);\n            simplifiedGeometryCollection.setGeometriesArray(simplifiedGeometries);\n            return simplifiedGeometryCollection;\n        }\n        else {\n            this.simplifiedGeometryMaxMin
 SquaredTolerance = squaredTolerance;\n            return this;\n        }\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    GeometryCollection.prototype.getType = function () {\n        return GeometryType.GEOMETRY_COLLECTION;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    GeometryCollection.prototype.intersectsExtent = function (extent) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            if (geometries[i].intersectsExtent(extent)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    GeometryCollection.prototype.isEmpty = f
 unction () {\n        return this.geometries_.length === 0;\n    };\n    /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n     * coordinates in place.\n     * @param {number} angle Rotation angle in radians.\n     * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    GeometryCollection.prototype.rotate = function (angle, anchor) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].rotate(angle, anchor);\n        }\n        this.changed();\n    };\n    /**\n     * Scale the geometry (with an optional origin).  This modifies the geometry\n     * coordinates in place.\n     * @abstract\n     * @param {number} sx The scaling factor in the x-direction.\n     * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor The scale 
 origin (defaults to the center\n     *     of the geometry extent).\n     * @api\n     */\n    GeometryCollection.prototype.scale = function (sx, opt_sy, opt_anchor) {\n        var anchor = opt_anchor;\n        if (!anchor) {\n            anchor = getCenter(this.getExtent());\n        }\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].scale(sx, opt_sy, anchor);\n        }\n        this.changed();\n    };\n    /**\n     * Set the geometries that make up this geometry collection.\n     * @param {Array<Geometry>} geometries Geometries.\n     * @api\n     */\n    GeometryCollection.prototype.setGeometries = function (geometries) {\n        this.setGeometriesArray(cloneGeometries(geometries));\n    };\n    /**\n     * @param {Array<Geometry>} geometries Geometries.\n     */\n    GeometryCollection.prototype.setGeometriesArray = function (geometries) {\n        this.unlistenGeometriesChange_();\n        
 this.geometries_ = geometries;\n        this.listenGeometriesChange_();\n        this.changed();\n    };\n    /**\n     * Apply a transform function to the coordinates of the geometry.\n     * The geometry is modified in place.\n     * If you do not want the geometry modified in place, first `clone()` it and\n     * then use this function on the clone.\n     * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n     * Called with a flat array of geometry coordinates.\n     * @api\n     */\n    GeometryCollection.prototype.applyTransform = function (transformFn) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].applyTransform(transformFn);\n        }\n        this.changed();\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @param {numbe
 r} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api\n     */\n    GeometryCollection.prototype.translate = function (deltaX, deltaY) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].translate(deltaX, deltaY);\n        }\n        this.changed();\n    };\n    /**\n     * Clean up.\n     */\n    GeometryCollection.prototype.disposeInternal = function () {\n        this.unlistenGeometriesChange_();\n        _super.prototype.disposeInternal.call(this);\n    };\n    return GeometryCollection;\n}(Geometry));\n/**\n * @param {Array<Geometry>} geometries Geometries.\n * @return {Array<Geometry>} Cloned geometries.\n */\nfunction cloneGeometries(geometries) {\n    var clonedGeometries = [];\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n        clonedGeometries.push(geometries[i].clone());\n    }\n    return clonedGeometries;\n}\nexport default GeometryCollection;\n//# sou
 rceMappingURL=GeometryCollection.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/JSONFeature\n */\nimport FeatureFormat from './Feature.js';\nimport FormatType from './FormatType.js';\nimport { abstract } from '../util.js';\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for JSON feature formats.\n *\n * @abstract\n */\n
 var JSONFeature = /** @class */ (function (_super) {\n    __extends(JSONFeature, _super);\n    function JSONFeature() {\n        return _super.call(this) || this;\n    }\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    JSONFeature.prototype.getType = function () {\n        return FormatType.JSON;\n    };\n    /**\n     * Read a feature.  Only works for a single feature. Use `readFeatures` to\n     * read a feature collection.\n     *\n     * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     * @api\n     */\n    JSONFeature.prototype.readFeature = function (source, opt_options) {\n        return this.readFeatureFromObject(getObject(source), this.getReadOptions(source, opt_options));\n    };\n    /**\n     * Read all features.  Works with both a single feature and a feature\n     * colle
 ction.\n     *\n     * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     * @api\n     */\n    JSONFeature.prototype.readFeatures = function (source, opt_options) {\n        return this.readFeaturesFromObject(getObject(source), this.getReadOptions(source, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    JSONFeature.prototype.readFeatureFromObject = function (object, opt_options) {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<i
 mport(\"../Feature.js\").default>} Features.\n     */\n    JSONFeature.prototype.readFeaturesFromObject = function (object, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read a geometry.\n     *\n     * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     * @api\n     */\n    JSONFeature.prototype.readGeometry = function (source, opt_options) {\n        return this.readGeometryFromObject(getObject(source), this.getReadOptions(source, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    JSONFeature.prototype.readGeometryFromObject = function (object, opt_options) {\n        return a
 bstract();\n    };\n    /**\n     * Read the projection.\n     *\n     * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    JSONFeature.prototype.readProjection = function (source) {\n        return this.readProjectionFromObject(getObject(source));\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    JSONFeature.prototype.readProjectionFromObject = function (object) {\n        return abstract();\n    };\n    /**\n     * Encode a feature as string.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded feature.\n     * @api\n     */\n    JSONFeature.prototype.writeFeature = function (feature, opt_options) {\n    
     return JSON.stringify(this.writeFeatureObject(feature, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {Object} Object.\n     */\n    JSONFeature.prototype.writeFeatureObject = function (feature, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode an array of features as string.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded features.\n     * @api\n     */\n    JSONFeature.prototype.writeFeatures = function (features, opt_options) {\n        return JSON.stringify(this.writeFeaturesObject(features, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {i
 mport(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {Object} Object.\n     */\n    JSONFeature.prototype.writeFeaturesObject = function (features, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode a geometry as string.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded geometry.\n     * @api\n     */\n    JSONFeature.prototype.writeGeometry = function (geometry, opt_options) {\n        return JSON.stringify(this.writeGeometryObject(geometry, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {Object} Object.\n     */\n    JSONFeature.prototype.writeGeometryObject = function (geometry, opt_options) {\n        ret
 urn abstract();\n    };\n    return JSONFeature;\n}(FeatureFormat));\n/**\n * @param {Document|Element|Object|string} source Source.\n * @return {Object} Object.\n */\nfunction getObject(source) {\n    if (typeof source === 'string') {\n        var object = JSON.parse(source);\n        return object ? /** @type {Object} */ (object) : null;\n    }\n    else if (source !== null) {\n        return source;\n    }\n    else {\n        return null;\n    }\n}\nexport default JSONFeature;\n//# sourceMappingURL=JSONFeature.js.map","/**\n * @module ol/format/GeoJSON\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStat
 ics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Feature from '../Feature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport { assert } from '../asserts.js';\nimport { assign, isEmpty } from '../obj.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {import(\"geojson\").GeoJSON} GeoJSONObject\n * @typedef {import(\"geojson\").Feature} GeoJSONFeature\n * @typedef 
 {import(\"geojson\").FeatureCollection} GeoJSONFeatureCollection\n * @typedef {import(\"geojson\").Geometry} GeoJSONGeometry\n * @typedef {import(\"geojson\").Point} GeoJSONPoint\n * @typedef {import(\"geojson\").LineString} GeoJSONLineString\n * @typedef {import(\"geojson\").Polygon} GeoJSONPolygon\n * @typedef {import(\"geojson\").MultiPoint} GeoJSONMultiPoint\n * @typedef {import(\"geojson\").MultiLineString} GeoJSONMultiLineString\n * @typedef {import(\"geojson\").MultiPolygon} GeoJSONMultiPolygon\n * @typedef {import(\"geojson\").GeometryCollection} GeoJSONGeometryCollection\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection for features read or\n * written by the format.  Options passed to read or write methods will take precedence.\n * @property {string} [geometryName] Geometry name to use when cr
 eating features.\n * @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include\n * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader\n * will look for that field to set the geometry name. If both this field is set to `true`\n * and a `geometryName` is provided, the `geometryName` will take precedence.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the GeoJSON format.\n *\n * @api\n */\nvar GeoJSON = /** @class */ (function (_super) {\n    __extends(GeoJSON, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function GeoJSON(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this) || this;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection(options.dataProjection ? options.dataProjection : 'EPSG:4326');\n        if (
 options.featureProjection) {\n            _this.defaultFeatureProjection = getProjection(options.featureProjection);\n        }\n        /**\n         * Name of the geometry attribute for features.\n         * @type {string|undefined}\n         * @private\n         */\n        _this.geometryName_ = options.geometryName;\n        /**\n         * Look for the geometry name in the feature GeoJSON\n         * @type {boolean|undefined}\n         * @private\n         */\n        _this.extractGeometryName_ = options.extractGeometryName;\n        return _this;\n    }\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    GeoJSON.prototype.readFeatureFromObject = function (object, opt_options) {\n        /**\n         * @type {GeoJSONFeature}\n         */\n        var geoJSONFeature = null;\n        if (object['type'] === 'Fea
 ture') {\n            geoJSONFeature = /** @type {GeoJSONFeature} */ (object);\n        }\n        else {\n            geoJSONFeature = {\n                'type': 'Feature',\n                'geometry': /** @type {GeoJSONGeometry} */ (object),\n                'properties': null,\n            };\n        }\n        var geometry = readGeometry(geoJSONFeature['geometry'], opt_options);\n        var feature = new Feature();\n        if (this.geometryName_) {\n            feature.setGeometryName(this.geometryName_);\n        }\n        else if (this.extractGeometryName_ &&\n            'geometry_name' in geoJSONFeature !== undefined) {\n            feature.setGeometryName(geoJSONFeature['geometry_name']);\n        }\n        feature.setGeometry(geometry);\n        if ('id' in geoJSONFeature) {\n            feature.setId(geoJSONFeature['id']);\n        }\n        if (geoJSONFeature['properties']) {\n            feature.setProperties(geoJSONFeature['properties'], true);\n        }\n      
   return feature;\n    };\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    GeoJSON.prototype.readFeaturesFromObject = function (object, opt_options) {\n        var geoJSONObject = /** @type {GeoJSONObject} */ (object);\n        /** @type {Array<import(\"../Feature.js\").default>} */\n        var features = null;\n        if (geoJSONObject['type'] === 'FeatureCollection') {\n            var geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object);\n            features = [];\n            var geoJSONFeatures = geoJSONFeatureCollection['features'];\n            for (var i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {\n                features.push(this.readFeatureFromObject(geoJSONFeatures[i], opt_options));\n            }\n        }\n        else {\n            features = [this.readFeatureFromObject(object, op
 t_options)];\n        }\n        return features;\n    };\n    /**\n     * @param {GeoJSONGeometry} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    GeoJSON.prototype.readGeometryFromObject = function (object, opt_options) {\n        return readGeometry(object, opt_options);\n    };\n    /**\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    GeoJSON.prototype.readProjectionFromObject = function (object) {\n        var crs = object['crs'];\n        var projection;\n        if (crs) {\n            if (crs['type'] == 'name') {\n                projection = getProjection(crs['properties']['name']);\n            }\n            else if (crs['type'] === 'EPSG') {\n                projection = getProjection('EPSG:' + crs['properties']['code']);\n        
     }\n            else {\n                assert(false, 36); // Unknown SRS type\n            }\n        }\n        else {\n            projection = this.dataProjection;\n        }\n        return /** @type {import(\"../proj/Projection.js\").default} */ (projection);\n    };\n    /**\n     * Encode a feature as a GeoJSON Feature object.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {GeoJSONFeature} Object.\n     * @api\n     */\n    GeoJSON.prototype.writeFeatureObject = function (feature, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        /** @type {GeoJSONFeature} */\n        var object = {\n            'type': 'Feature',\n            geometry: null,\n            properties: null,\n        };\n        var id = feature.getId();\n        if (id !== undefined) {\n            object.id = id;\n        }\n        if (!feature.hasPr
 operties()) {\n            return object;\n        }\n        var properties = feature.getProperties();\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            object.geometry = writeGeometry(geometry, opt_options);\n            delete properties[feature.getGeometryName()];\n        }\n        if (!isEmpty(properties)) {\n            object.properties = properties;\n        }\n        return object;\n    };\n    /**\n     * Encode an array of features as a GeoJSON object.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {GeoJSONFeatureCollection} GeoJSON Object.\n     * @api\n     */\n    GeoJSON.prototype.writeFeaturesObject = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var objects = [];\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            objec
 ts.push(this.writeFeatureObject(features[i], opt_options));\n        }\n        return {\n            type: 'FeatureCollection',\n            features: objects,\n        };\n    };\n    /**\n     * Encode a geometry as a GeoJSON object.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.\n     * @api\n     */\n    GeoJSON.prototype.writeGeometryObject = function (geometry, opt_options) {\n        return writeGeometry(geometry, this.adaptOptions(opt_options));\n    };\n    return GeoJSON;\n}(JSONFeature));\n/**\n * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, opt_options) {\n    if (!object) {\n        return 
 null;\n    }\n    /**\n     * @type {import(\"../geom/Geometry.js\").default}\n     */\n    var geometry;\n    switch (object['type']) {\n        case GeometryType.POINT: {\n            geometry = readPointGeometry(/** @type {GeoJSONPoint} */ (object));\n            break;\n        }\n        case GeometryType.LINE_STRING: {\n            geometry = readLineStringGeometry(\n            /** @type {GeoJSONLineString} */ (object));\n            break;\n        }\n        case GeometryType.POLYGON: {\n            geometry = readPolygonGeometry(/** @type {GeoJSONPolygon} */ (object));\n            break;\n        }\n        case GeometryType.MULTI_POINT: {\n            geometry = readMultiPointGeometry(\n            /** @type {GeoJSONMultiPoint} */ (object));\n            break;\n        }\n        case GeometryType.MULTI_LINE_STRING: {\n            geometry = readMultiLineStringGeometry(\n            /** @type {GeoJSONMultiLineString} */ (object));\n            break;\n        }\n       
  case GeometryType.MULTI_POLYGON: {\n            geometry = readMultiPolygonGeometry(\n            /** @type {GeoJSONMultiPolygon} */ (object));\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            geometry = readGeometryCollectionGeometry(\n            /** @type {GeoJSONGeometryCollection} */ (object));\n            break;\n        }\n        default: {\n            throw new Error('Unsupported GeoJSON type: ' + object.type);\n        }\n    }\n    return transformGeometryWithOptions(geometry, false, opt_options);\n}\n/**\n * @param {GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {GeometryCollection} Geometry collection.\n */\nfunction readGeometryCollectionGeometry(object, opt_options) {\n    var geometries = object['geometries'].map(\n    /**\n     * @param {GeoJSONGeometry} geometry Geometry.\n     * @return {import(\"../geom/Geometry.js\").default} geomet
 ry Geometry.\n     */\n    function (geometry) {\n        return readGeometry(geometry, opt_options);\n    });\n    return new GeometryCollection(geometries);\n}\n/**\n * @param {GeoJSONPoint} object Object.\n * @return {Point} Point.\n */\nfunction readPointGeometry(object) {\n    return new Point(object['coordinates']);\n}\n/**\n * @param {GeoJSONLineString} object Object.\n * @return {LineString} LineString.\n */\nfunction readLineStringGeometry(object) {\n    return new LineString(object['coordinates']);\n}\n/**\n * @param {GeoJSONMultiLineString} object Object.\n * @return {MultiLineString} MultiLineString.\n */\nfunction readMultiLineStringGeometry(object) {\n    return new MultiLineString(object['coordinates']);\n}\n/**\n * @param {GeoJSONMultiPoint} object Object.\n * @return {MultiPoint} MultiPoint.\n */\nfunction readMultiPointGeometry(object) {\n    return new MultiPoint(object['coordinates']);\n}\n/**\n * @param {GeoJSONMultiPolygon} object Object.\n * @return {MultiPoly
 gon} MultiPolygon.\n */\nfunction readMultiPolygonGeometry(object) {\n    return new MultiPolygon(object['coordinates']);\n}\n/**\n * @param {GeoJSONPolygon} object Object.\n * @return {Polygon} Polygon.\n */\nfunction readPolygonGeometry(object) {\n    return new Polygon(object['coordinates']);\n}\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeGeometry(geometry, opt_options) {\n    geometry = transformGeometryWithOptions(geometry, true, opt_options);\n    var type = geometry.getType();\n    /** @type {GeoJSONGeometry} */\n    var geoJSON;\n    switch (type) {\n        case GeometryType.POINT: {\n            geoJSON = writePointGeometry(\n            /** @type {Point} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.LINE_STRING: {\n            geoJSON = writeLineStringGeo
 metry(\n            /** @type {LineString} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.POLYGON: {\n            geoJSON = writePolygonGeometry(\n            /** @type {Polygon} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.MULTI_POINT: {\n            geoJSON = writeMultiPointGeometry(\n            /** @type {MultiPoint} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.MULTI_LINE_STRING: {\n            geoJSON = writeMultiLineStringGeometry(\n            /** @type {MultiLineString} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.MULTI_POLYGON: {\n            geoJSON = writeMultiPolygonGeometry(\n            /** @type {MultiPolygon} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            geoJSON = writeGeometryCollectionGeometry(\n            /** @type {Geometry
 Collection} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.CIRCLE: {\n            geoJSON = {\n                type: 'GeometryCollection',\n                geometries: [],\n            };\n            break;\n        }\n        default: {\n            throw new Error('Unsupported geometry type: ' + type);\n        }\n    }\n    return geoJSON;\n}\n/**\n * @param {GeometryCollection} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.\n */\nfunction writeGeometryCollectionGeometry(geometry, opt_options) {\n    var geometries = geometry.getGeometriesArray().map(function (geometry) {\n        var options = assign({}, opt_options);\n        delete options.featureProjection;\n        return writeGeometry(geometry, options);\n    });\n    return {\n        type: 'GeometryCollection',\n        geometries: geometries,\n    };\n}\n/**\n * 
 @param {LineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeLineStringGeometry(geometry, opt_options) {\n    return {\n        type: 'LineString',\n        coordinates: geometry.getCoordinates(),\n    };\n}\n/**\n * @param {MultiLineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiLineStringGeometry(geometry, opt_options) {\n    return {\n        type: 'MultiLineString',\n        coordinates: geometry.getCoordinates(),\n    };\n}\n/**\n * @param {MultiPoint} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPointGeometry(geometry, opt_options) {\n    return {\n        type: 'MultiPoint',\n        coordinates: geo
 metry.getCoordinates(),\n    };\n}\n/**\n * @param {MultiPolygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, opt_options) {\n    var right;\n    if (opt_options) {\n        right = opt_options.rightHanded;\n    }\n    return {\n        type: 'MultiPolygon',\n        coordinates: geometry.getCoordinates(right),\n    };\n}\n/**\n * @param {Point} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePointGeometry(geometry, opt_options) {\n    return {\n        type: 'Point',\n        coordinates: geometry.getCoordinates(),\n    };\n}\n/**\n * @param {Polygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeP
 olygonGeometry(geometry, opt_options) {\n    var right;\n    if (opt_options) {\n        right = opt_options.rightHanded;\n    }\n    return {\n        type: 'Polygon',\n        coordinates: geometry.getCoordinates(right),\n    };\n}\nexport default GeoJSON;\n//# sourceMappingURL=GeoJSON.js.map","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\nimport mb2css from 'mapbox-to-css-font';\nimport applyStyleFunction, { getValue } from './stylefunction';\nimport googleFonts from 'webfont-matcher/lib/fonts/google';\nimport { fromLonLat } from 'ol/proj';\nimport { createXYZ } from 'ol/tilegrid';\nimport TileGrid from 'ol/tilegrid/TileGrid';\nimport Map from 'ol/Map';\nimport View from 'ol/View';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport MVT from 'ol/format/MVT';\nimport { assign } from 'ol/obj';\nimport { unByKey } from 'ol/Obs
 ervable';\nimport TileLayer from 'ol/layer/Tile';\nimport VectorLayer from 'ol/layer/Vector';\nimport VectorTileLayer from 'ol/layer/VectorTile';\nimport TileJSON from 'ol/source/TileJSON';\nimport VectorSource from 'ol/source/Vector';\nimport VectorTileSource from 'ol/source/VectorTile';\nimport { Color } from '@mapbox/mapbox-gl-style-spec';\nimport { defaultResolutions } from './util';\n/**\n * @typedef {import(\"ol/Map\").default} PluggableMap\n * @typedef {import(\"ol/layer/Layer\").default} Layer\n * @typedef {import(\"ol/source/Source\").default} Source\n * @private\n */\nvar tilejsonCache = {};\nvar fontFamilyRegEx = /font-family: ?([^;]*);/;\nvar stripQuotesRegEx = /(\"|')/g;\nvar loadedFontFamilies;\nfunction hasFontFamily(family) {\n    if (!loadedFontFamilies) {\n        loadedFontFamilies = {};\n        var styleSheets = document.styleSheets;\n        for (var i = 0, ii = styleSheets.length; i < ii; ++i) {\n            var styleSheet = /** @type {CSSStyleSheet} */ (style
 Sheets[i]);\n            try {\n                var cssRules = styleSheet.rules || styleSheet.cssRules;\n                if (cssRules) {\n                    for (var j = 0, jj = cssRules.length; j < jj; ++j) {\n                        var cssRule = cssRules[j];\n                        if (cssRule.type == 5) {\n                            var match = cssRule.cssText.match(fontFamilyRegEx);\n                            loadedFontFamilies[match[1].replace(stripQuotesRegEx, '')] = true;\n                        }\n                    }\n                }\n            }\n            catch (e) {\n                // empty catch block\n            }\n        }\n    }\n    return family in loadedFontFamilies;\n}\nvar processedFontFamilies = {};\nvar googleFamilies = googleFonts.getNames();\n/**\n * @private\n * @param {Array} fonts Fonts.\n * @return {Array} Processed fonts.\n */\nfunction getFonts(fonts) {\n    var fontsKey = fonts.toString();\n    if (fontsKey in processedFontFamilies) {
 \n        return fonts;\n    }\n    var googleFontDescriptions = fonts.map(function (font) {\n        var parts = mb2css(font, 1).split(' ');\n        return [parts.slice(3).join(' ').replace(/\"/g, ''), parts[1] + parts[0]];\n    });\n    for (var i = 0, ii = googleFontDescriptions.length; i < ii; ++i) {\n        var googleFontDescription = googleFontDescriptions[i];\n        var family = googleFontDescription[0];\n        if (!hasFontFamily(family) && googleFamilies.indexOf(family) !== -1) {\n            var fontUrl = 'https://fonts.googleapis.com/css?family=' + family.replace(/ /g, '+') + ':' + googleFontDescription[1];\n            if (!document.querySelector('link[href=\"' + fontUrl + '\"]')) {\n                var markup = document.createElement('link');\n                markup.href = fontUrl;\n                markup.rel = 'stylesheet';\n                document.head.appendChild(markup);\n            }\n        }\n    }\n    processedFontFamilies[fontsKey] = true;\n    return 
 fonts;\n}\nvar spriteRegEx = /^(.*)(\\?.*)$/;\nfunction withPath(url, path) {\n    if (path && url.indexOf('.') === 0) {\n        url = path + url;\n    }\n    return url;\n}\nfunction toSpriteUrl(url, path, extension) {\n    url = withPath(url, path);\n    var parts = url.match(spriteRegEx);\n    return parts ?\n        parts[1] + extension + (parts.length > 2 ? parts[2] : '') :\n        url + extension;\n}\n/**\n * ```js\n * import {applyStyle} from 'ol-mapbox-style';\n * ```\n *\n * Applies a style function to an `ol.layer.VectorTile` or `ol.layer.Vector`\n * with an `ol.source.VectorTile` or an `ol.source.Vector`. The style function\n * will render all layers from the `glStyle` object that use the specified\n * `source`, or a subset of layers from the same source. The source needs to be\n * a `\"type\": \"vector\"` or `\"type\": \"geojson\"` source.\n *\n * Two additional properties will be set on the provided layer:\n *\n *  * `mapbox-source`: The `id` of the Mapbox Style docum
 ent's source that the\n *    OpenLayers layer was created from. Usually `apply()` creates one\n *    OpenLayers layer per Mapbox Style source, unless the layer stack has\n *    layers from different sources in between.\n *  * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n *    included in the OpenLayers layer.\n *\n * @param {VectorTileLayer|VectorLayer} layer OpenLayers layer.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array<string>} source `source` key or an array of layer `id`s from the\n * Mapbox Style object. When a `source` key is provided, all layers for the\n * specified source will be included in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {string} [path=undefined] Path of the style file. Only required when\n * a relative path is used with the `\"sprite\"` property of the style.\n * @param {Array<number>} [resolutions=undefined] Resolutions f
 or mapping resolution to zoom level.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nexport function applyStyle(layer, glStyle, source, path, resolutions) {\n    return new Promise(function (resolve, reject) {\n        // TODO: figure out where best place to check source type is\n        // Note that the source arg is an array of gl layer ids and each must be\n        // dereferenced to get source type to validate\n        if (typeof glStyle != 'object') {\n            glStyle = JSON.parse(glStyle);\n        }\n        if (glStyle.version != 8) {\n            return reject(new Error('glStyle version 8 required.'));\n        }\n        if (!(layer instanceof VectorLayer || layer instanceof VectorTileLayer)) {\n            return reject(new Error('Can only apply to VectorLayer or VectorTileLayer'));\n        }\n        var spriteScale, spriteData, spriteImageUrl, style;\n        function onChange() {\n            if (!style && (
 !glStyle.sprite || spriteData)) {\n                style = applyStyleFunction(layer, glStyle, source, resolutions, spriteData, spriteImageUrl, getFonts);\n                if (!layer.getStyle()) {\n                    reject(new Error(\"Nothing to show for source [\" + source + \"]\"));\n                }\n                else {\n                    resolve();\n                }\n            }\n            else if (style) {\n                layer.setStyle(style);\n                resolve();\n            }\n            else {\n                reject(new Error('Something went wrong trying to apply style.'));\n            }\n        }\n        if (glStyle.sprite) {\n            spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n            var sizeFactor_1 = spriteScale == 0.5 ? '@2x' : '';\n            var spriteUrl_1 = toSpriteUrl(glStyle.sprite, path, sizeFactor_1 + '.json');\n            fetch(spriteUrl_1, { credentials: 'same-origin' })\n                .then(function (respon
 se) {\n                if (!response.ok && (sizeFactor_1 !== '')) {\n                    spriteUrl_1 = toSpriteUrl(glStyle.sprite, path, '.json');\n                    return fetch(spriteUrl_1, { credentials: 'same-origin' });\n                }\n                else {\n                    return response;\n                }\n            })\n                .then(function (response) {\n                if (response.ok) {\n                    return response.json();\n                }\n                else {\n                    reject(new Error(\"Problem fetching sprite from \" + spriteUrl_1 + \": \" + response.statusText));\n                }\n            })\n                .then(function (spritesJson) {\n                if ((spritesJson === undefined) || (Object.keys(spritesJson).length === 0)) {\n                    return reject(new Error('No sprites found.'));\n                }\n                spriteData = spritesJson;\n                spriteImageUrl = toSpriteUrl(glStyle.spr
 ite, path, sizeFactor_1 + '.png');\n                onChange();\n            })\n                .catch(function (err) {\n                reject(new Error(\"Sprites cannot be loaded: \" + spriteUrl_1 + \": \" + err.message));\n            });\n        }\n        else {\n            onChange();\n        }\n    });\n}\nvar emptyObj = {};\nfunction setBackground(map, layer) {\n    var background = {\n        type: layer.type\n    };\n    function updateStyle() {\n        var element = map.getTargetElement();\n        if (!element) {\n            return;\n        }\n        var layout = layer.layout || {};\n        var paint = layer.paint || {};\n        background['paint'] = paint;\n        background.id = 'olms-bg-' + paint['background-opacity'] + paint['background-color'];\n        var zoom = map.getView().getZoom();\n        if (paint['background-color'] !== undefined) {\n            var bg = getValue(background, 'paint', 'background-color', zoom, emptyObj);\n            element.sty
 le.background = Color.parse(bg).toString();\n        }\n        if (paint['background-opacity'] !== undefined) {\n            element.style.opacity = getValue(background, 'paint', 'background-opacity', zoom, emptyObj);\n        }\n        if (layout.visibility == 'none') {\n            element.style.backgroundColor = '';\n            element.style.opacity = '';\n        }\n    }\n    if (map.getTargetElement()) {\n        updateStyle();\n    }\n    map.on(['change:resolution', 'change:target'], updateStyle);\n}\n/**\n * ```js\n * import {applyBackground} from 'ol-mapbox-style';\n * ```\n * Applies properties of the Mapbox Style's first `background` layer to the map.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {Object} glStyle Mapbox Style object.\n */\nexport function applyBackground(map, glStyle) {\n    glStyle.layers.some(function (l) {\n        if (l.type == 'background') {\n            setBackground(map, l);\n            return true;\n        }\n    });\n}\nfunction
  getSourceIdByRef(layers, ref) {\n    var sourceId;\n    layers.some(function (layer) {\n        if (layer.id == ref) {\n            sourceId = layer.source;\n            return true;\n        }\n    });\n    return sourceId;\n}\nfunction extentFromTileJSON(tileJSON) {\n    var bounds = tileJSON.bounds;\n    if (bounds) {\n        var ll = fromLonLat([bounds[0], bounds[1]]);\n        var tr = fromLonLat([bounds[2], bounds[3]]);\n        return [ll[0], ll[1], tr[0], tr[1]];\n    }\n}\nfunction setupVectorLayer(glSource, accessToken, url) {\n    glSource = assign({}, glSource);\n    var layer = new VectorTileLayer({\n        declutter: true,\n        visible: false\n    });\n    var cacheKey = JSON.stringify(glSource);\n    var tilejson = tilejsonCache[cacheKey];\n    if (!tilejson) {\n        tilejson = tilejsonCache[cacheKey] = new TileJSON({\n            url: glSource.tiles ? undefined : url,\n            tileJSON: glSource.tiles ? glSource : undefined\n        });\n    }\n    var 
 key = tilejson.on('change', function () {\n        var state = tilejson.getState();\n        if (state === 'ready') {\n            var tileJSONDoc = tilejson.getTileJSON();\n            var tiles = Array.isArray(tileJSONDoc.tiles) ? tileJSONDoc.tiles : [tileJSONDoc.tiles];\n            if (glSource.url) {\n                for (var i = 0, ii = tiles.length; i < ii; ++i) {\n                    var tile = tiles[i];\n                    if (tile.indexOf('http') != 0) {\n                        tiles[i] = glSource.url + tile;\n                    }\n                }\n            }\n            var tileGrid = tilejson.getTileGrid();\n            var extent = extentFromTileJSON(tileJSONDoc);\n            var minZoom = tileJSONDoc.minzoom || 0;\n            var maxZoom = tileJSONDoc.maxzoom || 22;\n            var source = tilejson.get('ol-source');\n            if (source === undefined) {\n                source = new VectorTileSource({\n                    attributions: tilejson.getAttri
 butions(),\n                    format: new MVT(),\n                    tileGrid: new TileGrid({\n                        origin: tileGrid.getOrigin(0),\n                        extent: extent || tileGrid.getExtent(),\n                        minZoom: minZoom,\n                        resolutions: defaultResolutions.slice(0, maxZoom + 1),\n                        tileSize: 512\n                    }),\n                    urls: tiles\n                });\n                tilejson.set('ol-source', source);\n            }\n            unByKey(key);\n            layer.setSource(source);\n        }\n        else if (state === 'error') {\n            tilejson.set('ol-source', null);\n            unByKey(key);\n            layer.setSource(undefined);\n        }\n    });\n    if (tilejson.getState() === 'ready') {\n        tilejson.changed();\n    }\n    return layer;\n}\nfunction setupRasterLayer(glSource, url) {\n    var layer = new TileLayer();\n    var source = new TileJSON({\n        
 transition: 0,\n        url: glSource.tiles ? undefined : url,\n        tileJSON: glSource.tiles ? glSource : undefined,\n        crossOrigin: 'anonymous'\n    });\n    var key = source.on('change', function () {\n        var state = source.getState();\n        if (state === 'ready') {\n            unByKey(key);\n            var tileJSONDoc = /** @type {Object} */ (source.getTileJSON());\n            var extent = extentFromTileJSON(tileJSONDoc);\n            var tileGrid = source.getTileGrid();\n            var tileSize = glSource.tileSize || tileJSONDoc.tileSize || 512;\n            var minZoom = tileJSONDoc.minzoom || 0;\n            var maxZoom = tileJSONDoc.maxzoom || 22;\n            // Only works when using ES modules\n            source.tileGrid = new TileGrid({\n                origin: tileGrid.getOrigin(0),\n                extent: extent || tileGrid.getExtent(),\n                minZoom: minZoom,\n                resolutions: createXYZ({\n                    maxZoom: maxZo
 om,\n                    tileSize: tileSize\n                }).getResolutions(),\n                tileSize: tileSize\n            });\n            layer.setSource(source);\n        }\n        else if (state === 'error') {\n            unByKey(key);\n            layer.setSource(undefined);\n        }\n    });\n    source.setTileLoadFunction(function (tile, src) {\n        if (src.indexOf('{bbox-epsg-3857}') != -1) {\n            var bbox = source.getTileGrid().getTileCoordExtent(tile.getTileCoord());\n            src = src.replace('{bbox-epsg-3857}', bbox.toString());\n        }\n        var img = /** @type {import(\"ol/ImageTile\").default} */ (tile).getImage();\n        /** @type {HTMLImageElement} */ (img).src = src;\n    });\n    return layer;\n}\nvar geoJsonFormat = new GeoJSON();\nfunction setupGeoJSONLayer(glSource, path) {\n    var data = glSource.data;\n    var features, geoJsonUrl;\n    if (typeof data == 'string') {\n        geoJsonUrl = withPath(data, path);\n    }\n    
 else {\n        features = geoJsonFormat.readFeatures(data, { featureProjection: 'EPSG:3857' });\n    }\n    return new VectorLayer({\n        source: new VectorSource({\n            attributions: glSource.attribution,\n            features: features,\n            format: geoJsonFormat,\n            url: geoJsonUrl\n        }),\n        visible: false\n    });\n}\nfunction updateRasterLayerProperties(glLayer, layer, view) {\n    var zoom = view.getZoom();\n    var opacity = getValue(glLayer, 'paint', 'raster-opacity', zoom, emptyObj);\n    layer.setOpacity(opacity);\n}\nfunction processStyle(glStyle, map, baseUrl, host, path, accessToken) {\n    var promises = [];\n    var view = map.getView();\n    if (!view.isDef() && !view.getRotation() && !view.getResolutions()) {\n        view = new View({\n            maxResolution: defaultResolutions[0]\n        });\n        map.setView(view);\n    }\n    if ('center' in glStyle && !view.getCenter()) {\n        view.setCenter(fromLonLat(glSty
 le.center));\n    }\n    if ('zoom' in glStyle && view.getZoom() === undefined) {\n        view.setResolution(defaultResolutions[0] / Math.pow(2, glStyle.zoom));\n    }\n    if (!view.getCenter() || view.getZoom() === undefined) {\n        view.fit(view.getProjection().getExtent(), {\n            nearest: true,\n            size: map.getSize()\n        });\n    }\n    if (glStyle.sprite) {\n        if (glStyle.sprite.indexOf('mapbox://') == 0) {\n            glStyle.sprite = baseUrl + '/sprite' + accessToken;\n        }\n        else if (glStyle.sprite.indexOf('http') != 0) {\n            glStyle.sprite = (host ? (host + path) : '') + glStyle.sprite + accessToken;\n        }\n    }\n    var glLayers = glStyle.layers;\n    var layerIds = [];\n    var glLayer, glSource, glSourceId, id, layer, url;\n    var _loop_1 = function (i, ii) {\n        glLayer = glLayers[i];\n        var type = glLayer.type;\n        if (type == 'heatmap' || type == 'fill-extrusion' || type == 'hillshade') {\n
             //FIXME Unsupported layer type\n        }\n        else if (type == 'background') {\n            setBackground(map, glLayer);\n        }\n        else {\n            id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref);\n            // this technique assumes gl layers will be in a particular order\n            if (id != glSourceId) {\n                if (layerIds.length) {\n                    promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n                    layerIds = [];\n                }\n                glSource = glStyle.sources[id];\n                url = glSource.url;\n                if (url) {\n                    url = withPath(url, path);\n                    if (url.indexOf('mapbox://') == 0) {\n                        var mapid_1 = url.replace('mapbox://', '');\n                        glSource.tiles = ['a', 'b', 'c', 'd'].map(function (host) {\n                            return 'https://' + host + '.tiles.mapbox.com/v4/' + 
 mapid_1 +\n                                '/{z}/{x}/{y}.' +\n                                (glSource.type == 'vector' ? 'vector.pbf' : 'png') +\n                                accessToken;\n                        });\n                    }\n                }\n                if (glSource.type == 'vector') {\n                    layer = setupVectorLayer(glSource, accessToken, url);\n                }\n                else if (glSource.type == 'raster') {\n                    layer = setupRasterLayer(glSource, url);\n                    layer.setVisible(glLayer.layout ? glLayer.layout.visibility !== 'none' : true);\n                    view.on('change:resolution', updateRasterLayerProperties.bind(this_1, glLayer, layer, view));\n                    updateRasterLayerProperties(glLayer, layer, view);\n                }\n                else if (glSource.type == 'geojson') {\n                    layer = setupGeoJSONLayer(glSource, path);\n                }\n                glSourceI
 d = id;\n                if (layer) {\n                    layer.set('mapbox-source', glSourceId);\n                }\n            }\n            layerIds.push(glLayer.id);\n        }\n    };\n    var this_1 = this;\n    for (var i = 0, ii = glLayers.length; i < ii; ++i) {\n        _loop_1(i, ii);\n    }\n    promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n    map.set('mapbox-style', glStyle);\n    return Promise.all(promises);\n}\n/**\n * ```js\n * import olms from 'ol-mapbox-style';\n * ```\n *\n * Loads and applies a Mapbox Style object to an OpenLayers Map. This includes\n * the map background, the layers, the center and the zoom.\n *\n * The center and zoom will only be set if present in the Mapbox Style document,\n * and if not already set on the OpenLayers map.\n *\n * Layers will be added to the OpenLayers map, without affecting any layers that\n * might already be set on the map.\n *\n * Layers added by `apply()` will have two additional properties:\n *\
 n *  * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n *    OpenLayers layer was created from. Usually `apply()` creates one\n *    OpenLayers layer per Mapbox Style source, unless the layer stack has\n *    layers from different sources in between.\n *  * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n *    included in the OpenLayers layer.\n *\n * This function sets an additional `mapbox-style` property on the OpenLayers\n * map instance, which holds the Mapbox Style object.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_acc
 ess_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {Promise} A promise that resolves after all layers have been added to\n * the OpenLayers Map instance, their sources set, and their styles applied. the\n * `resolve` callback will be called with the OpenLayers Map instance as\n * argument.\n */\nexport default function olms(map, style) {\n    var accessToken, baseUrl, host, path, promise;\n    accessToken = baseUrl = host = path = '';\n    if (typeof map === 'string' || map instanceof HTMLElement) {\n        map = new Map({\n            target: map\n        });\n    }\n    if (typeof style === 'string') {\n        var parts = style.match(spriteRegEx);\n      
   if (parts) {\n            baseUrl = parts[1];\n            accessToken = parts.length > 2 ? parts[2] : '';\n        }\n        promise = new Promise(function (resolve, reject) {\n            fetch(style, {\n                credentials: 'same-origin'\n            })\n                .then(function (response) {\n                return response.json();\n            })\n                .then(function (glStyle) {\n                var a = /** @type {HTMLAnchorElement} */ (document.createElement('A'));\n                a.href = style;\n                var href = a.href;\n                path = a.pathname.split('/').slice(0, -1).join('/') + '/';\n                host = href.substr(0, href.indexOf(path));\n                processStyle(glStyle, map, baseUrl, host, path, accessToken)\n                    .then(function () {\n                    resolve(map);\n                })\n                    .catch(reject);\n            })\n                .catch(function (err) {\n                reje
 ct(new Error(\"Could not load \" + style + \": \" + err.message));\n            });\n        });\n    }\n    else {\n        promise = new Promise(function (resolve, reject) {\n            processStyle(style, map)\n                .then(function () {\n                resolve(map);\n            })\n                .catch(reject);\n        });\n    }\n    return promise;\n}\n/**\n * ```js\n * import {apply} from 'ol-mapbox-style';\n * ```\n * Like `olms`, but returns an `ol/Map` instance instead of a `Promise`.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * 
 When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {PluggableMap} The OpenLayers Map instance that will be populated with the\n * contents described in the Mapbox Style object.\n */\nexport function apply(map, style) {\n    if (typeof map === 'string' || map instanceof HTMLElement) {\n        map = new Map({\n            target: map\n        });\n    }\n    setTimeout(function () {\n        olms(map, style);\n    }, 0);\n    return map;\n}\n/**\n * @private\n * If layerIds is not empty, applies the style specified in glStyle to the layer,\n * and adds the layer to the map.\n *\n * The layer may not yet have a source when the function is called.  If so, the style\n * is applied to 
 the layer via a once listener on the 'change:source' event.\n *\n * @param {Layer} layer An OpenLayers layer instance.\n * @param {Array<string>} layerIds Array containing layer ids of already-processed layers.\n * @param {Object} glStyle Style as a JSON object.\n * @param {string|undefined} path The path part of the style URL. Only required\n * when a relative path is used with the `\"sprite\"` property of the style.\n * @param {PluggableMap} map OpenLayers Map.\n * @return {Promise} Returns a promise that resolves after the source has\n * been set on the specified layer, and the style has been applied.\n */\nfunction finalizeLayer(layer, layerIds, glStyle, path, map) {\n    var minZoom = 24;\n    var maxZoom = 0;\n    var glLayers = glStyle.layers;\n    for (var i = 0, ii = glLayers.length; i < ii; ++i) {\n        var glLayer = glLayers[i];\n        if (layerIds.indexOf(glLayer.id) !== -1) {\n            minZoom = Math.min('minzoom' in glLayer ? glLayer.minzoom : 0, minZoom);\n   
          maxZoom = Math.max('maxzoom' in glLayer ? glLayer.maxzoom : 24, maxZoom);\n        }\n    }\n    return new Promise(function (resolve, reject) {\n        var setStyle = function () {\n            var source = layer.getSource();\n            if (!source || source.getState() === 'error') {\n                reject(new Error('Error accessing data for source ' + layer.get('mapbox-source')));\n                return;\n            }\n            if (typeof source.getTileGrid === 'function') {\n                var tileGrid = source.getTileGrid();\n                if (tileGrid) {\n                    var sourceMinZoom = tileGrid.getMinZoom();\n                    if (minZoom > 0 || sourceMinZoom > 0) {\n                        layer.setMaxResolution(Math.min(defaultResolutions[minZoom], tileGrid.getResolution(sourceMinZoom)) + 1e-9);\n                    }\n                    if (maxZoom < 24) {\n                        layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9);\n 
                    }\n                }\n            }\n            if (source instanceof VectorSource || source instanceof VectorTileSource) {\n                applyStyle(/** @type {import(\"ol/layer/Vector\").default|import(\"ol/layer/VectorTile\").default} */ (layer), glStyle, layerIds, path).then(function () {\n                    layer.setVisible(true);\n                    resolve();\n                }, function (e) {\n                    reject(e);\n                });\n            }\n            else {\n                resolve();\n            }\n        };\n        layer.set('mapbox-layers', layerIds);\n        if (map.getLayers().getArray().indexOf(layer) === -1) {\n            map.addLayer(layer);\n        }\n        if (layer.getSource()) {\n            setStyle();\n        }\n        else {\n            layer.once('change:source', setStyle);\n        }\n    });\n}\n/**\n * ```js\n * import {getLayer} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instance t
 hat contains the provided Mapbox Style\n * `layer`. Note that multiple Mapbox Style layers are combined in a single\n * OpenLayers layer instance when they use the same Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} layerId Mapbox Style layer id.\n * @return {Layer} OpenLayers layer instance.\n */\nexport function getLayer(map, layerId) {\n    var layers = map.getLayers().getArray();\n    for (var i = 0, ii = layers.length; i < ii; ++i) {\n        var mapboxLayers = layers[i].get('mapbox-layers');\n        if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) {\n            return /** @type {Layer} */ (layers[i]);\n        }\n    }\n}\n/**\n * ```js\n * import {getLayers} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instances for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Array<Layer>} OpenLayers layer instances.\n */\
 nexport function getLayers(map, sourceId) {\n    var result = [];\n    var layers = map.getLayers().getArray();\n    for (var i = 0, ii = layers.length; i < ii; ++i) {\n        if (layers[i].get('mapbox-source') === sourceId) {\n            result.push(/** @type {Layer} */ (layers[i]));\n        }\n    }\n    return result;\n}\n/**\n * ```js\n * import {getSource} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers source instance for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Source} OpenLayers source instance.\n */\nexport function getSource(map, sourceId) {\n    var layers = map.getLayers().getArray();\n    for (var i = 0, ii = layers.length; i < ii; ++i) {\n        var source = /** @type {Layer} */ (layers[i]).getSource();\n        if (layers[i].get('mapbox-source') === sourceId) {\n            return source;\n        }\n    }\n}\nexport { finalizeLayer as _finalizeLayer, 
 getFonts as _getFonts };\n//# sourceMappingURL=index.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/MapboxVector\n */\nimport BaseEvent from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport MVT from '../format/MVT.js';\nimport SourceState from '../source/State.js';\nimport VectorTileLayer from '../layer/VectorTile.js';\nimport VectorTileSource from '../source/VectorTile.js';\nim
 port { applyStyle } from 'ol-mapbox-style';\nvar mapboxBaseUrl = 'https://api.mapbox.com';\n/**\n * Gets the path from a mapbox:// URL.\n * @param {string} url The Mapbox URL.\n * @return {string} The path.\n * @private\n */\nexport function getMapboxPath(url) {\n    var startsWith = 'mapbox://';\n    if (url.indexOf(startsWith) !== 0) {\n        return '';\n    }\n    return url.slice(startsWith.length);\n}\n/**\n * Turns mapbox:// sprite URLs into resolvable URLs.\n * @param {string} url The sprite URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeSpriteUrl(url, token) {\n    var mapboxPath = getMapboxPath(url);\n    if (!mapboxPath) {\n        return url;\n    }\n    var startsWith = 'sprites/';\n    if (mapboxPath.indexOf(startsWith) !== 0) {\n        throw new Error(\"unexpected sprites url: \" + url);\n    }\n    var sprite = mapboxPath.slice(startsWith.length);\n    return mapboxBaseUrl + \"/sty
 les/v1/\" + sprite + \"/sprite?access_token=\" + token;\n}\n/**\n * Turns mapbox:// glyphs URLs into resolvable URLs.\n * @param {string} url The glyphs URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeGlyphsUrl(url, token) {\n    var mapboxPath = getMapboxPath(url);\n    if (!mapboxPath) {\n        return url;\n    }\n    var startsWith = 'fonts/';\n    if (mapboxPath.indexOf(startsWith) !== 0) {\n        throw new Error(\"unexpected fonts url: \" + url);\n    }\n    var font = mapboxPath.slice(startsWith.length);\n    return mapboxBaseUrl + \"/fonts/v1/\" + font + \"/0-255.pbf?access_token=\" + token;\n}\n/**\n * Turns mapbox:// style URLs into resolvable URLs.\n * @param {string} url The style URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeStyleUrl(url, token) {\n    var mapboxPath = getMapboxPath(url);\n    if (!m
 apboxPath) {\n        return url;\n    }\n    var startsWith = 'styles/';\n    if (mapboxPath.indexOf(startsWith) !== 0) {\n        throw new Error(\"unexpected style url: \" + url);\n    }\n    var style = mapboxPath.slice(startsWith.length);\n    return mapboxBaseUrl + \"/styles/v1/\" + style + \"?&access_token=\" + token;\n}\n/**\n * Turns mapbox:// source URLs into vector tile URL templates.\n * @param {string} url The source URL.\n * @param {string} token The access token.\n * @return {string} A vector tile template.\n * @private\n */\nexport function normalizeSourceUrl(url, token) {\n    var mapboxPath = getMapboxPath(url);\n    if (!mapboxPath) {\n        return url;\n    }\n    return \"https://{a-d}.tiles.mapbox.com/v4/\" + mapboxPath + \"/{z}/{x}/{y}.vector.pbf?access_token=\" + token;\n}\n/**\n * @classdesc\n * Event emitted on configuration or loading error.\n */\nvar ErrorEvent = /** @class */ (function (_super) {\n    __extends(ErrorEvent, _super);\n    /**\n     * @pa
 ram {Error} error error object.\n     */\n    function ErrorEvent(error) {\n        var _this = _super.call(this, EventType.ERROR) || this;\n        /**\n         * @type {Error}\n         */\n        _this.error = error;\n        return _this;\n    }\n    return ErrorEvent;\n}(BaseEvent));\n/**\n * @typedef {Object} StyleObject\n * @property {Object<string, SourceObject>} sources The style sources.\n * @property {string} sprite The sprite URL.\n * @property {string} glyphs The glyphs URL.\n * @property {Array<LayerObject>} layers The style layers.\n */\n/**\n * @typedef {Object} SourceObject\n * @property {string} url The source URL.\n * @property {SourceType} type The source type.\n */\n/**\n * The Mapbox source type.\n * @enum {string}\n */\nvar SourceType = {\n    VECTOR: 'vector',\n};\n/**\n * @typedef {Object} LayerObject\n * @property {string} id The layer id.\n * @property {string} source The source id.\n */\n/**\n * @typedef {Object} Options\n * @property {string} styleUrl 
 The URL of the Mapbox style object to use for this layer.  For a\n * style created with Mapbox Studio and hosted on Mapbox, this will look like\n * 'mapbox://styles/you/your-style'.\n * @property {string} accessToken The access token for your Mapbox style.\n * @property {string} [source] If your style uses more than one source, you need to use either the\n * `source` property or the `layers` property to limit rendering to a single vector source.  The\n * `source` property corresponds to the id of a vector source in your Mapbox style.\n * @property {Array<string>} [layers] Limit rendering to the list of included layers.  All layers\n * must share the same vector soource.  If your style uses more than one source, you need to use\n * either the `source` property or the `layers` property to limit rendering to a single vector\n * source.\n * @property {boolean} [declutter=true] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTil
 e layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResoluti
 on] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should matc
 h\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {import(\"./VectorTileRenderType.js\").default|string} [renderMode='hybrid'] Render mode for vector tiles:\n *  * `'image'`: Vector tiles are rendered as images. Great performance, but point symbols and texts\n *    are always rotated with the view and pixels are scaled during zoom animations. When `declutter`\n *    is set to `true`, the decluttering is done per tile resulting in labels and point symbols getting\n *    cut off at tile boundaries.\n *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n *    animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n *    rotated views.\n *  * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector\n *    tile layers with only a few rendered features (e.g. for highligh
 ting a subset of features of\n *    another layer with the same source).\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low
 -resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n/**\n * @classdesc\n * A vector tile layer based on a Mapbox style that uses a single vector source.  Configure\n * the layer with the `styleUrl` and `accessToken` shown in Mapbox Studio's share panel.\n * If the style uses more than one source, use the `source` property to choose a single\n * vector source.  If you want to render a subset of the layers in the style, use the `layers`\n * property (all layers must share the same vector source).  See the constructor options for\n * more detail.\n *\n *     var map = new Map({\n *       view: new View({\n *         center: [0, 0],\n *         zoom: 1\n *       }),\n *       layers: [\n *         new MapboxVector({\n *           styleUrl: 'mapbox://styles/mapbox/bright-v9',\n *           accessToken: 'your-mapbox-access-token-here'\n *         })\n *       ],\n *       target: 'ma
 p'\n *     });\n *\n * On configuration or loading error, the layer will trigger an `'error'` event.  Listeners\n * will receive an object with an `error` property that can be used to diagnose the problem.\n *\n * @param {Options} options Options.\n * @extends {VectorTileLayer}\n * @fires module:ol/events/Event~BaseEvent#event:error\n * @api\n */\nvar MapboxVectorLayer = /** @class */ (function (_super) {\n    __extends(MapboxVectorLayer, _super);\n    /**\n     * @param {Options} options Layer options.  At a minimum, `styleUrl` and `accessToken`\n     * must be provided.\n     */\n    function MapboxVectorLayer(options) {\n        var _this = this;\n        var declutter = 'declutter' in options ? options.declutter : true;\n        var source = new VectorTileSource({\n            state: SourceState.LOADING,\n            format: new MVT(),\n        });\n        _this = _super.call(this, {\n            source: source,\n            declutter: declutter,\n            className: options
 .className,\n            opacity: options.opacity,\n            visible: options.visible,\n            zIndex: options.zIndex,\n            minResolution: options.minResolution,\n            maxResolution: options.maxResolution,\n            minZoom: options.minZoom,\n            maxZoom: options.maxZoom,\n            renderOrder: options.renderOrder,\n            renderBuffer: options.renderBuffer,\n            renderMode: options.renderMode,\n            map: options.map,\n            updateWhileAnimating: options.updateWhileAnimating,\n            updateWhileInteracting: options.updateWhileInteracting,\n            preload: options.preload,\n            useInterimTilesOnError: options.useInterimTilesOnError,\n        }) || this;\n        _this.sourceId = options.source;\n        _this.layers = options.layers;\n        _this.accessToken = options.accessToken;\n        _this.fetchStyle(options.styleUrl);\n        return _this;\n    }\n    /**\n     * Fetch the style object.\n     *
  @param {string} styleUrl The URL of the style to load.\n     * @protected\n     */\n    MapboxVectorLayer.prototype.fetchStyle = function (styleUrl) {\n        var _this = this;\n        var url = normalizeStyleUrl(styleUrl, this.accessToken);\n        fetch(url)\n            .then(function (response) {\n            if (!response.ok) {\n                throw new Error(\"unexpected response when fetching style: \" + response.status);\n            }\n            return response.json();\n        })\n            .then(function (style) {\n            _this.onStyleLoad(style);\n        })\n            .catch(function (error) {\n            _this.handleError(error);\n        });\n    };\n    /**\n     * Handle the loaded style object.\n     * @param {StyleObject} style The loaded style.\n     * @protected\n     */\n    MapboxVectorLayer.prototype.onStyleLoad = function (style) {\n        var _this = this;\n        var sourceId;\n        var sourceIdOrLayersList;\n        if (this.layers) 
 {\n            // confirm all layers share the same source\n            var lookup = {};\n            for (var i = 0; i < style.layers.length; ++i) {\n                var layer = style.layers[i];\n                if (layer.source) {\n                    lookup[layer.id] = layer.source;\n                }\n            }\n            var firstSource = void 0;\n            for (var i = 0; i < this.layers.length; ++i) {\n                var candidate = lookup[this.layers[i]];\n                if (!candidate) {\n                    this.handleError(new Error(\"could not find source for \" + this.layers[i]));\n                    return;\n                }\n                if (!firstSource) {\n                    firstSource = candidate;\n                }\n                else if (firstSource !== candidate) {\n                    this.handleError(new Error(\"layers can only use a single source, found \" + firstSource + \" and \" + candidate));\n                    return;\n              
   }\n            }\n            sourceId = firstSource;\n            sourceIdOrLayersList = this.layers;\n        }\n        else {\n            sourceId = this.sourceId;\n            sourceIdOrLayersList = sourceId;\n        }\n        if (!sourceIdOrLayersList) {\n            // default to the first source in the style\n            sourceId = Object.keys(style.sources)[0];\n            sourceIdOrLayersList = sourceId;\n        }\n        if (style.sprite) {\n            style.sprite = normalizeSpriteUrl(style.sprite, this.accessToken);\n        }\n        if (style.glyphs) {\n            style.glyphs = normalizeGlyphsUrl(style.glyphs, this.accessToken);\n        }\n        var styleSource = style.sources[sourceId];\n        if (styleSource.type !== SourceType.VECTOR) {\n            this.handleError(new Error(\"only works for vector sources, found \" + styleSource.type));\n            return;\n        }\n        var source = this.getSource();\n        source.setUrl(normalizeSourceU
 rl(styleSource.url, this.accessToken));\n        applyStyle(this, style, sourceIdOrLayersList)\n            .then(function () {\n            source.setState(SourceState.READY);\n        })\n            .catch(function (error) {\n            _this.handleError(error);\n        });\n    };\n    /**\n     * Handle configuration or loading error.\n     * @param {Error} error The error.\n     * @protected\n     */\n    MapboxVectorLayer.prototype.handleError = function (error) {\n        this.dispatchEvent(new ErrorEvent(error));\n        var source = this.getSource();\n        source.setState(SourceState.ERROR);\n    };\n    return MapboxVectorLayer;\n}(VectorTileLayer));\nexport default MapboxVectorLayer;\n//# sourceMappingURL=MapboxVector.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) 
 ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/VectorImage\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.js';\nimport { assign } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-in
 dex for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort
 , but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text on this layer. The priority is defined\n * by the `zIndex` of the style and the render order of features. Higher z-index means higher priority.\n * Within the same z-index, a feature render
 ed before another has higher priority.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link module:ol/style} for default style which will be used if this is not defined.\n * @property {number} [imageRatio=1] Ratio by which the rendered extent should be larger than the\n * viewport extent. A larger ratio avoids cut images during panning, but will cause a decrease in performance.\n */\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @api\n */\nvar VectorImageLayer = /** @class */ (function (_super) {\n    __extends(VectorImageLayer, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function VectorImageLayer(opt_options) {\n        var _this = this;\
 n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({}, options);\n        delete baseOptions.imageRatio;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.imageRatio_ =\n            options.imageRatio !== undefined ? options.imageRatio : 1;\n        return _this;\n    }\n    /**\n     * @return {number} Ratio between rendered extent size and viewport extent size.\n     */\n    VectorImageLayer.prototype.getImageRatio = function () {\n        return this.imageRatio_;\n    };\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     */\n    VectorImageLayer.prototype.createRenderer = function () {\n        return new CanvasVectorImageLayerRenderer(this);\n    };\n    return VectorImageLayer;\n}(BaseVectorLayer));\nexport default VectorImageLayer;\n//# sourceMappingURL=VectorImag
 e.js.map","/**\n * @module ol/interaction/DragAndDrop\n */\n// FIXME should handle all geo-referenced data, not just vector data\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Interaction from './Interaction.js';\nimport { TRUE } from '../functions.js';\nimport { get as getProjection } from '../proj.js';\nimport { listen, unlistenByKey } from '.
 ./events.js';\n/**\n * @typedef {Object} Options\n * @property {Array<typeof import(\"../format/Feature.js\").default>} [formatConstructors] Format constructors.\n * @property {import(\"../source/Vector.js\").default} [source] Optional vector source where features will be added.  If a source is provided\n * all existing features will be removed and new features will be added when\n * they are dropped on the target.  If you want to add features to a vector\n * source without removing the existing features (append only), instead of\n * providing the source option listen for the \"addfeatures\" event.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Target projection. By default, the map's view's projection is used.\n * @property {HTMLElement} [target] The element that is used as the drop target, default is the viewport element.\n */\n/**\n * @enum {string}\n */\nvar DragAndDropEventType = {\n    /**\n     * Triggered when features are added\n     * @event DragAndDrop
 Event#addfeatures\n     * @api\n     */\n    ADD_FEATURES: 'addfeatures',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragAndDrop~DragAndDrop} instances are instances\n * of this type.\n */\nvar DragAndDropEvent = /** @class */ (function (_super) {\n    __extends(DragAndDropEvent, _super);\n    /**\n     * @param {DragAndDropEventType} type Type.\n     * @param {File} file File.\n     * @param {Array<import(\"../Feature.js\").default>=} opt_features Features.\n     * @param {import(\"../proj/Projection.js\").default=} opt_projection Projection.\n     */\n    function DragAndDropEvent(type, file, opt_features, opt_projection) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The features parsed from dropped data.\n         * @type {Array<import(\"../Feature.js\").FeatureLike>|undefined}\n         * @api\n         */\n        _this.features = opt_features;\n        /**\n         * The dropped file.\n         * @type {File}\
 n         * @api\n         */\n        _this.file = file;\n        /**\n         * The feature projection.\n         * @type {import(\"../proj/Projection.js\").default|undefined}\n         * @api\n         */\n        _this.projection = opt_projection;\n        return _this;\n    }\n    return DragAndDropEvent;\n}(Event));\n/**\n * @classdesc\n * Handles input of vector data by drag and drop.\n * @api\n *\n * @fires DragAndDropEvent\n */\nvar DragAndDrop = /** @class */ (function (_super) {\n    __extends(DragAndDrop, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragAndDrop(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            handleEvent: TRUE,\n        }) || this;\n        /**\n         * @private\n         * @type {Array<typeof import(\"../format/Feature.js\").default>}\n         */\n        _this.formatConstructors_ = options.formatConstructors\
 n            ? options.formatConstructors\n            : [];\n        /**\n         * @private\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.projection_ = options.projection\n            ? getProjection(options.projection)\n            : null;\n        /**\n         * @private\n         * @type {?Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.dropListenKeys_ = null;\n        /**\n         * @private\n         * @type {import(\"../source/Vector.js\").default}\n         */\n        _this.source_ = options.source || null;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.target = options.target ? options.target : null;\n        return _this;\n    }\n    /**\n     * @param {File} file File.\n     * @param {Event} event Load event.\n     * @private\n     */\n    DragAndDrop.prototype.handleResult_ = function (file, event) {\n        var result = event.target.result;\n        va
 r map = this.getMap();\n        var projection = this.projection_;\n        if (!projection) {\n            var view = map.getView();\n            projection = view.getProjection();\n        }\n        var formatConstructors = this.formatConstructors_;\n        for (var i = 0, ii = formatConstructors.length; i < ii; ++i) {\n            var format = new formatConstructors[i]();\n            var features = this.tryReadFeatures_(format, result, {\n                featureProjection: projection,\n            });\n            if (features && features.length > 0) {\n                if (this.source_) {\n                    this.source_.clear();\n                    this.source_.addFeatures(features);\n                }\n                this.dispatchEvent(new DragAndDropEvent(DragAndDropEventType.ADD_FEATURES, file, features, projection));\n                break;\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    DragAndDrop.prototype.registerListeners_ = function () {
 \n        var map = this.getMap();\n        if (map) {\n            var dropArea = this.target ? this.target : map.getViewport();\n            this.dropListenKeys_ = [\n                listen(dropArea, EventType.DROP, this.handleDrop, this),\n                listen(dropArea, EventType.DRAGENTER, this.handleStop, this),\n                listen(dropArea, EventType.DRAGOVER, this.handleStop, this),\n                listen(dropArea, EventType.DROP, this.handleStop, this),\n            ];\n        }\n    };\n    /**\n     * Activate or deactivate the interaction.\n     * @param {boolean} active Active.\n     * @observable\n     * @api\n     */\n    DragAndDrop.prototype.setActive = function (active) {\n        if (!this.getActive() && active) {\n            this.registerListeners_();\n        }\n        if (this.getActive() && !active) {\n            this.unregisterListeners_();\n        }\n        _super.prototype.setActive.call(this, active);\n    };\n    /**\n     * Remove the interac
 tion from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    DragAndDrop.prototype.setMap = function (map) {\n        this.unregisterListeners_();\n        _super.prototype.setMap.call(this, map);\n        if (this.getActive()) {\n            this.registerListeners_();\n        }\n    };\n    /**\n     * @param {import(\"../format/Feature.js\").default} format Format.\n     * @param {string} text Text.\n     * @param {import(\"../format/Feature.js\").ReadOptions} options Read options.\n     * @private\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    DragAndDrop.prototype.tryReadFeatures_ = function (format, text, options) {\n        try {\n            return (\n            /** @type {Array<import(\"../Feature.js\").default>} */\n            (format.readFeatures(text, options)));
 \n        }\n        catch (e) {\n            return null;\n        }\n    };\n    /**\n     * @private\n     */\n    DragAndDrop.prototype.unregisterListeners_ = function () {\n        if (this.dropListenKeys_) {\n            this.dropListenKeys_.forEach(unlistenByKey);\n            this.dropListenKeys_ = null;\n        }\n    };\n    /**\n     * @param {DragEvent} event Event.\n     */\n    DragAndDrop.prototype.handleDrop = function (event) {\n        var files = event.dataTransfer.files;\n        for (var i = 0, ii = files.length; i < ii; ++i) {\n            var file = files.item(i);\n            var reader = new FileReader();\n            reader.addEventListener(EventType.LOAD, this.handleResult_.bind(this, file));\n            reader.readAsText(file);\n        }\n    };\n    /**\n     * @param {DragEvent} event Event.\n     */\n    DragAndDrop.prototype.handleStop = function (event) {\n        event.stopPropagation();\n        event.preventDefault();\n        event.dataTransfe
 r.dropEffect = 'copy';\n    };\n    return DragAndDrop;\n}(Interaction));\nexport default DragAndDrop;\n//# sourceMappingURL=DragAndDrop.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragRotateAndZoom\n */\nimport PointerInteraction from './Pointer.js';\nimport { mouseOnly, shiftKeyOnly } from '../events/condition.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\"
 ).Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~shiftKeyOnly}.\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n/**\n * @classdesc\n * Allows the user to zoom and rotate the map by clicking and dragging\n * on the map.  By default, this interaction is limited to when the shift\n * key is held down.\n *\n * This interaction is only supported for mouse devices.\n *\n * And this interaction is not included in the default interactions.\n * @api\n */\nvar DragRotateAndZoom = /** @class */ (function (_super) {\n    __extends(DragRotateAndZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragRotateAndZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, /**
  @type {import(\"./Pointer.js\").Options} */ (options)) || this;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : shiftKeyOnly;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastAngle_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastMagnitude_ = undefined;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.lastScaleDelta_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 400;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragRotateAndZoom.prototype.handleDragEvent = fun
 ction (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return;\n        }\n        var map = mapBrowserEvent.map;\n        var size = map.getSize();\n        var offset = mapBrowserEvent.pixel;\n        var deltaX = offset[0] - size[0] / 2;\n        var deltaY = size[1] / 2 - offset[1];\n        var theta = Math.atan2(deltaY, deltaX);\n        var magnitude = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n        var view = map.getView();\n        if (this.lastAngle_ !== undefined) {\n            var angleDelta = this.lastAngle_ - theta;\n            view.adjustRotationInternal(angleDelta);\n        }\n        this.lastAngle_ = theta;\n        if (this.lastMagnitude_ !== undefined) {\n            view.adjustResolutionInternal(this.lastMagnitude_ / magnitude);\n        }\n        if (this.lastMagnitude_ !== undefined) {\n            this.lastScaleDelta_ = this.lastMagnitude_ / magnitude;\n        }\n        this.lastMagnitude_ = magnitude;\n    };\n    /**
 \n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragRotateAndZoom.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return true;\n        }\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        var direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n        view.endInteraction(this.duration_, direction);\n        this.lastScaleDelta_ = 0;\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragRotateAndZoom.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return false;\n        }\n        if (this.condition_(mapBrowserEvent)) {\n
             mapBrowserEvent.map.getView().beginInteraction();\n            this.lastAngle_ = undefined;\n            this.lastMagnitude_ = undefined;\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return DragRotateAndZoom;\n}(PointerInteraction));\nexport default DragRotateAndZoom;\n//# sourceMappingURL=DragRotateAndZoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @
 module ol/geom/Circle\n */\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { createOrUpdate, forEachCorner, intersects } from '../extent.js';\nimport { deflateCoordinate } from './flat/deflate.js';\nimport { rotate, translate } from './flat/transform.js';\n/**\n * @classdesc\n * Circle geometry.\n *\n * @api\n */\nvar Circle = /** @class */ (function (_super) {\n    __extends(Circle, _super);\n    /**\n     * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n     *     For internal use, flat coordinates in combination with `opt_layout` and no\n     *     `opt_radius` are also accepted.\n     * @param {number=} opt_radius Radius.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    function Circle(center, opt_radius, opt_layout) {\n        var _this = _super.call(this) || this;\n        if (opt_layout !== undefined && opt_radius === undefined) {\n            _this.setFlatCo
 ordinates(opt_layout, center);\n        }\n        else {\n            var radius = opt_radius ? opt_radius : 0;\n            _this.setCenterAndRadius(center, radius, opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!Circle} Clone.\n     * @api\n     */\n    Circle.prototype.clone = function () {\n        return new Circle(this.flatCoordinates.slice(), undefined, this.layout);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Circle.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        var flatCoordinates = this.flatCoordinates;\n        var dx = x - flatCoordinates[0];\n        var dy = y - flatCoordinates[1];\n        var squaredDis
 tance = dx * dx + dy * dy;\n        if (squaredDistance < minSquaredDistance) {\n            if (squaredDistance === 0) {\n                for (var i = 0; i < this.stride; ++i) {\n                    closestPoint[i] = flatCoordinates[i];\n                }\n            }\n            else {\n                var delta = this.getRadius() / Math.sqrt(squaredDistance);\n                closestPoint[0] = flatCoordinates[0] + delta * dx;\n                closestPoint[1] = flatCoordinates[1] + delta * dy;\n                for (var i = 2; i < this.stride; ++i) {\n                    closestPoint[i] = flatCoordinates[i];\n                }\n            }\n            closestPoint.length = this.stride;\n            return squaredDistance;\n        }\n        else {\n            return minSquaredDistance;\n        }\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    Circle.prototype.containsXY = function (x, y) {\
 n        var flatCoordinates = this.flatCoordinates;\n        var dx = x - flatCoordinates[0];\n        var dy = y - flatCoordinates[1];\n        return dx * dx + dy * dy <= this.getRadiusSquared_();\n    };\n    /**\n     * Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n     * @return {import(\"../coordinate.js\").Coordinate} Center.\n     * @api\n     */\n    Circle.prototype.getCenter = function () {\n        return this.flatCoordinates.slice(0, this.stride);\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    Circle.prototype.computeExtent = function (extent) {\n        var flatCoordinates = this.flatCoordinates;\n        var radius = flatCoordinates[this.stride] - flatCoordinates[0];\n        return createOrUpdate(flatCoordinates[0] - radius, flatCoordinates[1] - radius, flatCoordinates[0] + radius, flatCoordinat
 es[1] + radius, extent);\n    };\n    /**\n     * Return the radius of the circle.\n     * @return {number} Radius.\n     * @api\n     */\n    Circle.prototype.getRadius = function () {\n        return Math.sqrt(this.getRadiusSquared_());\n    };\n    /**\n     * @private\n     * @return {number} Radius squared.\n     */\n    Circle.prototype.getRadiusSquared_ = function () {\n        var dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];\n        var dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];\n        return dx * dx + dy * dy;\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    Circle.prototype.getType = function () {\n        return GeometryType.CIRCLE;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geomet
 ry and the extent intersect.\n     * @api\n     */\n    Circle.prototype.intersectsExtent = function (extent) {\n        var circleExtent = this.getExtent();\n        if (intersects(extent, circleExtent)) {\n            var center = this.getCenter();\n            if (extent[0] <= center[0] && extent[2] >= center[0]) {\n                return true;\n            }\n            if (extent[1] <= center[1] && extent[3] >= center[1]) {\n                return true;\n            }\n            return forEachCorner(extent, this.intersectsCoordinate.bind(this));\n        }\n        return false;\n    };\n    /**\n     * Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n     * @param {import(\"../coordinate.js\").Coordinate} center Center.\n     * @api\n     */\n    Circle.prototype.setCenter = function (center) {\n        var stride = this.stride;\n        var radius = this.flatCoordinates[stride] - this.flatCoordinates[0];\n        var flatCoordinates = ce
 nter.slice();\n        flatCoordinates[stride] = flatCoordinates[0] + radius;\n        for (var i = 1; i < stride; ++i) {\n            flatCoordinates[stride + i] = center[i];\n        }\n        this.setFlatCoordinates(this.layout, flatCoordinates);\n        this.changed();\n    };\n    /**\n     * Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as\n     * number) of the circle.\n     * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n     * @param {number} radius Radius.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    Circle.prototype.setCenterAndRadius = function (center, radius, opt_layout) {\n        this.setLayout(opt_layout, center, 0);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        /** @type {Array<number>} */\n        var flatCoordinates = this.flatCoordinates;\n        var offset = deflateCoordinate(flatCoordinat
 es, 0, center, this.stride);\n        flatCoordinates[offset++] = flatCoordinates[0] + radius;\n        for (var i = 1, ii = this.stride; i < ii; ++i) {\n            flatCoordinates[offset++] = flatCoordinates[i];\n        }\n        flatCoordinates.length = offset;\n        this.changed();\n    };\n    Circle.prototype.getCoordinates = function () {\n        return null;\n    };\n    Circle.prototype.setCoordinates = function (coordinates, opt_layout) { };\n    /**\n     * Set the radius of the circle. The radius is in the units of the projection.\n     * @param {number} radius Radius.\n     * @api\n     */\n    Circle.prototype.setRadius = function (radius) {\n        this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;\n        this.changed();\n    };\n    /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n     * coordinates in place.\n     * @param {number} angle Rotation angle in radians.\n     * @param {import(\"../coordinat
 e.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    Circle.prototype.rotate = function (angle, anchor) {\n        var center = this.getCenter();\n        var stride = this.getStride();\n        this.setCenter(rotate(center, 0, center.length, stride, angle, anchor, center));\n        this.changed();\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @param {number} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api\n     */\n    Circle.prototype.translate = function (deltaX, deltaY) {\n        var center = this.getCenter();\n        var stride = this.getStride();\n        this.setCenter(translate(center, 0, center.length, stride, deltaX, deltaY, center));\n        this.changed();\n    };\n    return Circle;\n}(SimpleGeometry));\n/**\n * Transform each coordinate of the circle from one coordinate reference system\n
  * to another. The geometry is modified in place.\n * If you do not want the geometry modified in place, first clone() it and\n * then use this function on the clone.\n *\n * Internally a circle is currently represented by two points: the center of\n * the circle `[cx, cy]`, and the point to the right of the circle\n * `[cx + r, cy]`. This `transform` function just transforms these two points.\n * So the resulting geometry is also a circle, and that circle does not\n * correspond to the shape that would be obtained by transforming every point\n * of the original circle.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection.  Can be a\n *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.  Can be a\n *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Circle} This geometry.  Note that original geo
 metry is\n *     modified in place.\n * @function\n * @api\n */\nCircle.prototype.transform;\nexport default Circle;\n//# sourceMappingURL=Circle.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Draw\n */\nimport Circle from '../geom/Circle.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geo
 m/GeometryType.js';\nimport InteractionProperty from './Property.js';\nimport LineString from '../geom/LineString.js';\nimport MapBrowserEvent from '../MapBrowserEvent.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport Polygon, { fromCircle, makeRegular } from '../geom/Polygon.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { FALSE, TRUE } from '../functions.js';\nimport { always, noModifierKeys, shiftKeyOnly } from '../events/condition.js';\nimport { boundingExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight, } from '../extent.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { fromUserCoordinate, getUserProjection } from '
 ../proj.js';\nimport { getChangeEventType } from '../Object.js';\nimport { squaredDistance as squaredCoordinateDistance } from '../coordinate.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../geom/GeometryType.js\").default} type Geometry type of\n * the geometries being drawn with this instance.\n * @property {number} [clickTolerance=6] The maximum distance in pixels between\n * \"down\" and \"up\" for a \"up\" event to be considered a \"click\" event and\n * actually add a point/vertex to the geometry being drawn.  The default of `6`\n * was chosen for the draw interaction to behave correctly on mouse as well as\n * on touch devices.\n * @property {import(\"../Collection.js\").default<Feature>} [features]\n * Destination collection for the drawn features.\n * @property {VectorSource} [source] Destination source for\n * the drawn features.\n * @property {number} [dragVertexDelay=500] Delay in milliseconds after pointerdown\n * before the current vertex can be dragg
 ed to its exact position.\n * @property {number} [snapTolerance=12] Pixel distance for snapping to the\n * drawing finish.\n * @property {boolean} [stopClick=false] Stop click, singleclick, and\n * doubleclick events from firing during drawing.\n * @property {number} [maxPoints] The number of points that can be drawn before\n * a polygon ring or line string is finished. By default there is no\n * restriction.\n * @property {number} [minPoints] The number of points that must be drawn\n * before a polygon ring or line string can be finished. Default is `3` for\n * polygon rings and `2` for line strings.\n * @property {import(\"../events/condition.js\").Condition} [finishCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether the drawing can be finished.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style for sketch features.\n * @property {GeometryFunction} [geometryFunction]\n * Func
 tion that is called when a geometry's coordinates are updated.\n * @property {string} [geometryName] Geometry name to use for features created\n * by the draw interaction.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default {@link module:ol/events/condition~noModifierKeys}, i.e. a click,\n * adds a vertex or deactivates freehand drawing.\n * @property {boolean} [freehand=false] Operate in freehand mode for lines,\n * polygons, and circles.  This makes the interaction always operate in freehand\n * mode and takes precedence over any `freehandCondition` option.\n * @property {import(\"../events/condition.js\").Condition} [freehandCondition]\n * Condition that activates freehand drawing for lines and polygons. This\n * function takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * retu
 rns a boolean to indicate whether that event should be handled. The\n * default is {@link module:ol/events/condition~shiftKeyOnly}, meaning that the\n * Shift key activates freehand drawing.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n */\n/**\n * Coordinate type when drawing points.\n * @typedef {import(\"../coordinate.js\").Coordinate} PointCoordType\n */\n/**\n * Coordinate type when drawing lines.\n * @typedef {Array<import(\"../coordinate.js\").Coordinate>} LineCoordType\n */\n/**\n * Coordinate type when drawing polygons.\n * @typedef {Array<Array<import(\"../coordinate.js\").Coordinate>>} PolyCoordType\n */\n/**\n * Types used for drawing coordinates.\n * @typedef {PointCoordType|LineCoordType|PolyCoordType} SketchCoordType\n */\n/**\n * Function that takes an array of coordinates and an optional existing geometry\n * and a projection as arguments, and returns a geometry. The optional existing\n * geometry is the geometry that
  is returned when the function is called without\n * a second argument.\n * @typedef {function(!SketchCoordType, import(\"../geom/SimpleGeometry.js\").default=,\n *     import(\"../proj/Projection.js\").default=):\n *     import(\"../geom/SimpleGeometry.js\").default} GeometryFunction\n */\n/**\n * Draw mode.  This collapses multi-part geometry types with their single-part\n * cousins.\n * @enum {string}\n */\nvar Mode = {\n    POINT: 'Point',\n    LINE_STRING: 'LineString',\n    POLYGON: 'Polygon',\n    CIRCLE: 'Circle',\n};\n/**\n * @enum {string}\n */\nvar DrawEventType = {\n    /**\n     * Triggered upon feature draw start\n     * @event DrawEvent#drawstart\n     * @api\n     */\n    DRAWSTART: 'drawstart',\n    /**\n     * Triggered upon feature draw end\n     * @event DrawEvent#drawend\n     * @api\n     */\n    DRAWEND: 'drawend',\n    /**\n     * Triggered upon feature draw abortion\n     * @event DrawEvent#drawabort\n     * @api\n     */\n    DRAWABORT: 'drawabort',\n};\n/*
 *\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Draw~Draw} instances are\n * instances of this type.\n */\nvar DrawEvent = /** @class */ (function (_super) {\n    __extends(DrawEvent, _super);\n    /**\n     * @param {DrawEventType} type Type.\n     * @param {Feature} feature The feature drawn.\n     */\n    function DrawEvent(type, feature) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The feature being drawn.\n         * @type {Feature}\n         * @api\n         */\n        _this.feature = feature;\n        return _this;\n    }\n    return DrawEvent;\n}(Event));\n/**\n * @classdesc\n * Interaction for drawing feature geometries.\n *\n * @fires DrawEvent\n * @api\n */\nvar Draw = /** @class */ (function (_super) {\n    __extends(Draw, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function Draw(options) {\n        var _this = this;\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Opt
 ions} */ (options);\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FALSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.shouldHandle_ = false;\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         * @private\n         */\n        _this.downPx_ = null;\n        /**\n         * @type {?}\n         * @private\n         */\n        _this.downTimeout_;\n        /**\n         * @type {number|undefined}\n         * @private\n         */\n        _this.lastDragTime_;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.freehand_ = false;\n        /**\n         * Target source for drawn features.\n         * @type {VectorSource}\n         * @private\n         */\n        _this.source_ = options.source ? options.source : null;\n        /**\n         * Target collection for drawn features.\n  
        * @type {import(\"../Collection.js\").default<Feature>}\n         * @private\n         */\n        _this.features_ = options.features ? options.features : null;\n        /**\n         * Pixel distance for snapping.\n         * @type {number}\n         * @private\n         */\n        _this.snapTolerance_ = options.snapTolerance ? options.snapTolerance : 12;\n        /**\n         * Geometry type.\n         * @type {import(\"../geom/GeometryType.js\").default}\n         * @private\n         */\n        _this.type_ = /** @type {import(\"../geom/GeometryType.js\").default} */ (options.type);\n        /**\n         * Drawing mode (derived from geometry type.\n         * @type {Mode}\n         * @private\n         */\n        _this.mode_ = getMode(_this.type_);\n        /**\n         * Stop click, singleclick, and doubleclick events from firing during drawing.\n         * Default is `false`.\n         * @type {boolean}\n         * @private\n         */\n        _this.stopClick_ = 
 !!options.stopClick;\n        /**\n         * The number of points that must be drawn before a polygon ring or line\n         * string can be finished.  The default is 3 for polygon rings and 2 for\n         * line strings.\n         * @type {number}\n         * @private\n         */\n        _this.minPoints_ = options.minPoints\n            ? options.minPoints\n            : _this.mode_ === Mode.POLYGON\n                ? 3\n                : 2;\n        /**\n         * The number of points that can be drawn before a polygon ring or line string\n         * is finished. The default is no restriction.\n         * @type {number}\n         * @private\n         */\n        _this.maxPoints_ = options.maxPoints ? options.maxPoints : Infinity;\n        /**\n         * A function to decide if a potential finish coordinate is permissible\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.finishCondition_ = options.finishCondition
 \n            ? options.finishCondition\n            : TRUE;\n        var geometryFunction = options.geometryFunction;\n        if (!geometryFunction) {\n            if (_this.type_ === GeometryType.CIRCLE) {\n                /**\n                 * @param {!LineCoordType} coordinates The coordinates.\n                 * @param {import(\"../geom/SimpleGeometry.js\").default=} opt_geometry Optional geometry.\n                 * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n                 * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n                 */\n                geometryFunction = function (coordinates, opt_geometry, projection) {\n                    var circle = opt_geometry\n                        ? /** @type {Circle} */ (opt_geometry)\n                        : new Circle([NaN, NaN]);\n                    var center = fromUserCoordinate(coordinates[0], projection);\n                    var squaredLength = sq
 uaredCoordinateDistance(center, fromUserCoordinate(coordinates[1], projection));\n                    circle.setCenterAndRadius(center, Math.sqrt(squaredLength));\n                    var userProjection = getUserProjection();\n                    if (userProjection) {\n                        circle.transform(projection, userProjection);\n                    }\n                    return circle;\n                };\n            }\n            else {\n                var Constructor_1;\n                var mode_1 = _this.mode_;\n                if (mode_1 === Mode.POINT) {\n                    Constructor_1 = Point;\n                }\n                else if (mode_1 === Mode.LINE_STRING) {\n                    Constructor_1 = LineString;\n                }\n                else if (mode_1 === Mode.POLYGON) {\n                    Constructor_1 = Polygon;\n                }\n                /**\n                 * @param {!LineCoordType} coordinates The coordinates.\n                 
 * @param {import(\"../geom/SimpleGeometry.js\").default=} opt_geometry Optional geometry.\n                 * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n                 * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n                 */\n                geometryFunction = function (coordinates, opt_geometry, projection) {\n                    var geometry = opt_geometry;\n                    if (geometry) {\n                        if (mode_1 === Mode.POLYGON) {\n                            if (coordinates[0].length) {\n                                // Add a closing coordinate to match the first\n                                geometry.setCoordinates([\n                                    coordinates[0].concat([coordinates[0][0]]),\n                                ]);\n                            }\n                            else {\n                                geometry.setCoordinates([]);\n                    
         }\n                        }\n                        else {\n                            geometry.setCoordinates(coordinates);\n                        }\n                    }\n                    else {\n                        geometry = new Constructor_1(coordinates);\n                    }\n                    return geometry;\n                };\n            }\n        }\n        /**\n         * @type {GeometryFunction}\n         * @private\n         */\n        _this.geometryFunction_ = geometryFunction;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.dragVertexDelay_ =\n            options.dragVertexDelay !== undefined ? options.dragVertexDelay : 500;\n        /**\n         * Finish coordinate for the feature (first point for polygons, last point for\n         * linestrings).\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.finishCoordinate_ = null;\n        /**\n   
       * Sketch feature.\n         * @type {Feature}\n         * @private\n         */\n        _this.sketchFeature_ = null;\n        /**\n         * Sketch point.\n         * @type {Feature<Point>}\n         * @private\n         */\n        _this.sketchPoint_ = null;\n        /**\n         * Sketch coordinates. Used when drawing a line or polygon.\n         * @type {SketchCoordType}\n         * @private\n         */\n        _this.sketchCoords_ = null;\n        /**\n         * Sketch line. Used when drawing polygon.\n         * @type {Feature<LineString>}\n         * @private\n         */\n        _this.sketchLine_ = null;\n        /**\n         * Sketch line coordinates. Used when drawing a polygon or circle.\n         * @type {LineCoordType}\n         * @private\n         */\n        _this.sketchLineCoords_ = null;\n        /**\n         * Squared tolerance for handling up events.  If the squared distance\n         * between a down and up event is greater than this tolerance, up e
 vents\n         * will not be handled.\n         * @type {number}\n         * @private\n         */\n        _this.squaredClickTolerance_ = options.clickTolerance\n            ? options.clickTolerance * options.clickTolerance\n            : 36;\n        /**\n         * Draw overlay where our sketch features are drawn.\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.overlay_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: false,\n                wrapX: options.wrapX ? options.wrapX : false,\n            }),\n            style: options.style ? options.style : getDefaultStyleFunction(),\n            updateWhileInteracting: true,\n        });\n        /**\n         * Name of the geometry attribute for newly created features.\n         * @type {string|undefined}\n         * @private\n         */\n        _this.geometryName_ = options.geometryName;\n        /**\n         * @private\n         * @type {import(\".
 ./events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : noModifierKeys;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.freehandCondition_;\n        if (options.freehand) {\n            _this.freehandCondition_ = always;\n        }\n        else {\n            _this.freehandCondition_ = options.freehandCondition\n                ? options.freehandCondition\n                : shiftKeyOnly;\n        }\n        _this.addEventListener(getChangeEventType(InteractionProperty.ACTIVE), _this.updateState_);\n        return _this;\n    }\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Draw.prototype.setMap = function (map) {\n        _su
 per.prototype.setMap.call(this, map);\n        this.updateState_();\n    };\n    /**\n     * Get the overlay layer that this interaction renders sketch features to.\n     * @return {VectorLayer} Overlay layer.\n     * @api\n     */\n    Draw.prototype.getOverlay = function () {\n        return this.overlay_;\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may actually draw or finish the drawing.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @api\n     */\n    Draw.prototype.handleEvent = function (event) {\n        if (event.originalEvent.type === EventType.CONTEXTMENU) {\n            // Avoid context menu for long taps when drawing on mobile\n            event.preventDefault();\n        }\n        this.freehand_ =\n            this.mode_ !== Mode.POINT && this.freehandCondition_(event);\n        var move = event.type === MapBrowserE
 ventType.POINTERMOVE;\n        var pass = true;\n        if (!this.freehand_ &&\n            this.lastDragTime_ &&\n            event.type === MapBrowserEventType.POINTERDRAG) {\n            var now = Date.now();\n            if (now - this.lastDragTime_ >= this.dragVertexDelay_) {\n                this.downPx_ = event.pixel;\n                this.shouldHandle_ = !this.freehand_;\n                move = true;\n            }\n            else {\n                this.lastDragTime_ = undefined;\n            }\n            if (this.shouldHandle_ && this.downTimeout_ !== undefined) {\n                clearTimeout(this.downTimeout_);\n                this.downTimeout_ = undefined;\n            }\n        }\n        if (this.freehand_ &&\n            event.type === MapBrowserEventType.POINTERDRAG &&\n            this.sketchFeature_ !== null) {\n            this.addToDrawing_(event.coordinate);\n            pass = false;\n        }\n        else if (this.freehand_ &&\n            event.type
  === MapBrowserEventType.POINTERDOWN) {\n            pass = false;\n        }\n        else if (move) {\n            pass = event.type === MapBrowserEventType.POINTERMOVE;\n            if (pass && this.freehand_) {\n                this.handlePointerMove_(event);\n                if (this.shouldHandle_) {\n                    // Avoid page scrolling when freehand drawing on mobile\n                    event.preventDefault();\n                }\n            }\n            else if (event.originalEvent.pointerType == 'mouse' ||\n                (event.type === MapBrowserEventType.POINTERDRAG &&\n                    this.downTimeout_ === undefined)) {\n                this.handlePointerMove_(event);\n            }\n        }\n        else if (event.type === MapBrowserEventType.DBLCLICK) {\n            pass = false;\n        }\n        return _super.prototype.handleEvent.call(this, event) && pass;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowser
 Event.js\").default} event Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Draw.prototype.handleDownEvent = function (event) {\n        this.shouldHandle_ = !this.freehand_;\n        if (this.freehand_) {\n            this.downPx_ = event.pixel;\n            if (!this.finishCoordinate_) {\n                this.startDrawing_(event);\n            }\n            return true;\n        }\n        else if (this.condition_(event)) {\n            this.lastDragTime_ = Date.now();\n            this.downTimeout_ = setTimeout(function () {\n                this.handlePointerMove_(new MapBrowserEvent(MapBrowserEventType.POINTERMOVE, event.map, event.originalEvent, false, event.frameState));\n            }.bind(this), this.dragVertexDelay_);\n            this.downPx_ = event.pixel;\n            return true;\n        }\n        else {\n            this.lastDragTime_ = undefined;\n            return false;\n        }\n    };\n    /**\n     * Handle pointer up events.\n    
  * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Draw.prototype.handleUpEvent = function (event) {\n        var pass = true;\n        if (this.downTimeout_) {\n            clearTimeout(this.downTimeout_);\n            this.downTimeout_ = undefined;\n        }\n        this.handlePointerMove_(event);\n        var circleMode = this.mode_ === Mode.CIRCLE;\n        if (this.shouldHandle_) {\n            if (!this.finishCoordinate_) {\n                this.startDrawing_(event);\n                if (this.mode_ === Mode.POINT) {\n                    this.finishDrawing();\n                }\n            }\n            else if (this.freehand_ || circleMode) {\n                this.finishDrawing();\n            }\n            else if (this.atFinish_(event)) {\n                if (this.finishCondition_(event)) {\n                    this.finishDrawing();\n                }\n            }\n            else {\n 
                this.addToDrawing_(event.coordinate);\n            }\n            pass = false;\n        }\n        else if (this.freehand_) {\n            this.abortDrawing();\n        }\n        if (!pass && this.stopClick_) {\n            event.stopPropagation();\n        }\n        return pass;\n    };\n    /**\n     * Handle move events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event A move event.\n     * @private\n     */\n    Draw.prototype.handlePointerMove_ = function (event) {\n        if (this.downPx_ &&\n            ((!this.freehand_ && this.shouldHandle_) ||\n                (this.freehand_ && !this.shouldHandle_))) {\n            var downPx = this.downPx_;\n            var clickPx = event.pixel;\n            var dx = downPx[0] - clickPx[0];\n            var dy = downPx[1] - clickPx[1];\n            var squaredDistance = dx * dx + dy * dy;\n            this.shouldHandle_ = this.freehand_\n                ? squaredDistance > this.squaredClickTolerance_\n
                 : squaredDistance <= this.squaredClickTolerance_;\n            if (!this.shouldHandle_) {\n                return;\n            }\n        }\n        if (this.finishCoordinate_) {\n            this.modifyDrawing_(event);\n        }\n        else {\n            this.createOrUpdateSketchPoint_(event);\n        }\n    };\n    /**\n     * Determine if an event is within the snapping tolerance of the start coord.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} The event is within the snapping tolerance of the start.\n     * @private\n     */\n    Draw.prototype.atFinish_ = function (event) {\n        var at = false;\n        if (this.sketchFeature_) {\n            var potentiallyDone = false;\n            var potentiallyFinishCoordinates = [this.finishCoordinate_];\n            if (this.mode_ === Mode.LINE_STRING) {\n                potentiallyDone = this.sketchCoords_.length > this.minPoints_;\n            }\n            
 else if (this.mode_ === Mode.POLYGON) {\n                var sketchCoords = /** @type {PolyCoordType} */ (this.sketchCoords_);\n                potentiallyDone = sketchCoords[0].length > this.minPoints_;\n                potentiallyFinishCoordinates = [\n                    sketchCoords[0][0],\n                    sketchCoords[0][sketchCoords[0].length - 2],\n                ];\n            }\n            if (potentiallyDone) {\n                var map = event.map;\n                for (var i = 0, ii = potentiallyFinishCoordinates.length; i < ii; i++) {\n                    var finishCoordinate = potentiallyFinishCoordinates[i];\n                    var finishPixel = map.getPixelFromCoordinate(finishCoordinate);\n                    var pixel = event.pixel;\n                    var dx = pixel[0] - finishPixel[0];\n                    var dy = pixel[1] - finishPixel[1];\n                    var snapTolerance = this.freehand_ ? 1 : this.snapTolerance_;\n                    at = Math.s
 qrt(dx * dx + dy * dy) <= snapTolerance;\n                    if (at) {\n                        this.finishCoordinate_ = finishCoordinate;\n                        break;\n                    }\n                }\n            }\n        }\n        return at;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @private\n     */\n    Draw.prototype.createOrUpdateSketchPoint_ = function (event) {\n        var coordinates = event.coordinate.slice();\n        if (!this.sketchPoint_) {\n            this.sketchPoint_ = new Feature(new Point(coordinates));\n            this.updateSketchFeatures_();\n        }\n        else {\n            var sketchPointGeom = this.sketchPoint_.getGeometry();\n            sketchPointGeom.setCoordinates(coordinates);\n        }\n    };\n    /**\n     * Start the drawing.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @private\n     */\n    Draw.prototype.startDrawing_ = function (e
 vent) {\n        var start = event.coordinate;\n        var projection = event.map.getView().getProjection();\n        this.finishCoordinate_ = start;\n        if (this.mode_ === Mode.POINT) {\n            this.sketchCoords_ = start.slice();\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            this.sketchCoords_ = [[start.slice(), start.slice()]];\n            this.sketchLineCoords_ = this.sketchCoords_[0];\n        }\n        else {\n            this.sketchCoords_ = [start.slice(), start.slice()];\n        }\n        if (this.sketchLineCoords_) {\n            this.sketchLine_ = new Feature(new LineString(this.sketchLineCoords_));\n        }\n        var geometry = this.geometryFunction_(this.sketchCoords_, undefined, projection);\n        this.sketchFeature_ = new Feature();\n        if (this.geometryName_) {\n            this.sketchFeature_.setGeometryName(this.geometryName_);\n        }\n        this.sketchFeature_.setGeometry(geometry);\n        this.updateSk
 etchFeatures_();\n        this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n    };\n    /**\n     * Modify the drawing.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @private\n     */\n    Draw.prototype.modifyDrawing_ = function (event) {\n        var coordinate = event.coordinate;\n        var geometry = this.sketchFeature_.getGeometry();\n        var projection = event.map.getView().getProjection();\n        var coordinates, last;\n        if (this.mode_ === Mode.POINT) {\n            last = this.sketchCoords_;\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n            last = coordinates[coordinates.length - 1];\n            if (this.atFinish_(event)) {\n                // snap to finish\n                coordinate = this.finishCoordinate_.slice();\n            }\n        }\n        else {\n            coordinates = this.
 sketchCoords_;\n            last = coordinates[coordinates.length - 1];\n        }\n        last[0] = coordinate[0];\n        last[1] = coordinate[1];\n        this.geometryFunction_(\n        /** @type {!LineCoordType} */ (this.sketchCoords_), geometry, projection);\n        if (this.sketchPoint_) {\n            var sketchPointGeom = this.sketchPoint_.getGeometry();\n            sketchPointGeom.setCoordinates(coordinate);\n        }\n        /** @type {LineString} */\n        var sketchLineGeom;\n        if (geometry.getType() == GeometryType.POLYGON &&\n            this.mode_ !== Mode.POLYGON) {\n            if (!this.sketchLine_) {\n                this.sketchLine_ = new Feature();\n            }\n            var ring = geometry.getLinearRing(0);\n            sketchLineGeom = this.sketchLine_.getGeometry();\n            if (!sketchLineGeom) {\n                sketchLineGeom = new LineString(ring.getFlatCoordinates(), ring.getLayout());\n                this.sketchLine_.setGeometr
 y(sketchLineGeom);\n            }\n            else {\n                sketchLineGeom.setFlatCoordinates(ring.getLayout(), ring.getFlatCoordinates());\n                sketchLineGeom.changed();\n            }\n        }\n        else if (this.sketchLineCoords_) {\n            sketchLineGeom = this.sketchLine_.getGeometry();\n            sketchLineGeom.setCoordinates(this.sketchLineCoords_);\n        }\n        this.updateSketchFeatures_();\n    };\n    /**\n     * Add a new coordinate to the drawing.\n     * @param {!PointCoordType} coordinate Coordinate\n     * @private\n     */\n    Draw.prototype.addToDrawing_ = function (coordinate) {\n        var geometry = this.sketchFeature_.getGeometry();\n        var projection = this.getMap().getView().getProjection();\n        var done;\n        var coordinates;\n        if (this.mode_ === Mode.LINE_STRING) {\n            this.finishCoordinate_ = coordinate.slice();\n            coordinates = /** @type {LineCoordType} */ (this.sketchCoord
 s_);\n            if (coordinates.length >= this.maxPoints_) {\n                if (this.freehand_) {\n                    coordinates.pop();\n                }\n                else {\n                    done = true;\n                }\n            }\n            coordinates.push(coordinate.slice());\n            this.geometryFunction_(coordinates, geometry, projection);\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n            if (coordinates.length >= this.maxPoints_) {\n                if (this.freehand_) {\n                    coordinates.pop();\n                }\n                else {\n                    done = true;\n                }\n            }\n            coordinates.push(coordinate.slice());\n            if (done) {\n                this.finishCoordinate_ = coordinates[0];\n            }\n            this.geometryFunction_(this.sketchCoords_, geometry, projection);\n   
      }\n        this.updateSketchFeatures_();\n        if (done) {\n            this.finishDrawing();\n        }\n    };\n    /**\n     * Remove last point of the feature currently being drawn.\n     * @api\n     */\n    Draw.prototype.removeLastPoint = function () {\n        if (!this.sketchFeature_) {\n            return;\n        }\n        var geometry = this.sketchFeature_.getGeometry();\n        var projection = this.getMap().getView().getProjection();\n        var coordinates;\n        /** @type {LineString} */\n        var sketchLineGeom;\n        if (this.mode_ === Mode.LINE_STRING) {\n            coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n            coordinates.splice(-2, 1);\n            this.geometryFunction_(coordinates, geometry, projection);\n            if (coordinates.length >= 2) {\n                this.finishCoordinate_ = coordinates[coordinates.length - 2].slice();\n            }\n        }\n        else if (this.mode_ === Mode.POLYGON) {\
 n            coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n            coordinates.splice(-2, 1);\n            sketchLineGeom = this.sketchLine_.getGeometry();\n            sketchLineGeom.setCoordinates(coordinates);\n            this.geometryFunction_(this.sketchCoords_, geometry, projection);\n        }\n        if (coordinates.length === 0) {\n            this.abortDrawing();\n        }\n        this.updateSketchFeatures_();\n    };\n    /**\n     * Stop drawing and add the sketch feature to the target layer.\n     * The {@link module:ol/interaction/Draw~DrawEventType.DRAWEND} event is\n     * dispatched before inserting the feature.\n     * @api\n     */\n    Draw.prototype.finishDrawing = function () {\n        var sketchFeature = this.abortDrawing_();\n        if (!sketchFeature) {\n            return;\n        }\n        var coordinates = this.sketchCoords_;\n        var geometry = sketchFeature.getGeometry();\n        var projection = this.getMap().get
 View().getProjection();\n        if (this.mode_ === Mode.LINE_STRING) {\n            // remove the redundant last point\n            coordinates.pop();\n            this.geometryFunction_(coordinates, geometry, projection);\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            // remove the redundant last point in ring\n            /** @type {PolyCoordType} */ (coordinates)[0].pop();\n            this.geometryFunction_(coordinates, geometry, projection);\n            coordinates = geometry.getCoordinates();\n        }\n        // cast multi-part geometries\n        if (this.type_ === GeometryType.MULTI_POINT) {\n            sketchFeature.setGeometry(new MultiPoint([/** @type {PointCoordType} */ (coordinates)]));\n        }\n        else if (this.type_ === GeometryType.MULTI_LINE_STRING) {\n            sketchFeature.setGeometry(new MultiLineString([/** @type {LineCoordType} */ (coordinates)]));\n        }\n        else if (this.type_ === GeometryType.MULTI_POLYGON)
  {\n            sketchFeature.setGeometry(new MultiPolygon([/** @type {PolyCoordType} */ (coordinates)]));\n        }\n        // First dispatch event to allow full set up of feature\n        this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND, sketchFeature));\n        // Then insert feature\n        if (this.features_) {\n            this.features_.push(sketchFeature);\n        }\n        if (this.source_) {\n            this.source_.addFeature(sketchFeature);\n        }\n    };\n    /**\n     * Stop drawing without adding the sketch feature to the target layer.\n     * @return {Feature} The sketch feature (or null if none).\n     * @private\n     */\n    Draw.prototype.abortDrawing_ = function () {\n        this.finishCoordinate_ = null;\n        var sketchFeature = this.sketchFeature_;\n        this.sketchFeature_ = null;\n        this.sketchPoint_ = null;\n        this.sketchLine_ = null;\n        this.overlay_.getSource().clear(true);\n        return sketchFeature;\n    };\
 n    /**\n     * Stop drawing without adding the sketch feature to the target layer.\n     * @api\n     */\n    Draw.prototype.abortDrawing = function () {\n        var sketchFeature = this.abortDrawing_();\n        if (sketchFeature) {\n            this.dispatchEvent(new DrawEvent(DrawEventType.DRAWABORT, sketchFeature));\n        }\n    };\n    /**\n     * Append coordinates to the end of the geometry that is currently being drawn.\n     * This can be used when drawing LineStrings or Polygons. Coordinates will\n     * either be appended to the current LineString or the outer ring of the current\n     * Polygon.\n     * @param {!LineCoordType} coordinates Linear coordinates to be appended into\n     * the coordinate array.\n     * @api\n     */\n    Draw.prototype.appendCoordinates = function (coordinates) {\n        var mode = this.mode_;\n        var sketchCoords = [];\n        if (mode === Mode.LINE_STRING) {\n            sketchCoords = /** @type {LineCoordType} */ this.sketchCo
 ords_;\n        }\n        else if (mode === Mode.POLYGON) {\n            sketchCoords =\n                this.sketchCoords_ && this.sketchCoords_.length\n                    ? /** @type {PolyCoordType} */ (this.sketchCoords_)[0]\n                    : [];\n        }\n        // Remove last coordinate from sketch drawing (this coordinate follows cursor position)\n        var ending = sketchCoords.pop();\n        // Append coordinate list\n        for (var i = 0; i < coordinates.length; i++) {\n            this.addToDrawing_(coordinates[i]);\n        }\n        // Duplicate last coordinate for sketch drawing\n        this.addToDrawing_(ending);\n    };\n    /**\n     * Initiate draw mode by starting from an existing geometry which will\n     * receive new additional points. This only works on features with\n     * `LineString` geometries, where the interaction will extend lines by adding\n     * points to the end of the coordinates array.\n     * This will change the original feature
 , instead of drawing a copy.\n     *\n     * The function will dispatch a `drawstart` event.\n     *\n     * @param {!Feature<LineString>} feature Feature to be extended.\n     * @api\n     */\n    Draw.prototype.extend = function (feature) {\n        var geometry = feature.getGeometry();\n        var lineString = geometry;\n        this.sketchFeature_ = feature;\n        this.sketchCoords_ = lineString.getCoordinates();\n        var last = this.sketchCoords_[this.sketchCoords_.length - 1];\n        this.finishCoordinate_ = last.slice();\n        this.sketchCoords_.push(last.slice());\n        this.updateSketchFeatures_();\n        this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n    };\n    /**\n     * Redraw the sketch features.\n     * @private\n     */\n    Draw.prototype.updateSketchFeatures_ = function () {\n        var sketchFeatures = [];\n        if (this.sketchFeature_) {\n            sketchFeatures.push(this.sketchFeature_);\n        }\n  
       if (this.sketchLine_) {\n            sketchFeatures.push(this.sketchLine_);\n        }\n        if (this.sketchPoint_) {\n            sketchFeatures.push(this.sketchPoint_);\n        }\n        var overlaySource = this.overlay_.getSource();\n        overlaySource.clear(true);\n        overlaySource.addFeatures(sketchFeatures);\n    };\n    /**\n     * @private\n     */\n    Draw.prototype.updateState_ = function () {\n        var map = this.getMap();\n        var active = this.getActive();\n        if (!map || !active) {\n            this.abortDrawing();\n        }\n        this.overlay_.setMap(active ? map : null);\n    };\n    return Draw;\n}(PointerInteraction));\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n    var styles = createEditingStyle();\n    return function (feature, resolution) {\n        return styles[feature.getGeometry().getType()];\n    };\n}\n/**\n * Create a `geometryFunction` for `type: '
 Circle'` that will create a regular\n * polygon with a user specified number of sides and start angle instead of an\n * `import(\"../geom/Circle.js\").Circle` geometry.\n * @param {number=} opt_sides Number of sides of the regular polygon. Default is\n *     32.\n * @param {number=} opt_angle Angle of the first point in radians. 0 means East.\n *     Default is the angle defined by the heading from the center of the\n *     regular polygon to the current pointer position.\n * @return {GeometryFunction} Function that draws a\n *     polygon.\n * @api\n */\nexport function createRegularPolygon(opt_sides, opt_angle) {\n    return function (coordinates, opt_geometry, projection) {\n        var center = fromUserCoordinate(\n        /** @type {LineCoordType} */ (coordinates)[0], projection);\n        var end = fromUserCoordinate(\n        /** @type {LineCoordType} */ (coordinates)[1], projection);\n        var radius = Math.sqrt(squaredCoordinateDistance(center, end));\n        var geomet
 ry = opt_geometry\n            ? /** @type {Polygon} */ (opt_geometry)\n            : fromCircle(new Circle(center), opt_sides);\n        var angle = opt_angle;\n        if (!opt_angle) {\n            var x = end[0] - center[0];\n            var y = end[1] - center[1];\n            angle = Math.atan(y / x) - (x < 0 ? Math.PI : 0);\n        }\n        makeRegular(geometry, center, radius, angle);\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            geometry.transform(projection, userProjection);\n        }\n        return geometry;\n    };\n}\n/**\n * Create a `geometryFunction` that will create a box-shaped polygon (aligned\n * with the coordinate system axes).  Use this with the draw interaction and\n * `type: 'Circle'` to return a box instead of a circle geometry.\n * @return {GeometryFunction} Function that draws a box-shaped polygon.\n * @api\n */\nexport function createBox() {\n    return function (coordinates, opt_geometry, projection)
  {\n        var extent = boundingExtent(\n        /** @type {LineCoordType} */ (coordinates).map(function (coordinate) {\n            return fromUserCoordinate(coordinate, projection);\n        }));\n        var boxCoordinates = [\n            [\n                getBottomLeft(extent),\n                getBottomRight(extent),\n                getTopRight(extent),\n                getTopLeft(extent),\n                getBottomLeft(extent),\n            ],\n        ];\n        var geometry = opt_geometry;\n        if (geometry) {\n            geometry.setCoordinates(boxCoordinates);\n        }\n        else {\n            geometry = new Polygon(boxCoordinates);\n        }\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            geometry.transform(projection, userProjection);\n        }\n        return geometry;\n    };\n}\n/**\n * Get the drawing mode.  The mode for mult-part geometries is the same as for\n * their single-part cousins.\n * @param {
 import(\"../geom/GeometryType.js\").default} type Geometry type.\n * @return {Mode} Drawing mode.\n */\nfunction getMode(type) {\n    var mode;\n    if (type === GeometryType.POINT || type === GeometryType.MULTI_POINT) {\n        mode = Mode.POINT;\n    }\n    else if (type === GeometryType.LINE_STRING ||\n        type === GeometryType.MULTI_LINE_STRING) {\n        mode = Mode.LINE_STRING;\n    }\n    else if (type === GeometryType.POLYGON ||\n        type === GeometryType.MULTI_POLYGON) {\n        mode = Mode.POLYGON;\n    }\n    else if (type === GeometryType.CIRCLE) {\n        mode = Mode.CIRCLE;\n    }\n    return /** @type {!Mode} */ (mode);\n}\nexport default Draw;\n//# sourceMappingURL=Draw.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (
 var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Extent\n */\nimport Event from '../events/Event.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { always } from '../events/condition.js';\nimport { boundingExtent, getArea } from '../extent.js';\nimport { closestOnSegment, distance as coordinateDistance, squaredDistance as squaredCoordinateDistance, squaredDistanceToSegment, } from '../coordinat
 e.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { fromExtent as polygonFromExtent } from '../geom/Polygon.js';\nimport { toUserExtent } from '../proj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~always}.\n * @property {import(\"../extent.js\").Extent} [extent] Initial extent. Defaults to no\n * initial extent.\n * @property {import(\"../style/Style.js\").StyleLike} [boxStyle]\n * Style for the drawn extent box. Defaults to\n * {@link module:ol/style/Style~createEditing()['Polygon']}\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the\n * pointer close enough to a segment or vertex for editing.\n * @property {import(\"../style/Style.js\").StyleLike} [pointerStyle]\n 
 * Style for the cursor used to draw the extent. Defaults to\n * {@link module:ol/style/Style~createEditing()['Point']}\n * @property {boolean} [wrapX=false] Wrap the drawn extent across multiple maps\n * in the X direction? Only affects visuals, not functionality.\n */\n/**\n * @enum {string}\n */\nvar ExtentEventType = {\n    /**\n     * Triggered after the extent is changed\n     * @event ExtentEvent#extentchanged\n     * @api\n     */\n    EXTENTCHANGED: 'extentchanged',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Extent~Extent} instances are\n * instances of this type.\n */\nvar ExtentEvent = /** @class */ (function (_super) {\n    __extends(ExtentEvent, _super);\n    /**\n     * @param {import(\"../extent.js\").Extent} extent the new extent\n     */\n    function ExtentEvent(extent) {\n        var _this = _super.call(this, ExtentEventType.EXTENTCHANGED) || this;\n        /**\n         * The current extent.\n         * @type {import(\"../extent.js\
 ").Extent}\n         * @api\n         */\n        _this.extent = extent;\n        return _this;\n    }\n    return ExtentEvent;\n}(Event));\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map.\n * Once drawn, the vector box can be modified by dragging its vertices or edges.\n * This interaction is only supported for mouse devices.\n *\n * @fires ExtentEvent\n * @api\n */\nvar Extent = /** @class */ (function (_super) {\n    __extends(Extent, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Extent(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        _this = _super.call(this, /** @type {import(\"./Pointer.js\").Options} */ (options)) || this;\n        /**\n         * Condition\n         * @type {import(\"../events/condition.js\").Condition}\n         * @private\n         */\n        _this.condition_ = options.condition ? options.condition : always;\n        /**\n
          * Extent of the drawn box\n         * @type {import(\"../extent.js\").Extent}\n         * @private\n         */\n        _this.extent_ = null;\n        /**\n         * Handler for pointer move events\n         * @type {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent|null}\n         * @private\n         */\n        _this.pointerHandler_ = null;\n        /**\n         * Pixel threshold to snap to extent\n         * @type {number}\n         * @private\n         */\n        _this.pixelTolerance_ =\n            options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n        /**\n         * Is the pointer snapped to an extent vertex\n         * @type {boolean}\n         * @private\n         */\n        _this.snappedToVertex_ = false;\n        /**\n         * Feature for displaying the visible extent\n         * @type {Feature}\n         * @private\n         */\n        _this.extentFeature_ = null;\n        /**\n         * Feature f
 or displaying the visible pointer\n         * @type {Feature<Point>}\n         * @private\n         */\n        _this.vertexFeature_ = null;\n        if (!opt_options) {\n            opt_options = {};\n        }\n        /**\n         * Layer for the extentFeature\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.extentOverlay_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: false,\n                wrapX: !!opt_options.wrapX,\n            }),\n            style: opt_options.boxStyle\n                ? opt_options.boxStyle\n                : getDefaultExtentStyleFunction(),\n            updateWhileAnimating: true,\n            updateWhileInteracting: true,\n        });\n        /**\n         * Layer for the vertexFeature\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.vertexOverlay_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: 
 false,\n                wrapX: !!opt_options.wrapX,\n            }),\n            style: opt_options.pointerStyle\n                ? opt_options.pointerStyle\n                : getDefaultPointerStyleFunction(),\n            updateWhileAnimating: true,\n            updateWhileInteracting: true,\n        });\n        if (opt_options.extent) {\n            _this.setExtent(opt_options.extent);\n        }\n        return _this;\n    }\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel cursor location\n     * @param {import(\"../PluggableMap.js\").default} map map\n     * @returns {import(\"../coordinate.js\").Coordinate|null} snapped vertex on extent\n     * @private\n     */\n    Extent.prototype.snapToVertex_ = function (pixel, map) {\n        var pixelCoordinate = map.getCoordinateFromPixelInternal(pixel);\n        var sortByDistance = function (a, b) {\n            return (squaredDistanceToSegment(pixelCoordinate, a) -\n                squaredDistanceToSegment(pixelCoordin
 ate, b));\n        };\n        var extent = this.getExtentInternal();\n        if (extent) {\n            //convert extents to line segments and find the segment closest to pixelCoordinate\n            var segments = getSegments(extent);\n            segments.sort(sortByDistance);\n            var closestSegment = segments[0];\n            var vertex = closestOnSegment(pixelCoordinate, closestSegment);\n            var vertexPixel = map.getPixelFromCoordinateInternal(vertex);\n            //if the distance is within tolerance, snap to the segment\n            if (coordinateDistance(pixel, vertexPixel) <= this.pixelTolerance_) {\n                //test if we should further snap to a vertex\n                var pixel1 = map.getPixelFromCoordinateInternal(closestSegment[0]);\n                var pixel2 = map.getPixelFromCoordinateInternal(closestSegment[1]);\n                var squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n                var squaredDist2 = squaredCo
 ordinateDistance(vertexPixel, pixel2);\n                var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n                this.snappedToVertex_ = dist <= this.pixelTolerance_;\n                if (this.snappedToVertex_) {\n                    vertex =\n                        squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];\n                }\n                return vertex;\n            }\n        }\n        return null;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent pointer move event\n     * @private\n     */\n    Extent.prototype.handlePointerMove_ = function (mapBrowserEvent) {\n        var pixel = mapBrowserEvent.pixel;\n        var map = mapBrowserEvent.map;\n        var vertex = this.snapToVertex_(pixel, map);\n        if (!vertex) {\n            vertex = map.getCoordinateFromPixelInternal(pixel);\n        }\n        this.createOrUpdatePointerFeature_(vertex);\n    };\n    /**\n     * @param {import(\
 "../extent.js\").Extent} extent extent\n     * @returns {Feature} extent as featrue\n     * @private\n     */\n    Extent.prototype.createOrUpdateExtentFeature_ = function (extent) {\n        var extentFeature = this.extentFeature_;\n        if (!extentFeature) {\n            if (!extent) {\n                extentFeature = new Feature({});\n            }\n            else {\n                extentFeature = new Feature(polygonFromExtent(extent));\n            }\n            this.extentFeature_ = extentFeature;\n            this.extentOverlay_.getSource().addFeature(extentFeature);\n        }\n        else {\n            if (!extent) {\n                extentFeature.setGeometry(undefined);\n            }\n            else {\n                extentFeature.setGeometry(polygonFromExtent(extent));\n            }\n        }\n        return extentFeature;\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} vertex location of feature\n     * @returns {Feature} vertex as
  feature\n     * @private\n     */\n    Extent.prototype.createOrUpdatePointerFeature_ = function (vertex) {\n        var vertexFeature = this.vertexFeature_;\n        if (!vertexFeature) {\n            vertexFeature = new Feature(new Point(vertex));\n            this.vertexFeature_ = vertexFeature;\n            this.vertexOverlay_.getSource().addFeature(vertexFeature);\n        }\n        else {\n            var geometry = vertexFeature.getGeometry();\n            geometry.setCoordinates(vertex);\n        }\n        return vertexFeature;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    Extent.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!mapBrowserEvent.originalEvent || !this.condition_(mapBrowserEvent)) {\n            return true;\n        }\n        //display pointer (if not dragging)\n        if (mapBrowserEvent.type == Map
 BrowserEventType.POINTERMOVE &&\n            !this.handlingDownUpSequence) {\n            this.handlePointerMove_(mapBrowserEvent);\n        }\n        //call pointer to determine up/down/drag\n        _super.prototype.handleEvent.call(this, mapBrowserEvent);\n        //return false to stop propagation\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Extent.prototype.handleDownEvent = function (mapBrowserEvent) {\n        var pixel = mapBrowserEvent.pixel;\n        var map = mapBrowserEvent.map;\n        var extent = this.getExtentInternal();\n        var vertex = this.snapToVertex_(pixel, map);\n        //find the extent corner opposite the passed corner\n        var getOpposingPoint = function (point) {\n            var x_ = null;\n            var y_ = null;\n            if (point[0] == extent[0]) {\n       
          x_ = extent[2];\n            }\n            else if (point[0] == extent[2]) {\n                x_ = extent[0];\n            }\n            if (point[1] == extent[1]) {\n                y_ = extent[3];\n            }\n            else if (point[1] == extent[3]) {\n                y_ = extent[1];\n            }\n            if (x_ !== null && y_ !== null) {\n                return [x_, y_];\n            }\n            return null;\n        };\n        if (vertex && extent) {\n            var x = vertex[0] == extent[0] || vertex[0] == extent[2] ? vertex[0] : null;\n            var y = vertex[1] == extent[1] || vertex[1] == extent[3] ? vertex[1] : null;\n            //snap to point\n            if (x !== null && y !== null) {\n                this.pointerHandler_ = getPointHandler(getOpposingPoint(vertex));\n                //snap to edge\n            }\n            else if (x !== null) {\n                this.pointerHandler_ = getEdgeHandler(getOpposingPoint([x, extent[1]]), g
 etOpposingPoint([x, extent[3]]));\n            }\n            else if (y !== null) {\n                this.pointerHandler_ = getEdgeHandler(getOpposingPoint([extent[0], y]), getOpposingPoint([extent[2], y]));\n            }\n            //no snap - new bbox\n        }\n        else {\n            vertex = map.getCoordinateFromPixelInternal(pixel);\n            this.setExtent([vertex[0], vertex[1], vertex[0], vertex[1]]);\n            this.pointerHandler_ = getPointHandler(vertex);\n        }\n        return true; //event handled; start downup sequence\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    Extent.prototype.handleDragEvent = function (mapBrowserEvent) {\n        if (this.pointerHandler_) {\n            var pixelCoordinate = mapBrowserEvent.coordinate;\n            this.setExtent(this.pointerHandler_(pixelCoordinate));\n            this.createOrUpdatePointerFeature_(pixelCoord
 inate);\n        }\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Extent.prototype.handleUpEvent = function (mapBrowserEvent) {\n        this.pointerHandler_ = null;\n        //If bbox is zero area, set to null;\n        var extent = this.getExtentInternal();\n        if (!extent || getArea(extent) === 0) {\n            this.setExtent(null);\n        }\n        return false; //Stop handling downup sequence\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Extent.prototype.setMap = function (map) {\n        this.extentOverlay_.setMap(map);\n        this.vertexOverlay_.setMap(map);\n        _super.prototype.set
 Map.call(this, map);\n    };\n    /**\n     * Returns the current drawn extent in the view projection (or user projection if set)\n     *\n     * @return {import(\"../extent.js\").Extent} Drawn extent in the view projection.\n     * @api\n     */\n    Extent.prototype.getExtent = function () {\n        return toUserExtent(this.getExtentInternal(), this.getMap().getView().getProjection());\n    };\n    /**\n     * Returns the current drawn extent in the view projection\n     *\n     * @return {import(\"../extent.js\").Extent} Drawn extent in the view projection.\n     * @api\n     */\n    Extent.prototype.getExtentInternal = function () {\n        return this.extent_;\n    };\n    /**\n     * Manually sets the drawn extent, using the view projection.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent\n     * @api\n     */\n    Extent.prototype.setExtent = function (extent) {\n        //Null extent means no bbox\n        this.extent_ = extent ? extent : null;\n    
     this.createOrUpdateExtentFeature_(extent);\n        this.dispatchEvent(new ExtentEvent(this.extent_));\n    };\n    return Extent;\n}(PointerInteraction));\n/**\n * Returns the default style for the drawn bbox\n *\n * @return {import(\"../style/Style.js\").StyleFunction} Default Extent style\n */\nfunction getDefaultExtentStyleFunction() {\n    var style = createEditingStyle();\n    return function (feature, resolution) {\n        return style[GeometryType.POLYGON];\n    };\n}\n/**\n * Returns the default style for the pointer\n *\n * @return {import(\"../style/Style.js\").StyleFunction} Default pointer style\n */\nfunction getDefaultPointerStyleFunction() {\n    var style = createEditingStyle();\n    return function (feature, resolution) {\n        return style[GeometryType.POINT];\n    };\n}\n/**\n * @param {import(\"../coordinate.js\").Coordinate} fixedPoint corner that will be unchanged in the new extent\n * @returns {function (import(\"../coordinate.js\").Coordinate): impor
 t(\"../extent.js\").Extent} event handler\n */\nfunction getPointHandler(fixedPoint) {\n    return function (point) {\n        return boundingExtent([fixedPoint, point]);\n    };\n}\n/**\n * @param {import(\"../coordinate.js\").Coordinate} fixedP1 first corner that will be unchanged in the new extent\n * @param {import(\"../coordinate.js\").Coordinate} fixedP2 second corner that will be unchanged in the new extent\n * @returns {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent|null} event handler\n */\nfunction getEdgeHandler(fixedP1, fixedP2) {\n    if (fixedP1[0] == fixedP2[0]) {\n        return function (point) {\n            return boundingExtent([fixedP1, [point[0], fixedP2[1]]]);\n        };\n    }\n    else if (fixedP1[1] == fixedP2[1]) {\n        return function (point) {\n            return boundingExtent([fixedP1, [fixedP2[0], point[1]]]);\n        };\n    }\n    else {\n        return null;\n    }\n}\n/**\n * @param {import(\"../extent.js
 \").Extent} extent extent\n * @returns {Array<Array<import(\"../coordinate.js\").Coordinate>>} extent line segments\n */\nfunction getSegments(extent) {\n    return [\n        [\n            [extent[0], extent[1]],\n            [extent[0], extent[3]],\n        ],\n        [\n            [extent[0], extent[3]],\n            [extent[2], extent[3]],\n        ],\n        [\n            [extent[2], extent[3]],\n            [extent[2], extent[1]],\n        ],\n        [\n            [extent[2], extent[1]],\n            [extent[0], extent[1]],\n        ],\n    ];\n}\nexport default Extent;\n//# sourceMappingURL=Extent.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b)
 ;\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Modify\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport RBush from '../structs/RBush.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { altKeyOnly, always, primaryAction, singleClick, } from '../events/condition.js'
 ;\nimport { boundingExtent, buffer as bufferExtent, createOrUpdateFromCoordinate as createExtent, } from '../extent.js';\nimport { closestOnSegment, distance as coordinateDistance, equals as coordinatesEqual, squaredDistance as squaredCoordinateDistance, squaredDistanceToSegment, } from '../coordinate.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { equals } from '../array.js';\nimport { fromCircle } from '../geom/Polygon.js';\nimport { fromUserCoordinate, fromUserExtent, getUserProjection, toUserCoordinate, toUserExtent, } from '../proj.js';\nimport { getUid } from '../util.js';\n/**\n * The segment index assigned to a circle's center when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nvar CIRCLE_CENTER_INDEX = 0;\n/**\n * The segment index assigned to a circle's circumference when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nvar CIRCLE_CIRCUMFERENCE_INDEX = 1;\nvar tempExtent =
  [0, 0, 0, 0];\nvar tempSegment = [];\n/**\n * @enum {string}\n */\nvar ModifyEventType = {\n    /**\n     * Triggered upon feature modification start\n     * @event ModifyEvent#modifystart\n     * @api\n     */\n    MODIFYSTART: 'modifystart',\n    /**\n     * Triggered upon feature modification end\n     * @event ModifyEvent#modifyend\n     * @api\n     */\n    MODIFYEND: 'modifyend',\n};\n/**\n * @typedef {Object} SegmentData\n * @property {Array<number>} [depth]\n * @property {Feature} feature\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry\n * @property {number} [index]\n * @property {Array<import(\"../extent.js\").Extent>} segment\n * @property {Array<SegmentData>} [featureSegments]\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event will be considered to add o
 r move a\n * vertex to the sketch. Default is\n * {@link module:ol/events/condition~primaryAction}.\n * @property {import(\"../events/condition.js\").Condition} [deleteCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. By default,\n * {@link module:ol/events/condition~singleClick} with\n * {@link module:ol/events/condition~altKeyOnly} results in a vertex deletion.\n * @property {import(\"../events/condition.js\").Condition} [insertVertexCondition] A\n * function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether a new vertex should be added to the sketch\n * features. Default is {@link module:ol/events/condition~always}.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the\n * pointer close enough to a segment or vertex for editing.\n * @property {import(\"../style/Style.js\").StyleLike
 } [style]\n * Style used for the features being modified. By default the default edit\n * style is used (see {@link module:ol/style}).\n * @property {VectorSource} [source] The vector source with\n * features to modify.  If a vector source is not provided, a feature collection\n * must be provided with the features option.\n * @property {Collection<Feature>} [features]\n * The features the interaction works on.  If a feature collection is not\n * provided, a vector source must be provided with the source option.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n */\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Modify~Modify} instances are\n * instances of this type.\n */\nvar ModifyEvent = /** @class */ (function (_super) {\n    __extends(ModifyEvent, _super);\n    /**\n     * @param {ModifyEventType} type Type.\n     * @param {Collection<Feature>} features\n     * The features modified.\n     * @param {import(\"..
 /MapBrowserEvent.js\").default} MapBrowserEvent\n     * Associated {@link module:ol/MapBrowserEvent}.\n     */\n    function ModifyEvent(type, features, MapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The features being modified.\n         * @type {Collection<Feature>}\n         * @api\n         */\n        _this.features = features;\n        /**\n         * Associated {@link module:ol/MapBrowserEvent}.\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n         */\n        _this.mapBrowserEvent = MapBrowserEvent;\n        return _this;\n    }\n    return ModifyEvent;\n}(Event));\nexport { ModifyEvent };\n/**\n * @classdesc\n * Interaction for modifying feature geometries.  To modify features that have\n * been added to an existing source, construct the modify interaction with the\n * `source` option.  If you want to modify features in a collection (for example,\n * the collection used by a select interac
 tion), construct the interaction with\n * the `features` option.  The interaction must be constructed with either a\n * `source` or `features` option.\n *\n * By default, the interaction will allow deletion of vertices when the `alt`\n * key is pressed.  To configure the interaction with a different condition\n * for deletion, use the `deleteCondition` option.\n * @fires ModifyEvent\n * @api\n */\nvar Modify = /** @class */ (function (_super) {\n    __extends(Modify, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function Modify(options) {\n        var _this = _super.call(this, /** @type {import(\"./Pointer.js\").Options} */ (options)) || this;\n        /** @private */\n        _this.boundHandleFeatureChange_ = _this.handleFeatureChange_.bind(_this);\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : primaryAction;\n        /**\n
          * @private\n         * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n         * @return {boolean} Combined condition result.\n         */\n        _this.defaultDeleteCondition_ = function (mapBrowserEvent) {\n            return altKeyOnly(mapBrowserEvent) && singleClick(mapBrowserEvent);\n        };\n        /**\n         * @type {import(\"../events/condition.js\").Condition}\n         * @private\n         */\n        _this.deleteCondition_ = options.deleteCondition\n            ? options.deleteCondition\n            : _this.defaultDeleteCondition_;\n        /**\n         * @type {import(\"../events/condition.js\").Condition}\n         * @private\n         */\n        _this.insertVertexCondition_ = options.insertVertexCondition\n            ? options.insertVertexCondition\n            : always;\n        /**\n         * Editing vertex.\n         * @type {Feature}\n         * @private\n         */\n        _this.vertexFeature_ = null;\n   
      /**\n         * Segments intersecting {@link this.vertexFeature_} by segment uid.\n         * @type {Object<string, boolean>}\n         * @private\n         */\n        _this.vertexSegments_ = null;\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         * @private\n         */\n        _this.lastPixel_ = [0, 0];\n        /**\n         * Tracks if the next `singleclick` event should be ignored to prevent\n         * accidental deletion right after vertex creation.\n         * @type {boolean}\n         * @private\n         */\n        _this.ignoreNextSingleClick_ = false;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.modified_ = false;\n        /**\n         * Segment RTree for each layer\n         * @type {RBush<SegmentData>}\n         * @private\n         */\n        _this.rBush_ = new RBush();\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.pixelTolerance_ =\n            opti
 ons.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.snappedToVertex_ = false;\n        /**\n         * Indicate whether the interaction is currently changing a feature's\n         * coordinates.\n         * @type {boolean}\n         * @private\n         */\n        _this.changingFeature_ = false;\n        /**\n         * @type {Array}\n         * @private\n         */\n        _this.dragSegments_ = [];\n        /**\n         * Draw overlay where sketch features are drawn.\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.overlay_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: false,\n                wrapX: !!options.wrapX,\n            }),\n            style: options.style ? options.style : getDefaultStyleFunction(),\n            updateWhileAnimating: true,\n            updateWhileInteracting: true,\n     
    });\n        /**\n         * @const\n         * @private\n         * @type {!Object<string, function(Feature, import(\"../geom/Geometry.js\").default): void>}\n         */\n        _this.SEGMENT_WRITERS_ = {\n            'Point': _this.writePointGeometry_.bind(_this),\n            'LineString': _this.writeLineStringGeometry_.bind(_this),\n            'LinearRing': _this.writeLineStringGeometry_.bind(_this),\n            'Polygon': _this.writePolygonGeometry_.bind(_this),\n            'MultiPoint': _this.writeMultiPointGeometry_.bind(_this),\n            'MultiLineString': _this.writeMultiLineStringGeometry_.bind(_this),\n            'MultiPolygon': _this.writeMultiPolygonGeometry_.bind(_this),\n            'Circle': _this.writeCircleGeometry_.bind(_this),\n            'GeometryCollection': _this.writeGeometryCollectionGeometry_.bind(_this),\n        };\n        /**\n         * @type {VectorSource}\n         * @private\n         */\n        _this.source_ = null;\n        var featu
 res;\n        if (options.source) {\n            _this.source_ = options.source;\n            features = new Collection(_this.source_.getFeatures());\n            _this.source_.addEventListener(VectorEventType.ADDFEATURE, _this.handleSourceAdd_.bind(_this));\n            _this.source_.addEventListener(VectorEventType.REMOVEFEATURE, _this.handleSourceRemove_.bind(_this));\n        }\n        else {\n            features = options.features;\n        }\n        if (!features) {\n            throw new Error('The modify interaction requires features or a source');\n        }\n        /**\n         * @type {Collection<Feature>}\n         * @private\n         */\n        _this.features_ = features;\n        _this.features_.forEach(_this.addFeature_.bind(_this));\n        _this.features_.addEventListener(CollectionEventType.ADD, _this.handleFeatureAdd_.bind(_this));\n        _this.features_.addEventListener(CollectionEventType.REMOVE, _this.handleFeatureRemove_.bind(_this));\n        /**\n 
         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @private\n         */\n        _this.lastPointerEvent_ = null;\n        return _this;\n    }\n    /**\n     * @param {Feature} feature Feature.\n     * @private\n     */\n    Modify.prototype.addFeature_ = function (feature) {\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            var writer = this.SEGMENT_WRITERS_[geometry.getType()];\n            if (writer) {\n                writer(feature, geometry);\n            }\n        }\n        var map = this.getMap();\n        if (map && map.isRendered() && this.getActive()) {\n            this.handlePointerAtPixel_(this.lastPixel_, map);\n        }\n        feature.addEventListener(EventType.CHANGE, this.boundHandleFeatureChange_);\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Map browser event\n     * @private\n     */\n    Modify.prototype.willModifyFeatures_ = function (evt) {\n        if (!this.mod
 ified_) {\n            this.modified_ = true;\n            this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYSTART, this.features_, evt));\n        }\n    };\n    /**\n     * @param {Feature} feature Feature.\n     * @private\n     */\n    Modify.prototype.removeFeature_ = function (feature) {\n        this.removeFeatureSegmentData_(feature);\n        // Remove the vertex feature if the collection of canditate features is empty.\n        if (this.vertexFeature_ && this.features_.getLength() === 0) {\n            this.overlay_.getSource().removeFeature(this.vertexFeature_);\n            this.vertexFeature_ = null;\n        }\n        feature.removeEventListener(EventType.CHANGE, this.boundHandleFeatureChange_);\n    };\n    /**\n     * @param {Feature} feature Feature.\n     * @private\n     */\n    Modify.prototype.removeFeatureSegmentData_ = function (feature) {\n        var rBush = this.rBush_;\n        /** @type {Array<SegmentData>} */\n        var nodesToRemove = [];\n   
      rBush.forEach(\n        /**\n         * @param {SegmentData} node RTree node.\n         */\n        function (node) {\n            if (feature === node.feature) {\n                nodesToRemove.push(node);\n            }\n        });\n        for (var i = nodesToRemove.length - 1; i >= 0; --i) {\n            var nodeToRemove = nodesToRemove[i];\n            for (var j = this.dragSegments_.length - 1; j >= 0; --j) {\n                if (this.dragSegments_[j][0] === nodeToRemove) {\n                    this.dragSegments_.splice(j, 1);\n                }\n            }\n            rBush.remove(nodeToRemove);\n        }\n    };\n    /**\n     * Activate or deactivate the interaction.\n     * @param {boolean} active Active.\n     * @observable\n     * @api\n     */\n    Modify.prototype.setActive = function (active) {\n        if (this.vertexFeature_ && !active) {\n            this.overlay_.getSource().removeFeature(this.vertexFeature_);\n            this.vertexFeature_ = null;\n  
       }\n        _super.prototype.setActive.call(this, active);\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Modify.prototype.setMap = function (map) {\n        this.overlay_.setMap(map);\n        _super.prototype.setMap.call(this, map);\n    };\n    /**\n     * Get the overlay layer that this interaction renders sketch features to.\n     * @return {VectorLayer} Overlay layer.\n     * @api\n     */\n    Modify.prototype.getOverlay = function () {\n        return this.overlay_;\n    };\n    /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    Modify.prototype.handleSourceAdd_ = function (event) {\n        if (event.feature) {\n            this.features_.push(event.feature);\n        }\n    };\n
     /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    Modify.prototype.handleSourceRemove_ = function (event) {\n        if (event.feature) {\n            this.features_.remove(event.feature);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Modify.prototype.handleFeatureAdd_ = function (evt) {\n        this.addFeature_(/** @type {Feature} */ (evt.element));\n    };\n    /**\n     * @param {import(\"../events/Event.js\").default} evt Event.\n     * @private\n     */\n    Modify.prototype.handleFeatureChange_ = function (evt) {\n        if (!this.changingFeature_) {\n            var feature = /** @type {Feature} */ (evt.target);\n            this.removeFeature_(feature);\n            this.addFeature_(feature);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n  
   Modify.prototype.handleFeatureRemove_ = function (evt) {\n        var feature = /** @type {Feature} */ (evt.element);\n        this.removeFeature_(feature);\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {Point} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writePointGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCoordinates();\n        /** @type {SegmentData} */\n        var segmentData = {\n            feature: feature,\n            geometry: geometry,\n            segment: [coordinates, coordinates],\n        };\n        this.rBush_.insert(geometry.getExtent(), segmentData);\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeMultiPointGeometry_ = function (feature, geometry) {\n        var points = geometry.getCoordinates();\n        for (var i = 0, ii = points.
 length; i < ii; ++i) {\n            var coordinates = points[i];\n            /** @type {SegmentData} */\n            var segmentData = {\n                feature: feature,\n                geometry: geometry,\n                depth: [i],\n                index: i,\n                segment: [coordinates, coordinates],\n            };\n            this.rBush_.insert(geometry.getExtent(), segmentData);\n        }\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeLineStringGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCoordinates();\n        for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n            var segment = coordinates.slice(i, i + 2);\n            /** @type {SegmentData} */\n            var segmentData = {\n                feature: feature,\n                geometry: geometry,\n               
  index: i,\n                segment: segment,\n            };\n            this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeMultiLineStringGeometry_ = function (feature, geometry) {\n        var lines = geometry.getCoordinates();\n        for (var j = 0, jj = lines.length; j < jj; ++j) {\n            var coordinates = lines[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(i, i + 2);\n                /** @type {SegmentData} */\n                var segmentData = {\n                    feature: feature,\n                    geometry: geometry,\n                    depth: [j],\n                    index: i,\n                    segment: segment,\n                };\n                this.rBush_.insert(
 boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writePolygonGeometry_ = function (feature, geometry) {\n        var rings = geometry.getCoordinates();\n        for (var j = 0, jj = rings.length; j < jj; ++j) {\n            var coordinates = rings[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(i, i + 2);\n                /** @type {SegmentData} */\n                var segmentData = {\n                    feature: feature,\n                    geometry: geometry,\n                    depth: [j],\n                    index: i,\n                    segment: segment,\n                };\n                this.rBush_.insert(boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    /**\n     * @para
 m {Feature} feature Feature\n     * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeMultiPolygonGeometry_ = function (feature, geometry) {\n        var polygons = geometry.getCoordinates();\n        for (var k = 0, kk = polygons.length; k < kk; ++k) {\n            var rings = polygons[k];\n            for (var j = 0, jj = rings.length; j < jj; ++j) {\n                var coordinates = rings[j];\n                for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                    var segment = coordinates.slice(i, i + 2);\n                    /** @type {SegmentData} */\n                    var segmentData = {\n                        feature: feature,\n                        geometry: geometry,\n                        depth: [j, k],\n                        index: i,\n                        segment: segment,\n                    };\n                    this.rBush_.insert(boundingExtent(segment
 ), segmentData);\n                }\n            }\n        }\n    };\n    /**\n     * We convert a circle into two segments.  The segment at index\n     * {@link CIRCLE_CENTER_INDEX} is the\n     * circle's center (a point).  The segment at index\n     * {@link CIRCLE_CIRCUMFERENCE_INDEX} is\n     * the circumference, and is not a line segment.\n     *\n     * @param {Feature} feature Feature.\n     * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeCircleGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCenter();\n        /** @type {SegmentData} */\n        var centerSegmentData = {\n            feature: feature,\n            geometry: geometry,\n            index: CIRCLE_CENTER_INDEX,\n            segment: [coordinates, coordinates],\n        };\n        /** @type {SegmentData} */\n        var circumferenceSegmentData = {\n            feature: feature,\n            geometry: geom
 etry,\n            index: CIRCLE_CIRCUMFERENCE_INDEX,\n            segment: [coordinates, coordinates],\n        };\n        var featureSegments = [centerSegmentData, circumferenceSegmentData];\n        centerSegmentData.featureSegments = featureSegments;\n        circumferenceSegmentData.featureSegments = featureSegments;\n        this.rBush_.insert(createExtent(coordinates), centerSegmentData);\n        var circleGeometry = /** @type {import(\"../geom/Geometry.js\").default} */ (geometry);\n        var userProjection = getUserProjection();\n        if (userProjection && this.getMap()) {\n            var projection = this.getMap().getView().getProjection();\n            circleGeometry = circleGeometry\n                .clone()\n                .transform(userProjection, projection);\n            circleGeometry = fromCircle(\n            /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry)).transform(projection, userProjection);\n        }\n        this.rBush_.inser
 t(circleGeometry.getExtent(), circumferenceSegmentData);\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeGeometryCollectionGeometry_ = function (feature, geometry) {\n        var geometries = geometry.getGeometriesArray();\n        for (var i = 0; i < geometries.length; ++i) {\n            var geometry_1 = geometries[i];\n            var writer = this.SEGMENT_WRITERS_[geometry_1.getType()];\n            writer(feature, geometry_1);\n        }\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n     * @return {Feature} Vertex feature.\n     * @private\n     */\n    Modify.prototype.createOrUpdateVertexFeature_ = function (coordinates) {\n        var vertexFeature = this.vertexFeature_;\n        if (!vertexFeature) {\n            vertexFeature = new Feature(new Point(coordinates));\n        
     this.vertexFeature_ = vertexFeature;\n            this.overlay_.getSource().addFeature(vertexFeature);\n        }\n        else {\n            var geometry = vertexFeature.getGeometry();\n            geometry.setCoordinates(coordinates);\n        }\n        return vertexFeature;\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may modify the geometry.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    Modify.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!mapBrowserEvent.originalEvent) {\n            return true;\n        }\n        this.lastPointerEvent_ = mapBrowserEvent;\n        var handled;\n        if (!mapBrowserEvent.map.getView().getInteracting() &&\n            mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE &&\n            !this.handlingDownUpSequence) {\n            this.handlePoin
 terMove_(mapBrowserEvent);\n        }\n        if (this.vertexFeature_ && this.deleteCondition_(mapBrowserEvent)) {\n            if (mapBrowserEvent.type != MapBrowserEventType.SINGLECLICK ||\n                !this.ignoreNextSingleClick_) {\n                handled = this.removePoint();\n            }\n            else {\n                handled = true;\n            }\n        }\n        if (mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK) {\n            this.ignoreNextSingleClick_ = false;\n        }\n        return _super.prototype.handleEvent.call(this, mapBrowserEvent) && !handled;\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     */\n    Modify.prototype.handleDragEvent = function (evt) {\n        this.ignoreNextSingleClick_ = false;\n        this.willModifyFeatures_(evt);\n        var vertex = evt.coordinate;\n        for (var i = 0, ii = this.dragSegments_.length; i < ii; ++i) {\n          
   var dragSegment = this.dragSegments_[i];\n            var segmentData = dragSegment[0];\n            var depth = segmentData.depth;\n            var geometry = segmentData.geometry;\n            var coordinates = void 0;\n            var segment = segmentData.segment;\n            var index = dragSegment[1];\n            while (vertex.length < geometry.getStride()) {\n                vertex.push(segment[index][vertex.length]);\n            }\n            switch (geometry.getType()) {\n                case GeometryType.POINT:\n                    coordinates = vertex;\n                    segment[0] = vertex;\n                    segment[1] = vertex;\n                    break;\n                case GeometryType.MULTI_POINT:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[segmentData.index] = vertex;\n                    segment[0] = vertex;\n                    segment[1] = vertex;\n                    break;\n                case Geo
 metryType.LINE_STRING:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[segmentData.index + index] = vertex;\n                    segment[index] = vertex;\n                    break;\n                case GeometryType.MULTI_LINE_STRING:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[depth[0]][segmentData.index + index] = vertex;\n                    segment[index] = vertex;\n                    break;\n                case GeometryType.POLYGON:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[depth[0]][segmentData.index + index] = vertex;\n                    segment[index] = vertex;\n                    break;\n                case GeometryType.MULTI_POLYGON:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[depth[1]][depth[0]][segmentData.index + index] = vertex;\n                    segment[index] 
 = vertex;\n                    break;\n                case GeometryType.CIRCLE:\n                    segment[0] = vertex;\n                    segment[1] = vertex;\n                    if (segmentData.index === CIRCLE_CENTER_INDEX) {\n                        this.changingFeature_ = true;\n                        geometry.setCenter(vertex);\n                        this.changingFeature_ = false;\n                    }\n                    else {\n                        // We're dragging the circle's circumference:\n                        this.changingFeature_ = true;\n                        var projection = evt.map.getView().getProjection();\n                        var radius = coordinateDistance(fromUserCoordinate(geometry.getCenter(), projection), fromUserCoordinate(vertex, projection));\n                        var userProjection = getUserProjection();\n                        if (userProjection) {\n                            var circleGeometry = geometry\n                  
               .clone()\n                                .transform(userProjection, projection);\n                            circleGeometry.setRadius(radius);\n                            radius = circleGeometry\n                                .transform(projection, userProjection)\n                                .getRadius();\n                        }\n                        geometry.setRadius(radius);\n                        this.changingFeature_ = false;\n                    }\n                    break;\n                default:\n                // pass\n            }\n            if (coordinates) {\n                this.setGeometryCoordinates_(geometry, coordinates);\n            }\n        }\n        this.createOrUpdateVertexFeature_(vertex);\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Modify.prototype.handleDownEvent = function
  (evt) {\n        if (!this.condition_(evt)) {\n            return false;\n        }\n        var pixelCoordinate = evt.coordinate;\n        this.handlePointerAtPixel_(evt.pixel, evt.map, pixelCoordinate);\n        this.dragSegments_.length = 0;\n        this.modified_ = false;\n        var vertexFeature = this.vertexFeature_;\n        if (vertexFeature) {\n            var projection = evt.map.getView().getProjection();\n            var insertVertices = [];\n            var vertex = vertexFeature.getGeometry().getCoordinates();\n            var vertexExtent = boundingExtent([vertex]);\n            var segmentDataMatches = this.rBush_.getInExtent(vertexExtent);\n            var componentSegments = {};\n            segmentDataMatches.sort(compareIndexes);\n            for (var i = 0, ii = segmentDataMatches.length; i < ii; ++i) {\n                var segmentDataMatch = segmentDataMatches[i];\n                var segment = segmentDataMatch.segment;\n                var uid = getUid(seg
 mentDataMatch.geometry);\n                var depth = segmentDataMatch.depth;\n                if (depth) {\n                    uid += '-' + depth.join('-'); // separate feature components\n                }\n                if (!componentSegments[uid]) {\n                    componentSegments[uid] = new Array(2);\n                }\n                if (segmentDataMatch.geometry.getType() === GeometryType.CIRCLE &&\n                    segmentDataMatch.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n                    var closestVertex = closestOnSegmentData(pixelCoordinate, segmentDataMatch, projection);\n                    if (coordinatesEqual(closestVertex, vertex) &&\n                        !componentSegments[uid][0]) {\n                        this.dragSegments_.push([segmentDataMatch, 0]);\n                        componentSegments[uid][0] = segmentDataMatch;\n                    }\n                    continue;\n                }\n                if (coordinatesEqual(segment[0],
  vertex) &&\n                    !componentSegments[uid][0]) {\n                    this.dragSegments_.push([segmentDataMatch, 0]);\n                    componentSegments[uid][0] = segmentDataMatch;\n                    continue;\n                }\n                if (coordinatesEqual(segment[1], vertex) &&\n                    !componentSegments[uid][1]) {\n                    // prevent dragging closed linestrings by the connecting node\n                    if ((segmentDataMatch.geometry.getType() === GeometryType.LINE_STRING ||\n                        segmentDataMatch.geometry.getType() ===\n                            GeometryType.MULTI_LINE_STRING) &&\n                        componentSegments[uid][0] &&\n                        componentSegments[uid][0].index === 0) {\n                        continue;\n                    }\n                    this.dragSegments_.push([segmentDataMatch, 1]);\n                    componentSegments[uid][1] = segmentDataMatch;\n               
      continue;\n                }\n                if (getUid(segment) in this.vertexSegments_ &&\n                    !componentSegments[uid][0] &&\n                    !componentSegments[uid][1] &&\n                    this.insertVertexCondition_(evt)) {\n                    insertVertices.push([segmentDataMatch, vertex]);\n                }\n            }\n            if (insertVertices.length) {\n                this.willModifyFeatures_(evt);\n            }\n            for (var j = insertVertices.length - 1; j >= 0; --j) {\n                this.insertVertex_.apply(this, insertVertices[j]);\n            }\n        }\n        return !!this.vertexFeature_;\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Modify.prototype.handleUpEvent = function (evt) {\n        for (var i = this.dragSegments_.length - 1; i >= 0; --i) {\n            var segment
 Data = this.dragSegments_[i][0];\n            var geometry = segmentData.geometry;\n            if (geometry.getType() === GeometryType.CIRCLE) {\n                // Update a circle object in the R* bush:\n                var coordinates = geometry.getCenter();\n                var centerSegmentData = segmentData.featureSegments[0];\n                var circumferenceSegmentData = segmentData.featureSegments[1];\n                centerSegmentData.segment[0] = coordinates;\n                centerSegmentData.segment[1] = coordinates;\n                circumferenceSegmentData.segment[0] = coordinates;\n                circumferenceSegmentData.segment[1] = coordinates;\n                this.rBush_.update(createExtent(coordinates), centerSegmentData);\n                var circleGeometry = geometry;\n                var userProjection = getUserProjection();\n                if (userProjection) {\n                    var projection = evt.map.getView().getProjection();\n                    c
 ircleGeometry = circleGeometry\n                        .clone()\n                        .transform(userProjection, projection);\n                    circleGeometry = fromCircle(circleGeometry).transform(projection, userProjection);\n                }\n                this.rBush_.update(circleGeometry.getExtent(), circumferenceSegmentData);\n            }\n            else {\n                this.rBush_.update(boundingExtent(segmentData.segment), segmentData);\n            }\n        }\n        if (this.modified_) {\n            this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND, this.features_, evt));\n            this.modified_ = false;\n        }\n        return false;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @private\n     */\n    Modify.prototype.handlePointerMove_ = function (evt) {\n        this.lastPixel_ = evt.pixel;\n        this.handlePointerAtPixel_(evt.pixel, evt.map, evt.coordinate);\n    };\n    /**\n   
   * @param {import(\"../pixel.js\").Pixel} pixel Pixel\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_coordinate The pixel Coordinate.\n     * @private\n     */\n    Modify.prototype.handlePointerAtPixel_ = function (pixel, map, opt_coordinate) {\n        var pixelCoordinate = opt_coordinate || map.getCoordinateFromPixel(pixel);\n        var projection = map.getView().getProjection();\n        var sortByDistance = function (a, b) {\n            return (projectedDistanceToSegmentDataSquared(pixelCoordinate, a, projection) -\n                projectedDistanceToSegmentDataSquared(pixelCoordinate, b, projection));\n        };\n        var viewExtent = fromUserExtent(createExtent(pixelCoordinate, tempExtent), projection);\n        var buffer = map.getView().getResolution() * this.pixelTolerance_;\n        var box = toUserExtent(bufferExtent(viewExtent, buffer, tempExtent), projection);\n        var rBush = th
 is.rBush_;\n        var nodes = rBush.getInExtent(box);\n        if (nodes.length > 0) {\n            nodes.sort(sortByDistance);\n            var node = nodes[0];\n            var closestSegment = node.segment;\n            var vertex = closestOnSegmentData(pixelCoordinate, node, projection);\n            var vertexPixel = map.getPixelFromCoordinate(vertex);\n            var dist = coordinateDistance(pixel, vertexPixel);\n            if (dist <= this.pixelTolerance_) {\n                /** @type {Object<string, boolean>} */\n                var vertexSegments = {};\n                if (node.geometry.getType() === GeometryType.CIRCLE &&\n                    node.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n                    this.snappedToVertex_ = true;\n                    this.createOrUpdateVertexFeature_(vertex);\n                }\n                else {\n                    var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n                    var pixel2 = map.getPixelF
 romCoordinate(closestSegment[1]);\n                    var squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n                    var squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n                    dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n                    this.snappedToVertex_ = dist <= this.pixelTolerance_;\n                    if (this.snappedToVertex_) {\n                        vertex =\n                            squaredDist1 > squaredDist2\n                                ? closestSegment[1]\n                                : closestSegment[0];\n                    }\n                    this.createOrUpdateVertexFeature_(vertex);\n                    for (var i = 1, ii = nodes.length; i < ii; ++i) {\n                        var segment = nodes[i].segment;\n                        if ((coordinatesEqual(closestSegment[0], segment[0]) &&\n                            coordinatesEqual(closestSegment[1], segment[1])) ||\n         
                    (coordinatesEqual(closestSegment[0], segment[1]) &&\n                                coordinatesEqual(closestSegment[1], segment[0]))) {\n                            vertexSegments[getUid(segment)] = true;\n                        }\n                        else {\n                            break;\n                        }\n                    }\n                }\n                vertexSegments[getUid(closestSegment)] = true;\n                this.vertexSegments_ = vertexSegments;\n                return;\n            }\n        }\n        if (this.vertexFeature_) {\n            this.overlay_.getSource().removeFeature(this.vertexFeature_);\n            this.vertexFeature_ = null;\n        }\n    };\n    /**\n     * @param {SegmentData} segmentData Segment data.\n     * @param {import(\"../coordinate.js\").Coordinate} vertex Vertex.\n     * @private\n     */\n    Modify.prototype.insertVertex_ = function (segmentData, vertex) {\n        var segment = segmentDat
 a.segment;\n        var feature = segmentData.feature;\n        var geometry = segmentData.geometry;\n        var depth = segmentData.depth;\n        var index = segmentData.index;\n        var coordinates;\n        while (vertex.length < geometry.getStride()) {\n            vertex.push(0);\n        }\n        switch (geometry.getType()) {\n            case GeometryType.MULTI_LINE_STRING:\n                coordinates = geometry.getCoordinates();\n                coordinates[depth[0]].splice(index + 1, 0, vertex);\n                break;\n            case GeometryType.POLYGON:\n                coordinates = geometry.getCoordinates();\n                coordinates[depth[0]].splice(index + 1, 0, vertex);\n                break;\n            case GeometryType.MULTI_POLYGON:\n                coordinates = geometry.getCoordinates();\n                coordinates[depth[1]][depth[0]].splice(index + 1, 0, vertex);\n                break;\n            case GeometryType.LINE_STRING:\n           
      coordinates = geometry.getCoordinates();\n                coordinates.splice(index + 1, 0, vertex);\n                break;\n            default:\n                return;\n        }\n        this.setGeometryCoordinates_(geometry, coordinates);\n        var rTree = this.rBush_;\n        rTree.remove(segmentData);\n        this.updateSegmentIndices_(geometry, index, depth, 1);\n        /** @type {SegmentData} */\n        var newSegmentData = {\n            segment: [segment[0], vertex],\n            feature: feature,\n            geometry: geometry,\n            depth: depth,\n            index: index,\n        };\n        rTree.insert(boundingExtent(newSegmentData.segment), newSegmentData);\n        this.dragSegments_.push([newSegmentData, 1]);\n        /** @type {SegmentData} */\n        var newSegmentData2 = {\n            segment: [vertex, segment[1]],\n            feature: feature,\n            geometry: geometry,\n            depth: depth,\n            index: index + 1,\n  
       };\n        rTree.insert(boundingExtent(newSegmentData2.segment), newSegmentData2);\n        this.dragSegments_.push([newSegmentData2, 0]);\n        this.ignoreNextSingleClick_ = true;\n    };\n    /**\n     * Removes the vertex currently being pointed.\n     * @return {boolean} True when a vertex was removed.\n     * @api\n     */\n    Modify.prototype.removePoint = function () {\n        if (this.lastPointerEvent_ &&\n            this.lastPointerEvent_.type != MapBrowserEventType.POINTERDRAG) {\n            var evt = this.lastPointerEvent_;\n            this.willModifyFeatures_(evt);\n            var removed = this.removeVertex_();\n            this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND, this.features_, evt));\n            this.modified_ = false;\n            return removed;\n        }\n        return false;\n    };\n    /**\n     * Removes a vertex from all matching features.\n     * @return {boolean} True when a vertex was removed.\n     * @private\n     
 */\n    Modify.prototype.removeVertex_ = function () {\n        var dragSegments = this.dragSegments_;\n        var segmentsByFeature = {};\n        var deleted = false;\n        var component, coordinates, dragSegment, geometry, i, index, left;\n        var newIndex, right, segmentData, uid;\n        for (i = dragSegments.length - 1; i >= 0; --i) {\n            dragSegment = dragSegments[i];\n            segmentData = dragSegment[0];\n            uid = getUid(segmentData.feature);\n            if (segmentData.depth) {\n                // separate feature components\n                uid += '-' + segmentData.depth.join('-');\n            }\n            if (!(uid in segmentsByFeature)) {\n                segmentsByFeature[uid] = {};\n            }\n            if (dragSegment[1] === 0) {\n                segmentsByFeature[uid].right = segmentData;\n                segmentsByFeature[uid].index = segmentData.index;\n            }\n            else if (dragSegment[1] == 1) {\n           
      segmentsByFeature[uid].left = segmentData;\n                segmentsByFeature[uid].index = segmentData.index + 1;\n            }\n        }\n        for (uid in segmentsByFeature) {\n            right = segmentsByFeature[uid].right;\n            left = segmentsByFeature[uid].left;\n            index = segmentsByFeature[uid].index;\n            newIndex = index - 1;\n            if (left !== undefined) {\n                segmentData = left;\n            }\n            else {\n                segmentData = right;\n            }\n            if (newIndex < 0) {\n                newIndex = 0;\n            }\n            geometry = segmentData.geometry;\n            coordinates = geometry.getCoordinates();\n            component = coordinates;\n            deleted = false;\n            switch (geometry.getType()) {\n                case GeometryType.MULTI_LINE_STRING:\n                    if (coordinates[segmentData.depth[0]].length > 2) {\n                        coordinates[segmen
 tData.depth[0]].splice(index, 1);\n                        deleted = true;\n                    }\n                    break;\n                case GeometryType.LINE_STRING:\n                    if (coordinates.length > 2) {\n                        coordinates.splice(index, 1);\n                        deleted = true;\n                    }\n                    break;\n                case GeometryType.MULTI_POLYGON:\n                    component = component[segmentData.depth[1]];\n                /* falls through */\n                case GeometryType.POLYGON:\n                    component = component[segmentData.depth[0]];\n                    if (component.length > 4) {\n                        if (index == component.length - 1) {\n                            index = 0;\n                        }\n                        component.splice(index, 1);\n                        deleted = true;\n                        if (index === 0) {\n                            // close the ring
  again\n                            component.pop();\n                            component.push(component[0]);\n                            newIndex = component.length - 1;\n                        }\n                    }\n                    break;\n                default:\n                // pass\n            }\n            if (deleted) {\n                this.setGeometryCoordinates_(geometry, coordinates);\n                var segments = [];\n                if (left !== undefined) {\n                    this.rBush_.remove(left);\n                    segments.push(left.segment[0]);\n                }\n                if (right !== undefined) {\n                    this.rBush_.remove(right);\n                    segments.push(right.segment[1]);\n                }\n                if (left !== undefined && right !== undefined) {\n                    /** @type {SegmentData} */\n                    var newSegmentData = {\n                        depth: segmentData.depth,\n        
                 feature: segmentData.feature,\n                        geometry: segmentData.geometry,\n                        index: newIndex,\n                        segment: segments,\n                    };\n                    this.rBush_.insert(boundingExtent(newSegmentData.segment), newSegmentData);\n                }\n                this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);\n                if (this.vertexFeature_) {\n                    this.overlay_.getSource().removeFeature(this.vertexFeature_);\n                    this.vertexFeature_ = null;\n                }\n                dragSegments.length = 0;\n            }\n        }\n        return deleted;\n    };\n    /**\n     * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {Array} coordinates Coordinates.\n     * @private\n     */\n    Modify.prototype.setGeometryCoordinates_ = function (geometry, coordinates) {\n        this.changingFeature_ = true;\
 n        geometry.setCoordinates(coordinates);\n        this.changingFeature_ = false;\n    };\n    /**\n     * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {number} index Index.\n     * @param {Array<number>|undefined} depth Depth.\n     * @param {number} delta Delta (1 or -1).\n     * @private\n     */\n    Modify.prototype.updateSegmentIndices_ = function (geometry, index, depth, delta) {\n        this.rBush_.forEachInExtent(geometry.getExtent(), function (segmentDataMatch) {\n            if (segmentDataMatch.geometry === geometry &&\n                (depth === undefined ||\n                    segmentDataMatch.depth === undefined ||\n                    equals(segmentDataMatch.depth, depth)) &&\n                segmentDataMatch.index > index) {\n                segmentDataMatch.index += delta;\n            }\n        });\n    };\n    return Modify;\n}(PointerInteraction));\n/**\n * @param {SegmentData} a The first segment data.\n * @pa
 ram {SegmentData} b The second segment data.\n * @return {number} The difference in indexes.\n */\nfunction compareIndexes(a, b) {\n    return a.index - b.index;\n}\n/**\n * Returns the distance from a point to a line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The coordinates of the point from\n *        which to calculate the distance.\n * @param {SegmentData} segmentData The object describing the line\n *        segment we are calculating the distance to.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {number} The square of the distance between a point and a line segment.\n */\nfunction projectedDistanceToSegmentDataSquared(pointCoordinates, segmentData, projection) {\n    var geometry = segmentData.geometry;\n    if (geometry.getType() === GeometryType.CIRCLE) {\n        var circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (geometry);\n        if (segmentData.index ===
  CIRCLE_CIRCUMFERENCE_INDEX) {\n            var userProjection = getUserProjection();\n            if (userProjection) {\n                circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry\n                    .clone()\n                    .transform(userProjection, projection));\n            }\n            var distanceToCenterSquared = squaredCoordinateDistance(circleGeometry.getCenter(), fromUserCoordinate(pointCoordinates, projection));\n            var distanceToCircumference = Math.sqrt(distanceToCenterSquared) - circleGeometry.getRadius();\n            return distanceToCircumference * distanceToCircumference;\n        }\n    }\n    var coordinate = fromUserCoordinate(pointCoordinates, projection);\n    tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n    tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n    return squaredDistanceToSegment(coordinate, tempSegment);\n}\n/**\n * Returns the point 
 closest to a given line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The point to which a closest point\n *        should be found.\n * @param {SegmentData} segmentData The object describing the line\n *        segment which should contain the closest point.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../coordinate.js\").Coordinate} The point closest to the specified line segment.\n */\nfunction closestOnSegmentData(pointCoordinates, segmentData, projection) {\n    var geometry = segmentData.geometry;\n    if (geometry.getType() === GeometryType.CIRCLE &&\n        segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n        var circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (geometry);\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeom
 etry\n                .clone()\n                .transform(userProjection, projection));\n        }\n        return toUserCoordinate(circleGeometry.getClosestPoint(fromUserCoordinate(pointCoordinates, projection)), projection);\n    }\n    var coordinate = fromUserCoordinate(pointCoordinates, projection);\n    tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n    tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n    return toUserCoordinate(closestOnSegment(coordinate, tempSegment), projection);\n}\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n    var style = createEditingStyle();\n    return function (feature, resolution) {\n        return style[GeometryType.POINT];\n    };\n}\nexport default Modify;\n//# sourceMappingURL=Modify.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Objec
 t.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Select\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Interaction from './Interaction.js';\nimport { TRUE } from '../functions.js';\nimport { clear } from '../obj.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { extend, includes } from '../array.js';\nimport { getUid } from '../util.js';\nimport { never, shif
 tKeyOnly, singleClick } from '../events/condition.js';\n/**\n * @enum {string}\n */\nvar SelectEventType = {\n    /**\n     * Triggered when feature(s) has been (de)selected.\n     * @event SelectEvent#select\n     * @api\n     */\n    SELECT: 'select',\n};\n/**\n * A function that takes an {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default):boolean} FilterFunction\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [addCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default, this is {@link module:ol/events/condition~never}. Use this if you\n * want to use different events for add and
  remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. This is the event\n * for the selected features as a whole. By default, this is\n * {@link module:ol/events/condition~singleClick}. Clicking on a feature selects that\n * feature and removes any that were in the selection. Clicking outside any\n * feature removes all from the selection.\n * See `toggle`, `add`, `remove` options for adding/removing extra features to/\n * from the selection.\n * @property {Array<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default): boolean} [layers]\n * A list of layers from which features should be selected. Alternatively, a\n * filter function can be provided. The function will be called for each layer\n * in the map and should return `true` for layers that you wa
 nt to be\n * selectable. If the option is absent, all visible layers will be considered\n * selectable.\n * @property {import(\"../style/Style.js\").StyleLike|null} [style]\n * Style for the selected features. By default the default edit style is used\n * (see {@link module:ol/style}). Set to `null` if this interaction should not apply\n * any style changes for selected features.\n * If set to a falsey value, the selected feature's style will not change.\n * @property {import(\"../events/condition.js\").Condition} [removeCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default, this is {@link module:ol/events/condition~never}. Use this if you\n * want to use different events for add and remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [toggleCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrows
 erEvent} and returns a\n * boolean to indicate whether that event should be handled. This is in addition\n * to the `condition` event. By default,\n * {@link module:ol/events/condition~shiftKeyOnly}, i.e. pressing `shift` as\n * well as the `condition` event, adds that feature to the current selection if\n * it is not currently selected, and removes it if it is. See `add` and `remove`\n * if you want to use different events instead of a toggle.\n * @property {boolean} [multi=false] A boolean that determines if the default\n * behaviour should select only single features or all (overlapping) features at\n * the clicked map position. The default of `false` means single select.\n * @property {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} [features]\n * Collection where the interaction will place selected features. Optional. If\n * not set the interaction will create a collection. In any case the collection\n * used by the interaction is returned by\n * {@link
  module:ol/interaction/Select~Select#getFeatures}.\n * @property {FilterFunction} [filter] A function\n * that takes an {@link module:ol/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside\n * the radius around the given position will be checked for features.\n */\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Select~Select} instances are instances of\n * this type.\n */\nvar SelectEvent = /** @class */ (function (_super) {\n    __extends(SelectEvent, _super);\n    /**\n     * @param {SelectEventType} type The event type.\n     * @param {Array<import(\"../Feature.js\").default>} selected Selected features.\n     * @param {Array<import(\"../Feature.js\").default>} deselected Deselected features.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Associated\n     *     {@link module:ol/M
 apBrowserEvent}.\n     */\n    function SelectEvent(type, selected, deselected, mapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * Selected features array.\n         * @type {Array<import(\"../Feature.js\").default>}\n         * @api\n         */\n        _this.selected = selected;\n        /**\n         * Deselected features array.\n         * @type {Array<import(\"../Feature.js\").default>}\n         * @api\n         */\n        _this.deselected = deselected;\n        /**\n         * Associated {@link module:ol/MapBrowserEvent}.\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n         */\n        _this.mapBrowserEvent = mapBrowserEvent;\n        return _this;\n    }\n    return SelectEvent;\n}(Event));\n/**\n * Original feature styles to reset to when features are no longer selected.\n * @type {Object.<number, import(\"../style/Style.js\").default|Array.<import(\"../style/Style.js\").default>|import(\".
 ./style/Style.js\").StyleFunction>}\n */\nvar originalFeatureStyles = {};\n/**\n * @classdesc\n * Interaction for selecting vector features. By default, selected features are\n * styled differently, so this interaction can be used for visual highlighting,\n * as well as selecting features for other actions, such as modification or\n * output. There are three ways of controlling which features are selected:\n * using the browser event as defined by the `condition` and optionally the\n * `toggle`, `add`/`remove`, and `multi` options; a `layers` filter; and a\n * further feature filter using the `filter` option.\n *\n * Selected features are added to an internal unmanaged layer.\n *\n * @fires SelectEvent\n * @api\n */\nvar Select = /** @class */ (function (_super) {\n    __extends(Select, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Select(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_
 options : {};\n        /**\n         * @private\n         */\n        _this.boundAddFeature_ = _this.addFeature_.bind(_this);\n        /**\n         * @private\n         */\n        _this.boundRemoveFeature_ = _this.removeFeature_.bind(_this);\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : singleClick;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.addCondition_ = options.addCondition ? options.addCondition : never;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.removeCondition_ = options.removeCondition\n            ? options.removeCondition\n            : never;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.toggle
 Condition_ = options.toggleCondition\n            ? options.toggleCondition\n            : shiftKeyOnly;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.multi_ = options.multi ? options.multi : false;\n        /**\n         * @private\n         * @type {FilterFunction}\n         */\n        _this.filter_ = options.filter ? options.filter : TRUE;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n        /**\n         * @private\n         * @type {import(\"../style/Style.js\").default|Array.<import(\"../style/Style.js\").default>|import(\"../style/Style.js\").StyleFunction|null}\n         */\n        _this.style_ =\n            options.style !== undefined ? options.style : getDefaultStyleFunction();\n        /**\n         * @private\n         * @type {import(\"../Collection.js\").default}\n         */\n        _this.features_ = options.feat
 ures || new Collection();\n        /** @type {function(import(\"../layer/Layer.js\").default): boolean} */\n        var layerFilter;\n        if (options.layers) {\n            if (typeof options.layers === 'function') {\n                layerFilter = options.layers;\n            }\n            else {\n                var layers_1 = options.layers;\n                layerFilter = function (layer) {\n                    return includes(layers_1, layer);\n                };\n            }\n        }\n        else {\n            layerFilter = TRUE;\n        }\n        /**\n         * @private\n         * @type {function(import(\"../layer/Layer.js\").default): boolean}\n         */\n        _this.layerFilter_ = layerFilter;\n        /**\n         * An association between selected feature (key)\n         * and layer (value)\n         * @private\n         * @type {Object<string, import(\"../layer/Layer.js\").default>}\n         */\n        _this.featureLayerAssociation_ = {};\n        retu
 rn _this;\n    }\n    /**\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     * @param {import(\"../layer/Layer.js\").default} layer Layer.\n     * @private\n     */\n    Select.prototype.addFeatureLayerAssociation_ = function (feature, layer) {\n        this.featureLayerAssociation_[getUid(feature)] = layer;\n    };\n    /**\n     * Get the selected features.\n     * @return {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} Features collection.\n     * @api\n     */\n    Select.prototype.getFeatures = function () {\n        return this.features_;\n    };\n    /**\n     * Returns the Hit-detection tolerance.\n     * @returns {number} Hit tolerance in pixels.\n     * @api\n     */\n    Select.prototype.getHitTolerance = function () {\n        return this.hitTolerance_;\n    };\n    /**\n     * Returns the associated {@link module:ol/layer/Vector~Vector vectorlayer} of\n     * the (last) selected feature. Note that this will not work w
 ith any\n     * programmatic method like pushing features to\n     * {@link module:ol/interaction/Select~Select#getFeatures collection}.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature\n     * @return {import('../layer/Vector.js').default} Layer.\n     * @api\n     */\n    Select.prototype.getLayer = function (feature) {\n        return /** @type {import('../layer/Vector.js').default} */ (this\n            .featureLayerAssociation_[getUid(feature)]);\n    };\n    /**\n     * Hit-detection tolerance. Pixels inside the radius around the given position\n     * will be checked for features.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @api\n     */\n    Select.prototype.setHitTolerance = function (hitTolerance) {\n        this.hitTolerance_ = hitTolerance;\n    };\n    /**\n     * Remove the interaction from its current map, if any,  and attach it to a new\n     * map, if any. Pass `null` to just remove the interaction from the current map
 .\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    Select.prototype.setMap = function (map) {\n        var currentMap = this.getMap();\n        if (currentMap && this.style_) {\n            this.features_.forEach(this.restorePreviousStyle_.bind(this));\n        }\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            this.features_.addEventListener(CollectionEventType.ADD, this.boundAddFeature_);\n            this.features_.addEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_);\n            if (this.style_) {\n                this.features_.forEach(this.applySelectedStyle_.bind(this));\n            }\n        }\n        else {\n            this.features_.removeEventListener(CollectionEventType.ADD, this.boundAddFeature_);\n            this.features_.removeEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").C
 ollectionEvent} evt Event.\n     * @private\n     */\n    Select.prototype.addFeature_ = function (evt) {\n        var feature = evt.element;\n        if (this.style_) {\n            this.applySelectedStyle_(feature);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Select.prototype.removeFeature_ = function (evt) {\n        var feature = evt.element;\n        if (this.style_) {\n            this.restorePreviousStyle_(feature);\n        }\n    };\n    /**\n     * @return {import(\"../style/Style.js\").StyleLike|null} Select style.\n     */\n    Select.prototype.getStyle = function () {\n        return this.style_;\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @private\n     */\n    Select.prototype.applySelectedStyle_ = function (feature) {\n        var key = getUid(feature);\n        if (!(key in originalFeatureStyles)) {\n            originalFeatureStyle
 s[key] = feature.getStyle();\n        }\n        feature.setStyle(this.style_);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @private\n     */\n    Select.prototype.restorePreviousStyle_ = function (feature) {\n        var key = getUid(feature);\n        var selectInteractions = /** @type {Array<Select>} */ (this.getMap()\n            .getInteractions()\n            .getArray()\n            .filter(function (interaction) {\n            return (interaction instanceof Select &&\n                interaction.getStyle() &&\n                interaction.getFeatures().getArray().indexOf(feature) !== -1);\n        }));\n        if (selectInteractions.length > 0) {\n            feature.setStyle(selectInteractions[selectInteractions.length - 1].getStyle());\n        }\n        else {\n            feature.setStyle(originalFeatureStyles[key]);\n            delete originalFeatureStyles[key];\n        }\n    };\n    /**\n     * @param {import(\"../Fea
 ture.js\").FeatureLike} feature Feature.\n     * @private\n     */\n    Select.prototype.removeFeatureLayerAssociation_ = function (feature) {\n        delete this.featureLayerAssociation_[getUid(feature)];\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may change the\n     * selected state of features.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @this {Select}\n     */\n    Select.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!this.condition_(mapBrowserEvent)) {\n            return true;\n        }\n        var add = this.addCondition_(mapBrowserEvent);\n        var remove = this.removeCondition_(mapBrowserEvent);\n        var toggle = this.toggleCondition_(mapBrowserEvent);\n        var set = !add && !remove && !toggle;\n        var map = mapBrowserEvent.map;\n        var features = this.getFeatures
 ();\n        var deselected = [];\n        var selected = [];\n        if (set) {\n            // Replace the currently selected feature(s) with the feature(s) at the\n            // pixel, or clear the selected feature(s) if there is no feature at\n            // the pixel.\n            clear(this.featureLayerAssociation_);\n            map.forEachFeatureAtPixel(mapBrowserEvent.pixel, \n            /**\n             * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n             * @param {import(\"../layer/Layer.js\").default} layer Layer.\n             * @return {boolean|undefined} Continue to iterate over the features.\n             */\n            function (feature, layer) {\n                if (this.filter_(feature, layer)) {\n                    selected.push(feature);\n                    this.addFeatureLayerAssociation_(feature, layer);\n                    return !this.multi_;\n                }\n            }.bind(this), {\n                layerFilter: this
 .layerFilter_,\n                hitTolerance: this.hitTolerance_,\n            });\n            for (var i = features.getLength() - 1; i >= 0; --i) {\n                var feature = features.item(i);\n                var index = selected.indexOf(feature);\n                if (index > -1) {\n                    // feature is already selected\n                    selected.splice(index, 1);\n                }\n                else {\n                    features.remove(feature);\n                    deselected.push(feature);\n                }\n            }\n            if (selected.length !== 0) {\n                features.extend(selected);\n            }\n        }\n        else {\n            // Modify the currently selected feature(s).\n            map.forEachFeatureAtPixel(mapBrowserEvent.pixel, \n            /**\n             * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n             * @param {import(\"../layer/Layer.js\").default} layer Layer.\n             
 * @return {boolean|undefined} Continue to iterate over the features.\n             */\n            function (feature, layer) {\n                if (this.filter_(feature, layer)) {\n                    if ((add || toggle) && !includes(features.getArray(), feature)) {\n                        selected.push(feature);\n                        this.addFeatureLayerAssociation_(feature, layer);\n                    }\n                    else if ((remove || toggle) &&\n                        includes(features.getArray(), feature)) {\n                        deselected.push(feature);\n                        this.removeFeatureLayerAssociation_(feature);\n                    }\n                    return !this.multi_;\n                }\n            }.bind(this), {\n                layerFilter: this.layerFilter_,\n                hitTolerance: this.hitTolerance_,\n            });\n            for (var j = deselected.length - 1; j >= 0; --j) {\n                features.remove(deselected[j]);
 \n            }\n            features.extend(selected);\n        }\n        if (selected.length > 0 || deselected.length > 0) {\n            this.dispatchEvent(new SelectEvent(SelectEventType.SELECT, selected, deselected, mapBrowserEvent));\n        }\n        return true;\n    };\n    return Select;\n}(Interaction));\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n    var styles = createEditingStyle();\n    extend(styles[GeometryType.POLYGON], styles[GeometryType.LINE_STRING]);\n    extend(styles[GeometryType.GEOMETRY_COLLECTION], styles[GeometryType.LINE_STRING]);\n    return function (feature) {\n        if (!feature.getGeometry()) {\n            return null;\n        }\n        return styles[feature.getGeometry().getType()];\n    };\n}\nexport default Select;\n//# sourceMappingURL=Select.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendS
 tatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Snap\n */\nimport CollectionEventType from '../CollectionEventType.js';\nimport EventType from '../events/EventType.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport PointerInteraction from './Pointer.js';\nimport RBush from '../structs/RBush.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport { FALSE, TRUE } from '../functions.js';\nimport { boundingExtent, createEmpty } from '../extent.js';\nimport { closestOnCircle, closestOnSegment, distan
 ce as coordinateDistance, squaredDistance as squaredCoordinateDistance, squaredDistanceToSegment, } from '../coordinate.js';\nimport { fromCircle } from '../geom/Polygon.js';\nimport { fromUserCoordinate, getUserProjection, toUserCoordinate, } from '../proj.js';\nimport { getUid } from '../util.js';\nimport { getValues } from '../obj.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {Object} Result\n * @property {boolean} snapped\n * @property {import(\"../coordinate.js\").Coordinate|null} vertex\n * @property {import(\"../pixel.js\").Pixel|null} vertexPixel\n */\n/**\n * @typedef {Object} SegmentData\n * @property {import(\"../Feature.js\").default} feature\n * @property {Array<import(\"../coordinate.js\").Coordinate>} segment\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} [features] Snap to these features. Either this option or source should be provided.\n * @property {bool
 ean} [edge=true] Snap to edges.\n * @property {boolean} [vertex=true] Snap to vertices.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or\n * vertex for snapping.\n * @property {import(\"../source/Vector.js\").default} [source] Snap to features from this source. Either this option or features should be provided\n */\n/**\n * @param  {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n * @return {import(\"../Feature.js\").default} Feature.\n */\nfunction getFeatureFromEvent(evt) {\n    if (\n    /** @type {import(\"../source/Vector.js\").VectorSourceEvent} */ (evt).feature) {\n        return /** @type {import(\"../source/Vector.js\").VectorSourceEvent} */ (evt)\n            .feature;\n    }\n    else if (\n    /** @type {import(\"../Collection.js\").CollectionEvent} */ (evt).element) {\n        return /** @type {import(\"../Feature.js\").default} */ (\n        /*
 * @type {import(\"../Collection.js\").CollectionEvent} */ (evt).element);\n    }\n}\nvar tempSegment = [];\n/**\n * @classdesc\n * Handles snapping of vector features while modifying or drawing them.  The\n * features can come from a {@link module:ol/source/Vector} or {@link module:ol/Collection~Collection}\n * Any interaction object that allows the user to interact\n * with the features using the mouse can benefit from the snapping, as long\n * as it is added before.\n *\n * The snap interaction modifies map browser event `coordinate` and `pixel`\n * properties to force the snap to occur to any interaction that them.\n *\n * Example:\n *\n *     import Snap from 'ol/interaction/Snap';\n *\n *     const snap = new Snap({\n *       source: source\n *     });\n *\n *     map.addInteraction(snap);\n *\n * @api\n */\nvar Snap = /** @class */ (function (_super) {\n    __extends(Snap, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Snap(opt_options)
  {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n        if (!pointerOptions.handleDownEvent) {\n            pointerOptions.handleDownEvent = TRUE;\n        }\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FALSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /**\n         * @type {import(\"../source/Vector.js\").default}\n         * @private\n         */\n        _this.source_ = options.source ? options.source : null;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.vertex_ = options.vertex !== undefined ? options.vertex : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.edge_ = options.edge !== undefined ? options.edge : true;\n        /**\n         * @type {import(\"../Collection.js\").default<import(\"..
 /Feature.js\").default>}\n         * @private\n         */\n        _this.features_ = options.features ? options.features : null;\n        /**\n         * @type {Array<import(\"../events.js\").EventsKey>}\n         * @private\n         */\n        _this.featuresListenerKeys_ = [];\n        /**\n         * @type {Object<string, import(\"../events.js\").EventsKey>}\n         * @private\n         */\n        _this.featureChangeListenerKeys_ = {};\n        /**\n         * Extents are preserved so indexed segment can be quickly removed\n         * when its feature geometry changes\n         * @type {Object<string, import(\"../extent.js\").Extent>}\n         * @private\n         */\n        _this.indexedFeaturesExtents_ = {};\n        /**\n         * If a feature geometry changes while a pointer drag|move event occurs, the\n         * feature doesn't get updated right away.  It will be at the next 'pointerup'\n         * event fired.\n         * @type {!Object<string, import(\"../Feature.
 js\").default>}\n         * @private\n         */\n        _this.pendingFeatures_ = {};\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.pixelTolerance_ =\n            options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n        /**\n         * Segment RTree for each layer\n         * @type {import(\"../structs/RBush.js\").default<SegmentData>}\n         * @private\n         */\n        _this.rBush_ = new RBush();\n        /**\n         * @const\n         * @private\n         * @type {Object<string, function(import(\"../Feature.js\").default, import(\"../geom/Geometry.js\").default): void>}\n         */\n        _this.SEGMENT_WRITERS_ = {\n            'Point': _this.writePointGeometry_.bind(_this),\n            'LineString': _this.writeLineStringGeometry_.bind(_this),\n            'LinearRing': _this.writeLineStringGeometry_.bind(_this),\n            'Polygon': _this.writePolygonGeometry_.bind(_this),\n            'MultiPoint':
  _this.writeMultiPointGeometry_.bind(_this),\n            'MultiLineString': _this.writeMultiLineStringGeometry_.bind(_this),\n            'MultiPolygon': _this.writeMultiPolygonGeometry_.bind(_this),\n            'GeometryCollection': _this.writeGeometryCollectionGeometry_.bind(_this),\n            'Circle': _this.writeCircleGeometry_.bind(_this),\n        };\n        return _this;\n    }\n    /**\n     * Add a feature to the collection of features that we may snap to.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {boolean=} opt_listen Whether to listen to the feature change or not\n     *     Defaults to `true`.\n     * @api\n     */\n    Snap.prototype.addFeature = function (feature, opt_listen) {\n        var register = opt_listen !== undefined ? opt_listen : true;\n        var feature_uid = getUid(feature);\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            var segmentWriter = this.SEGMENT_WRITERS_[geometry.
 getType()];\n            if (segmentWriter) {\n                this.indexedFeaturesExtents_[feature_uid] = geometry.getExtent(createEmpty());\n                segmentWriter(feature, geometry);\n            }\n        }\n        if (register) {\n            this.featureChangeListenerKeys_[feature_uid] = listen(feature, EventType.CHANGE, this.handleFeatureChange_, this);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @private\n     */\n    Snap.prototype.forEachFeatureAdd_ = function (feature) {\n        this.addFeature(feature);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @private\n     */\n    Snap.prototype.forEachFeatureRemove_ = function (feature) {\n        this.removeFeature(feature);\n    };\n    /**\n     * @return {import(\"../Collection.js\").default<import(\"../Feature.js\").default>|Array<import(\"../Feature.js\").default>} Features.\n     * @private\n     */\n    Sna
 p.prototype.getFeatures_ = function () {\n        var features;\n        if (this.features_) {\n            features = this.features_;\n        }\n        else if (this.source_) {\n            features = this.source_.getFeatures();\n        }\n        return features;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    Snap.prototype.handleEvent = function (evt) {\n        var result = this.snapTo(evt.pixel, evt.coordinate, evt.map);\n        if (result.snapped) {\n            evt.coordinate = result.vertex.slice(0, 2);\n            evt.pixel = result.vertexPixel;\n        }\n        return _super.prototype.handleEvent.call(this, evt);\n    };\n    /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Snap.prototype.handleFeatureAdd_ = function (evt) {\n       
  var feature = getFeatureFromEvent(evt);\n        this.addFeature(feature);\n    };\n    /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Snap.prototype.handleFeatureRemove_ = function (evt) {\n        var feature = getFeatureFromEvent(evt);\n        this.removeFeature(feature);\n    };\n    /**\n     * @param {import(\"../events/Event.js\").default} evt Event.\n     * @private\n     */\n    Snap.prototype.handleFeatureChange_ = function (evt) {\n        var feature = /** @type {import(\"../Feature.js\").default} */ (evt.target);\n        if (this.handlingDownUpSequence) {\n            var uid = getUid(feature);\n            if (!(uid in this.pendingFeatures_)) {\n                this.pendingFeatures_[uid] = feature;\n            }\n        }\n        else {\n            this.updateFeature_(feature);\n        }\n    };\n    /**\n     * Handle pointer up events.\n     * @param
  {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Snap.prototype.handleUpEvent = function (evt) {\n        var featuresToUpdate = getValues(this.pendingFeatures_);\n        if (featuresToUpdate.length) {\n            featuresToUpdate.forEach(this.updateFeature_.bind(this));\n            this.pendingFeatures_ = {};\n        }\n        return false;\n    };\n    /**\n     * Remove a feature from the collection of features that we may snap to.\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {boolean=} opt_unlisten Whether to unlisten to the feature change\n     *     or not. Defaults to `true`.\n     * @api\n     */\n    Snap.prototype.removeFeature = function (feature, opt_unlisten) {\n        var unregister = opt_unlisten !== undefined ? opt_unlisten : true;\n        var feature_uid = getUid(feature);\n        var extent = this.indexedFeaturesExtents_[feature_uid];\n        if (
 extent) {\n            var rBush = this.rBush_;\n            var nodesToRemove_1 = [];\n            rBush.forEachInExtent(extent, function (node) {\n                if (feature === node.feature) {\n                    nodesToRemove_1.push(node);\n                }\n            });\n            for (var i = nodesToRemove_1.length - 1; i >= 0; --i) {\n                rBush.remove(nodesToRemove_1[i]);\n            }\n        }\n        if (unregister) {\n            unlistenByKey(this.featureChangeListenerKeys_[feature_uid]);\n            delete this.featureChangeListenerKeys_[feature_uid];\n        }\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Snap.prototype.setMap = function (map) {\n        var currentMap = this.getMap();\n        var keys = this.featur
 esListenerKeys_;\n        var features = /** @type {Array<import(\"../Feature.js\").default>} */ (this.getFeatures_());\n        if (currentMap) {\n            keys.forEach(unlistenByKey);\n            keys.length = 0;\n            features.forEach(this.forEachFeatureRemove_.bind(this));\n        }\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            if (this.features_) {\n                keys.push(listen(this.features_, CollectionEventType.ADD, this.handleFeatureAdd_, this), listen(this.features_, CollectionEventType.REMOVE, this.handleFeatureRemove_, this));\n            }\n            else if (this.source_) {\n                keys.push(listen(this.source_, VectorEventType.ADDFEATURE, this.handleFeatureAdd_, this), listen(this.source_, VectorEventType.REMOVEFEATURE, this.handleFeatureRemove_, this));\n            }\n            features.forEach(this.forEachFeatureAdd_.bind(this));\n        }\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pix
 el} pixel Pixel\n     * @param {import(\"../coordinate.js\").Coordinate} pixelCoordinate Coordinate\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @return {Result} Snap result\n     */\n    Snap.prototype.snapTo = function (pixel, pixelCoordinate, map) {\n        var lowerLeft = map.getCoordinateFromPixel([\n            pixel[0] - this.pixelTolerance_,\n            pixel[1] + this.pixelTolerance_,\n        ]);\n        var upperRight = map.getCoordinateFromPixel([\n            pixel[0] + this.pixelTolerance_,\n            pixel[1] - this.pixelTolerance_,\n        ]);\n        var box = boundingExtent([lowerLeft, upperRight]);\n        var segments = this.rBush_.getInExtent(box);\n        // If snapping on vertices only, don't consider circles\n        if (this.vertex_ && !this.edge_) {\n            segments = segments.filter(function (segment) {\n                return segment.feature.getGeometry().getType() !== GeometryType.CIRCLE;\n            });\n      
   }\n        var snapped = false;\n        var vertex = null;\n        var vertexPixel = null;\n        if (segments.length === 0) {\n            return {\n                snapped: snapped,\n                vertex: vertex,\n                vertexPixel: vertexPixel,\n            };\n        }\n        var projection = map.getView().getProjection();\n        var projectedCoordinate = fromUserCoordinate(pixelCoordinate, projection);\n        var closestSegmentData;\n        var minSquaredDistance = Infinity;\n        for (var i = 0; i < segments.length; ++i) {\n            var segmentData = segments[i];\n            tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n            tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n            var delta = squaredDistanceToSegment(projectedCoordinate, tempSegment);\n            if (delta < minSquaredDistance) {\n                closestSegmentData = segmentData;\n                minSquaredDistanc
 e = delta;\n            }\n        }\n        var closestSegment = closestSegmentData.segment;\n        if (this.vertex_ && !this.edge_) {\n            var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n            var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n            var squaredDist1 = squaredCoordinateDistance(pixel, pixel1);\n            var squaredDist2 = squaredCoordinateDistance(pixel, pixel2);\n            var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n            if (dist <= this.pixelTolerance_) {\n                snapped = true;\n                vertex =\n                    squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];\n                vertexPixel = map.getPixelFromCoordinate(vertex);\n            }\n        }\n        else if (this.edge_) {\n            var isCircle = closestSegmentData.feature.getGeometry().getType() ===\n                GeometryType.CIRCLE;\n            if (isCircle) {\n                v
 ar circleGeometry = closestSegmentData.feature.getGeometry();\n                var userProjection = getUserProjection();\n                if (userProjection) {\n                    circleGeometry = circleGeometry\n                        .clone()\n                        .transform(userProjection, projection);\n                }\n                vertex = toUserCoordinate(closestOnCircle(projectedCoordinate, \n                /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry)), projection);\n            }\n            else {\n                tempSegment[0] = fromUserCoordinate(closestSegment[0], projection);\n                tempSegment[1] = fromUserCoordinate(closestSegment[1], projection);\n                vertex = toUserCoordinate(closestOnSegment(projectedCoordinate, tempSegment), projection);\n            }\n            vertexPixel = map.getPixelFromCoordinate(vertex);\n            if (coordinateDistance(pixel, vertexPixel) <= this.pixelTolerance_) {\n        
         snapped = true;\n                if (this.vertex_ && !isCircle) {\n                    var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n                    var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n                    var squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n                    var squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n                    var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n                    if (dist <= this.pixelTolerance_) {\n                        vertex =\n                            squaredDist1 > squaredDist2\n                                ? closestSegment[1]\n                                : closestSegment[0];\n                        vertexPixel = map.getPixelFromCoordinate(vertex);\n                    }\n                }\n            }\n        }\n        if (snapped) {\n            vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])
 ];\n        }\n        return {\n            snapped: snapped,\n            vertex: vertex,\n            vertexPixel: vertexPixel,\n        };\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @private\n     */\n    Snap.prototype.updateFeature_ = function (feature) {\n        this.removeFeature(feature, false);\n        this.addFeature(feature, false);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeCircleGeometry_ = function (feature, geometry) {\n        var projection = this.getMap().getView().getProjection();\n        var circleGeometry = geometry;\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry\n                .clone()\n                .transform
 (userProjection, projection));\n        }\n        var polygon = fromCircle(circleGeometry);\n        if (userProjection) {\n            polygon.transform(projection, userProjection);\n        }\n        var coordinates = polygon.getCoordinates()[0];\n        for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n            var segment = coordinates.slice(i, i + 2);\n            var segmentData = {\n                feature: feature,\n                segment: segment,\n            };\n            this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeGeometryCollectionGeometry_ = function (feature, geometry) {\n        var geometries = geometry.getGeometriesArray();\n        for (var i = 0; i < geometries.length; ++i) {\n            var segmentWr
 iter = this.SEGMENT_WRITERS_[geometries[i].getType()];\n            if (segmentWriter) {\n                segmentWriter(feature, geometries[i]);\n            }\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeLineStringGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCoordinates();\n        for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n            var segment = coordinates.slice(i, i + 2);\n            var segmentData = {\n                feature: feature,\n                segment: segment,\n            };\n            this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n     * @priv
 ate\n     */\n    Snap.prototype.writeMultiLineStringGeometry_ = function (feature, geometry) {\n        var lines = geometry.getCoordinates();\n        for (var j = 0, jj = lines.length; j < jj; ++j) {\n            var coordinates = lines[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(i, i + 2);\n                var segmentData = {\n                    feature: feature,\n                    segment: segment,\n                };\n                this.rBush_.insert(boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeMultiPointGeometry_ = function (feature, geometry) {\n        var points = geometry.getCoordinates();\n        for (var i = 0, ii = points.length; i < ii; ++i) {\n        
     var coordinates = points[i];\n            var segmentData = {\n                feature: feature,\n                segment: [coordinates, coordinates],\n            };\n            this.rBush_.insert(geometry.getExtent(), segmentData);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeMultiPolygonGeometry_ = function (feature, geometry) {\n        var polygons = geometry.getCoordinates();\n        for (var k = 0, kk = polygons.length; k < kk; ++k) {\n            var rings = polygons[k];\n            for (var j = 0, jj = rings.length; j < jj; ++j) {\n                var coordinates = rings[j];\n                for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                    var segment = coordinates.slice(i, i + 2);\n                    var segmentData = {\n                        feature: fe
 ature,\n                        segment: segment,\n                    };\n                    this.rBush_.insert(boundingExtent(segment), segmentData);\n                }\n            }\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/Point.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writePointGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCoordinates();\n        var segmentData = {\n            feature: feature,\n            segment: [coordinates, coordinates],\n        };\n        this.rBush_.insert(geometry.getExtent(), segmentData);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writePolygonGeometry_ = function (feature, geometry) {\n        var rings = geometry.getCoordinate
 s();\n        for (var j = 0, jj = rings.length; j < jj; ++j) {\n            var coordinates = rings[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(i, i + 2);\n                var segmentData = {\n                    feature: feature,\n                    segment: segment,\n                };\n                this.rBush_.insert(boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    return Snap;\n}(PointerInteraction));\nexport default Snap;\n//# sourceMappingURL=Snap.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n    
     extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Translate\n */\nimport Collection from '../Collection.js';\nimport Event from '../events/Event.js';\nimport InteractionProperty from './Property.js';\nimport PointerInteraction from './Pointer.js';\nimport { TRUE } from '../functions.js';\nimport { getChangeEventType } from '../Object.js';\nimport { includes } from '../array.js';\n/**\n * @enum {string}\n */\nvar TranslateEventType = {\n    /**\n     * Triggered upon feature translation start.\n     * @event TranslateEvent#translatestart\n     * @api\n     */\n    TRANSLATESTART: 'translatestart',\n    /**\n     * Triggered upon feature translation.\n     * @event TranslateEvent#translating\n     * @api\n     */\n    TRANSLATING: 'translating',\n    /**\n     * Triggered upon feature translation end.\n     * @event Trans
 lateEvent#translateend\n     * @api\n     */\n    TRANSLATEEND: 'translateend',\n};\n/**\n * A function that takes an {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * translated or `false` otherwise.\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default):boolean} FilterFunction\n */\n/**\n * @typedef {Object} Options\n * @property {Collection<import(\"../Feature.js\").default>} [features] Only features contained in this collection will be able to be translated. If\n * not specified, all features on the map will be able to be translated.\n * @property {Array<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default): boolean} [layers] A list of layers from which features should be\n * translated. Alternatively, a filter function can be provided. The\n * function will be called for each layer in the map and sho
 uld return\n * `true` for layers that you want to be translatable. If the option is\n * absent, all visible layers will be considered translatable.\n * @property {FilterFunction} [filter] A function\n * that takes an {@link module:ol/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * translated or `false` otherwise.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside the radius around the given position\n * will be checked for features.\n */\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Translate~Translate} instances\n * are instances of this type.\n */\nvar TranslateEvent = /** @class */ (function (_super) {\n    __extends(TranslateEvent, _super);\n    /**\n     * @param {TranslateEventType} type Type.\n     * @param {Collection<import(\"../Feature.js\").default>} features The features translated.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n
      * @param {import(\"../coordinate.js\").Coordinate} startCoordinate The original coordinates before.translation started\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     */\n    function TranslateEvent(type, features, coordinate, startCoordinate, mapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The features being translated.\n         * @type {Collection<import(\"../Feature.js\").default>}\n         * @api\n         */\n        _this.features = features;\n        /**\n         * The coordinate of the drag event.\n         * @const\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @api\n         */\n        _this.coordinate = coordinate;\n        /**\n         * The coordinate of the start position before translation started.\n         * @const\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @api\n         */\n        _this.startCoordina
 te = startCoordinate;\n        /**\n         * Associated {@link module:ol/MapBrowserEvent}.\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n         */\n        _this.mapBrowserEvent = mapBrowserEvent;\n        return _this;\n    }\n    return TranslateEvent;\n}(Event));\nexport { TranslateEvent };\n/**\n * @classdesc\n * Interaction for translating (moving) features.\n *\n * @fires TranslateEvent\n * @api\n */\nvar Translate = /** @class */ (function (_super) {\n    __extends(Translate, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Translate(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, /** @type {import(\"./Pointer.js\").Options} */ (options)) || this;\n        /**\n         * The last position we translated to.\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.las
 tCoordinate_ = null;\n        /**\n         * The start position before translation started.\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.startCoordinate_ = null;\n        /**\n         * @type {Collection<import(\"../Feature.js\").default>}\n         * @private\n         */\n        _this.features_ = options.features !== undefined ? options.features : null;\n        /** @type {function(import(\"../layer/Layer.js\").default): boolean} */\n        var layerFilter;\n        if (options.layers) {\n            if (typeof options.layers === 'function') {\n                layerFilter = options.layers;\n            }\n            else {\n                var layers_1 = options.layers;\n                layerFilter = function (layer) {\n                    return includes(layers_1, layer);\n                };\n            }\n        }\n        else {\n            layerFilter = TRUE;\n        }\n        /**\n         * @private\n 
         * @type {function(import(\"../layer/Layer.js\").default): boolean}\n         */\n        _this.layerFilter_ = layerFilter;\n        /**\n         * @private\n         * @type {FilterFunction}\n         */\n        _this.filter_ = options.filter ? options.filter : TRUE;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n        /**\n         * @type {import(\"../Feature.js\").default}\n         * @private\n         */\n        _this.lastFeature_ = null;\n        _this.addEventListener(getChangeEventType(InteractionProperty.ACTIVE), _this.handleActiveChanged_);\n        return _this;\n    }\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Translate.prototype.handleDownEvent = function (event) {\n        this.lastFeature_ = this.featuresAtPixe
 l_(event.pixel, event.map);\n        if (!this.lastCoordinate_ && this.lastFeature_) {\n            this.startCoordinate_ = event.coordinate;\n            this.lastCoordinate_ = event.coordinate;\n            this.handleMoveEvent(event);\n            var features = this.features_ || new Collection([this.lastFeature_]);\n            this.dispatchEvent(new TranslateEvent(TranslateEventType.TRANSLATESTART, features, event.coordinate, this.startCoordinate_, event));\n            return true;\n        }\n        return false;\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Translate.prototype.handleUpEvent = function (event) {\n        if (this.lastCoordinate_) {\n            this.lastCoordinate_ = null;\n            this.handleMoveEvent(event);\n            var features = this.features_ || new Collection([this.lastFeature_]);\n            this.dis
 patchEvent(new TranslateEvent(TranslateEventType.TRANSLATEEND, features, event.coordinate, this.startCoordinate_, event));\n            // cleanup\n            this.startCoordinate_ = null;\n            return true;\n        }\n        return false;\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    Translate.prototype.handleDragEvent = function (event) {\n        if (this.lastCoordinate_) {\n            var newCoordinate = event.coordinate;\n            var deltaX_1 = newCoordinate[0] - this.lastCoordinate_[0];\n            var deltaY_1 = newCoordinate[1] - this.lastCoordinate_[1];\n            var features = this.features_ || new Collection([this.lastFeature_]);\n            features.forEach(function (feature) {\n                var geom = feature.getGeometry();\n                geom.translate(deltaX_1, deltaY_1);\n                feature.setGeometry(geom);\n            });\n            this.la
 stCoordinate_ = newCoordinate;\n            this.dispatchEvent(new TranslateEvent(TranslateEventType.TRANSLATING, features, newCoordinate, this.startCoordinate_, event));\n        }\n    };\n    /**\n     * Handle pointer move events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    Translate.prototype.handleMoveEvent = function (event) {\n        var elem = event.map.getViewport();\n        // Change the cursor to grab/grabbing if hovering any of the features managed\n        // by the interaction\n        if (this.featuresAtPixel_(event.pixel, event.map)) {\n            elem.classList.remove(this.lastCoordinate_ ? 'ol-grab' : 'ol-grabbing');\n            elem.classList.add(this.lastCoordinate_ ? 'ol-grabbing' : 'ol-grab');\n        }\n        else {\n            elem.classList.remove('ol-grab', 'ol-grabbing');\n        }\n    };\n    /**\n     * Tests to see if the given coordinates intersects any of our selected\n     * features.\n     * @para
 m {import(\"../pixel.js\").Pixel} pixel Pixel coordinate to test for intersection.\n     * @param {import(\"../PluggableMap.js\").default} map Map to test the intersection on.\n     * @return {import(\"../Feature.js\").default} Returns the feature found at the specified pixel\n     * coordinates.\n     * @private\n     */\n    Translate.prototype.featuresAtPixel_ = function (pixel, map) {\n        return map.forEachFeatureAtPixel(pixel, function (feature, layer) {\n            if (this.filter_(feature, layer)) {\n                if (!this.features_ || includes(this.features_.getArray(), feature)) {\n                    return feature;\n                }\n            }\n        }.bind(this), {\n            layerFilter: this.layerFilter_,\n            hitTolerance: this.hitTolerance_,\n        });\n    };\n    /**\n     * Returns the Hit-detection tolerance.\n     * @returns {number} Hit tolerance in pixels.\n     * @api\n     */\n    Translate.prototype.getHitTolerance = function () 
 {\n        return this.hitTolerance_;\n    };\n    /**\n     * Hit-detection tolerance. Pixels inside the radius around the given position\n     * will be checked for features.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @api\n     */\n    Translate.prototype.setHitTolerance = function (hitTolerance) {\n        this.hitTolerance_ = hitTolerance;\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Translate.prototype.setMap = function (map) {\n        var oldMap = this.getMap();\n        _super.prototype.setMap.call(this, map);\n        this.updateState_(oldMap);\n    };\n    /**\n     * @private\n     */\n    Translate.prototype.handleActiveChanged_ = function () {\n        this.updateState_(null);\n    };\n    /**\n     * @param {impo
 rt(\"../PluggableMap.js\").default} oldMap Old map.\n     * @private\n     */\n    Translate.prototype.updateState_ = function (oldMap) {\n        var map = this.getMap();\n        var active = this.getActive();\n        if (!map || !active) {\n            map = map || oldMap;\n            if (map) {\n                var elem = map.getViewport();\n                elem.classList.remove('ol-grab', 'ol-grabbing');\n            }\n        }\n    };\n    return Translate;\n}(PointerInteraction));\nexport default Translate;\n//# sourceMappingURL=Translate.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(
 d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/EsriJSON\n */\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport LinearRing from '../geom/LinearRing.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport { assert } from '../asserts.js';\nimport { assign, isEmpty } from '../obj.js';\nimport { containsExtent } from '../extent.js';\nimport { deflateCoordinates } from '../geom/flat/deflate.js';\nimport { get as getProjection } from '../proj.js';\nimpor
 t { linearRingIsClockwise } from '../geom/flat/orient.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {import(\"arcgis-rest-api\").Feature} EsriJSONFeature\n * @typedef {import(\"arcgis-rest-api\").FeatureSet} EsriJSONFeatureSet\n * @typedef {import(\"arcgis-rest-api\").Geometry} EsriJSONGeometry\n * @typedef {import(\"arcgis-rest-api\").Point} EsriJSONPoint\n * @typedef {import(\"arcgis-rest-api\").Polyline} EsriJSONPolyline\n * @typedef {import(\"arcgis-rest-api\").Polygon} EsriJSONPolygon\n * @typedef {import(\"arcgis-rest-api\").Multipoint} EsriJSONMultipoint\n * @typedef {import(\"arcgis-rest-api\").HasZM} EsriJSONHasZM\n * @typedef {import(\"arcgis-rest-api\").Position} EsriJSONPosition\n * @typedef {import(\"arcgis-rest-api\").SpatialReferenceWkid} EsriJSONSpatialReferenceWkid\n */\n/**\n * @typedef {Object} EsriJSONMultiPolygon\n * @property {Array<Array<Array<Array<number>>>>} rings Rings for the MultiPolygon.\n * @property {boolean} [ha
 sM] If the polygon coordinates have an M value.\n * @property {boolean} [hasZ] If the polygon coordinates have a Z value.\n * @property {EsriJSONSpatialReferenceWkid} [spatialReference] The coordinate reference system.\n */\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default, function(EsriJSONGeometry): import(\"../geom/Geometry.js\").default>}\n */\nvar GEOMETRY_READERS = {};\nGEOMETRY_READERS[GeometryType.POINT] = readPointGeometry;\nGEOMETRY_READERS[GeometryType.LINE_STRING] = readLineStringGeometry;\nGEOMETRY_READERS[GeometryType.POLYGON] = readPolygonGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_POINT] = readMultiPointGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_LINE_STRING] = readMultiLineStringGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_POLYGON] = readMultiPolygonGeometry;\n/**\n * @const\n * @type {Object<string, function(import(\"../geom/Geometry.js\").default, import(\"./Feature.js\").WriteOptions=): (EsriJSONGeometry)>}\n */\nvar GEOMETRY_W
 RITERS = {};\nGEOMETRY_WRITERS[GeometryType.POINT] = writePointGeometry;\nGEOMETRY_WRITERS[GeometryType.LINE_STRING] = writeLineStringGeometry;\nGEOMETRY_WRITERS[GeometryType.POLYGON] = writePolygonGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_POINT] = writeMultiPointGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_LINE_STRING] = writeMultiLineStringGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_POLYGON] = writeMultiPolygonGeometry;\n/**\n * @typedef {Object} Options\n * @property {string} [geometryName] Geometry name to use when creating features.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the EsriJSON format.\n *\n * @api\n */\nvar EsriJSON = /** @class */ (function (_super) {\n    __extends(EsriJSON, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function EsriJSON(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this) || this;\n        /**\n
          * Name of the geometry attribute for features.\n         * @type {string|undefined}\n         * @private\n         */\n        _this.geometryName_ = options.geometryName;\n        return _this;\n    }\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @param {string=} opt_idField Name of the field where to get the id from.\n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    EsriJSON.prototype.readFeatureFromObject = function (object, opt_options, opt_idField) {\n        var esriJSONFeature = /** @type {EsriJSONFeature} */ (object);\n        var geometry = readGeometry(esriJSONFeature.geometry, opt_options);\n        var feature = new Feature();\n        if (this.geometryName_) {\n            feature.setGeometryName(this.geometryName_);\n        }\n        feature.setGeometry(geometry);\n        if (esriJSONFeature.attributes) {\n            feature
 .setProperties(esriJSONFeature.attributes, true);\n            var id = esriJSONFeature.attributes[opt_idField];\n            if (id !== undefined) {\n                feature.setId(/** @type {number} */ (id));\n            }\n        }\n        return feature;\n    };\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    EsriJSON.prototype.readFeaturesFromObject = function (object, opt_options) {\n        var options = opt_options ? opt_options : {};\n        if (object['features']) {\n            var esriJSONFeatureSet = /** @type {EsriJSONFeatureSet} */ (object);\n            /** @type {Array<import(\"../Feature.js\").default>} */\n            var features = [];\n            var esriJSONFeatures = esriJSONFeatureSet.features;\n            for (var i = 0, ii = esriJSONFeatures.length; i < ii; ++i) {\n                features.push(thi
 s.readFeatureFromObject(esriJSONFeatures[i], options, object.objectIdFieldName));\n            }\n            return features;\n        }\n        else {\n            return [this.readFeatureFromObject(object, options)];\n        }\n    };\n    /**\n     * @param {EsriJSONGeometry} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    EsriJSON.prototype.readGeometryFromObject = function (object, opt_options) {\n        return readGeometry(object, opt_options);\n    };\n    /**\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    EsriJSON.prototype.readProjectionFromObject = function (object) {\n        if (object['spatialReference'] &&\n            object['spatialReference']['wkid'] !== undefined) {\n            var spatialReference = /** @type {EsriJSO
 NSpatialReferenceWkid} */ (object['spatialReference']);\n            var crs = spatialReference.wkid;\n            return getProjection('EPSG:' + crs);\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * Encode a geometry as a EsriJSON object.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {EsriJSONGeometry} Object.\n     * @api\n     */\n    EsriJSON.prototype.writeGeometryObject = function (geometry, opt_options) {\n        return writeGeometry(geometry, this.adaptOptions(opt_options));\n    };\n    /**\n     * Encode a feature as a esriJSON Feature object.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {Object} Object.\n     * @api\n     */\n    EsriJSON.prototype.writeFeatureObject =
  function (feature, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var object = {};\n        if (!feature.hasProperties()) {\n            object['attributes'] = {};\n            return object;\n        }\n        var properties = feature.getProperties();\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            object['geometry'] = writeGeometry(geometry, opt_options);\n            if (opt_options && opt_options.featureProjection) {\n                object['geometry']['spatialReference'] = /** @type {EsriJSONSpatialReferenceWkid} */ ({\n                    wkid: Number(getProjection(opt_options.featureProjection)\n                        .getCode()\n                        .split(':')\n                        .pop()),\n                });\n            }\n            delete properties[feature.getGeometryName()];\n        }\n        if (!isEmpty(properties)) {\n            object['attributes'] = properties;\n        }\n       
  else {\n            object['attributes'] = {};\n        }\n        return object;\n    };\n    /**\n     * Encode an array of features as a EsriJSON object.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {EsriJSONFeatureSet} EsriJSON Object.\n     * @api\n     */\n    EsriJSON.prototype.writeFeaturesObject = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var objects = [];\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            objects.push(this.writeFeatureObject(features[i], opt_options));\n        }\n        return {\n            'features': objects,\n        };\n    };\n    return EsriJSON;\n}(JSONFeature));\n/**\n * @param {EsriJSONGeometry} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {import(\"../geom/Geometry.js\
 ").default} Geometry.\n */\nfunction readGeometry(object, opt_options) {\n    var _a, _b;\n    if (!object) {\n        return null;\n    }\n    /** @type {import(\"../geom/GeometryType.js\").default} */\n    var type;\n    if (typeof object['x'] === 'number' && typeof object['y'] === 'number') {\n        type = GeometryType.POINT;\n    }\n    else if (object['points']) {\n        type = GeometryType.MULTI_POINT;\n    }\n    else if (object['paths']) {\n        var esriJSONPolyline = /** @type {EsriJSONPolyline} */ (object);\n        if (esriJSONPolyline.paths.length === 1) {\n            type = GeometryType.LINE_STRING;\n        }\n        else {\n            type = GeometryType.MULTI_LINE_STRING;\n        }\n    }\n    else if (object['rings']) {\n        var esriJSONPolygon = /** @type {EsriJSONPolygon} */ (object);\n        var layout = getGeometryLayout(esriJSONPolygon);\n        var rings = convertRings(esriJSONPolygon.rings, layout);\n        if (rings.length === 1) {\n       
      type = GeometryType.POLYGON;\n            object = assign({}, object, (_a = {}, _a['rings'] = rings[0], _a));\n        }\n        else {\n            type = GeometryType.MULTI_POLYGON;\n            object = assign({}, object, (_b = {}, _b['rings'] = rings, _b));\n        }\n    }\n    var geometryReader = GEOMETRY_READERS[type];\n    return transformGeometryWithOptions(geometryReader(object), false, opt_options);\n}\n/**\n * Determines inner and outer rings.\n * Checks if any polygons in this array contain any other polygons in this\n * array. It is used for checking for holes.\n * Logic inspired by: https://github.com/Esri/terraformer-arcgis-parser\n * @param {Array<!Array<!Array<number>>>} rings Rings.\n * @param {import(\"../geom/GeometryLayout.js\").default} layout Geometry layout.\n * @return {Array<!Array<!Array<!Array<number>>>>} Transformed rings.\n */\nfunction convertRings(rings, layout) {\n    var flatRing = [];\n    var outerRings = [];\n    var holes = [];\n    var
  i, ii;\n    for (i = 0, ii = rings.length; i < ii; ++i) {\n        flatRing.length = 0;\n        deflateCoordinates(flatRing, 0, rings[i], layout.length);\n        // is this ring an outer ring? is it clockwise?\n        var clockwise = linearRingIsClockwise(flatRing, 0, flatRing.length, layout.length);\n        if (clockwise) {\n            outerRings.push([rings[i]]);\n        }\n        else {\n            holes.push(rings[i]);\n        }\n    }\n    while (holes.length) {\n        var hole = holes.shift();\n        var matched = false;\n        // loop over all outer rings and see if they contain our hole.\n        for (i = outerRings.length - 1; i >= 0; i--) {\n            var outerRing = outerRings[i][0];\n            var containsHole = containsExtent(new LinearRing(outerRing).getExtent(), new LinearRing(hole).getExtent());\n            if (containsHole) {\n                // the hole is contained push it into our polygon\n                outerRings[i].push(hole);\n          
       matched = true;\n                break;\n            }\n        }\n        if (!matched) {\n            // no outer rings contain this hole turn it into and outer\n            // ring (reverse it)\n            outerRings.push([hole.reverse()]);\n        }\n    }\n    return outerRings;\n}\n/**\n * @param {EsriJSONPoint} object Object.\n * @return {import(\"../geom/Geometry.js\").default} Point.\n */\nfunction readPointGeometry(object) {\n    var point;\n    if (object.m !== undefined && object.z !== undefined) {\n        point = new Point([object.x, object.y, object.z, object.m], GeometryLayout.XYZM);\n    }\n    else if (object.z !== undefined) {\n        point = new Point([object.x, object.y, object.z], GeometryLayout.XYZ);\n    }\n    else if (object.m !== undefined) {\n        point = new Point([object.x, object.y, object.m], GeometryLayout.XYM);\n    }\n    else {\n        point = new Point([object.x, object.y]);\n    }\n    return point;\n}\n/**\n * @param {EsriJSONPolyl
 ine} object Object.\n * @return {import(\"../geom/Geometry.js\").default} LineString.\n */\nfunction readLineStringGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new LineString(object.paths[0], layout);\n}\n/**\n * @param {EsriJSONPolyline} object Object.\n * @return {import(\"../geom/Geometry.js\").default} MultiLineString.\n */\nfunction readMultiLineStringGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new MultiLineString(object.paths, layout);\n}\n/**\n * @param {EsriJSONHasZM} object Object.\n * @return {import(\"../geom/GeometryLayout.js\").default} The geometry layout to use.\n */\nfunction getGeometryLayout(object) {\n    var layout = GeometryLayout.XY;\n    if (object.hasZ === true && object.hasM === true) {\n        layout = GeometryLayout.XYZM;\n    }\n    else if (object.hasZ === true) {\n        layout = GeometryLayout.XYZ;\n    }\n    else if (object.hasM === true) {\n        layout = GeometryLayout.XYM;\n    }\n
     return layout;\n}\n/**\n * @param {EsriJSONMultipoint} object Object.\n * @return {import(\"../geom/Geometry.js\").default} MultiPoint.\n */\nfunction readMultiPointGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new MultiPoint(object.points, layout);\n}\n/**\n * @param {EsriJSONMultiPolygon} object Object.\n * @return {import(\"../geom/Geometry.js\").default} MultiPolygon.\n */\nfunction readMultiPolygonGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new MultiPolygon(object.rings, layout);\n}\n/**\n * @param {EsriJSONPolygon} object Object.\n * @return {import(\"../geom/Geometry.js\").default} Polygon.\n */\nfunction readPolygonGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new Polygon(object.rings, layout);\n}\n/**\n * @param {import(\"../geom/Point.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPoint} EsriJ
 SON geometry.\n */\nfunction writePointGeometry(geometry, opt_options) {\n    var coordinates = geometry.getCoordinates();\n    /** @type {EsriJSONPoint} */\n    var esriJSON;\n    var layout = geometry.getLayout();\n    if (layout === GeometryLayout.XYZ) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n            z: coordinates[2],\n        };\n    }\n    else if (layout === GeometryLayout.XYM) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n            m: coordinates[2],\n        };\n    }\n    else if (layout === GeometryLayout.XYZM) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n            z: coordinates[2],\n            m: coordinates[3],\n        };\n    }\n    else if (layout === GeometryLayout.XY) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n        };\n    }\n    else {\n        assert(false, 34); // Invalid
  geometry layout\n    }\n    return esriJSON;\n}\n/**\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @return {Object} Object with boolean hasZ and hasM keys.\n */\nfunction getHasZM(geometry) {\n    var layout = geometry.getLayout();\n    return {\n        hasZ: layout === GeometryLayout.XYZ || layout === GeometryLayout.XYZM,\n        hasM: layout === GeometryLayout.XYM || layout === GeometryLayout.XYZM,\n    };\n}\n/**\n * @param {import(\"../geom/LineString.js\").default} lineString Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPolyline} EsriJSON geometry.\n */\nfunction writeLineStringGeometry(lineString, opt_options) {\n    var hasZM = getHasZM(lineString);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        paths: [\n            /** @type {Array<EsriJSONPosition>} */ (lineString.getCoordinates()),\n        ],\n    };\n}\n/**\n * @param {import(\"../geom/Po
 lygon.js\").default} polygon Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPolygon} EsriJSON geometry.\n */\nfunction writePolygonGeometry(polygon, opt_options) {\n    // Esri geometries use the left-hand rule\n    var hasZM = getHasZM(polygon);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        rings: /** @type {Array<Array<EsriJSONPosition>>} */ (polygon.getCoordinates(false)),\n    };\n}\n/**\n * @param {import(\"../geom/MultiLineString.js\").default} multiLineString Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPolyline} EsriJSON geometry.\n */\nfunction writeMultiLineStringGeometry(multiLineString, opt_options) {\n    var hasZM = getHasZM(multiLineString);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        paths: /** @type {Array<Array<EsriJSONPosition>>} */ (multiLineString.getCoordinates()),\n    };
 \n}\n/**\n * @param {import(\"../geom/MultiPoint.js\").default} multiPoint Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONMultipoint} EsriJSON geometry.\n */\nfunction writeMultiPointGeometry(multiPoint, opt_options) {\n    var hasZM = getHasZM(multiPoint);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        points: /** @type {Array<EsriJSONPosition>} */ (multiPoint.getCoordinates()),\n    };\n}\n/**\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPolygon} EsriJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, opt_options) {\n    var hasZM = getHasZM(geometry);\n    var coordinates = geometry.getCoordinates(false);\n    var output = [];\n    for (var i = 0; i < coordinates.length; i++) {\n        for (var x = coordinates[i].length - 1; x >= 0; x--) {\n    
         output.push(coordinates[i][x]);\n        }\n    }\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        rings: /** @type {Array<Array<EsriJSONPosition>>} */ (output),\n    };\n}\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONGeometry} EsriJSON geometry.\n */\nfunction writeGeometry(geometry, opt_options) {\n    var geometryWriter = GEOMETRY_WRITERS[geometry.getType()];\n    return geometryWriter(transformGeometryWithOptions(geometry, true, opt_options), opt_options);\n}\nexport default EsriJSON;\n//# sourceMappingURL=EsriJSON.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if
  (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/XMLFeature\n */\nimport FeatureFormat from '../format/Feature.js';\nimport FormatType from '../format/FormatType.js';\nimport { abstract } from '../util.js';\nimport { extend } from '../array.js';\nimport { getXMLSerializer, isDocument, parse } from '../xml.js';\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for XML feature formats.\n *\n * @abstract\n */\nvar XMLFeature = /** @class */ (function (_super) {\n    __extends(XMLFeature, _super);\n    function XMLFeature() {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {XMLSerializer}\n     
     * @private\n         */\n        _this.xmlSerializer_ = getXMLSerializer();\n        return _this;\n    }\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    XMLFeature.prototype.getType = function () {\n        return FormatType.XML;\n    };\n    /**\n     * Read a single feature.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     * @api\n     */\n    XMLFeature.prototype.readFeature = function (source, opt_options) {\n        if (!source) {\n            return null;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFeatureFromDocument(doc, opt_options);\n        }\n        else if (isDocument(source)) {\n            return this.readFeatureFromDocument(\n            /** @type {Document} */ (source), opt_op
 tions);\n        }\n        else {\n            return this.readFeatureFromNode(\n            /** @type {Element} */ (source), opt_options);\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    XMLFeature.prototype.readFeatureFromDocument = function (doc, opt_options) {\n        var features = this.readFeaturesFromDocument(doc, opt_options);\n        if (features.length > 0) {\n            return features[0];\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    XMLFeature.prototype.readFeatureFromNode = function (node, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Read all f
 eatures from a feature collection.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     * @api\n     */\n    XMLFeature.prototype.readFeatures = function (source, opt_options) {\n        if (!source) {\n            return [];\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFeaturesFromDocument(doc, opt_options);\n        }\n        else if (isDocument(source)) {\n            return this.readFeaturesFromDocument(\n            /** @type {Document} */ (source), opt_options);\n        }\n        else {\n            return this.readFeaturesFromNode(\n            /** @type {Element} */ (source), opt_options);\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Opti
 ons.\n     * @protected\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    XMLFeature.prototype.readFeaturesFromDocument = function (doc, opt_options) {\n        /** @type {Array<import(\"../Feature.js\").default>} */\n        var features = [];\n        for (var n = doc.firstChild; n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                extend(features, this.readFeaturesFromNode(/** @type {Element} */ (n), opt_options));\n            }\n        }\n        return features;\n    };\n    /**\n     * @abstract\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @protected\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    XMLFeature.prototype.readFeaturesFromNode = function (node, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read a single geometry from a source.\n     *\n     * @param {Document|El
 ement|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    XMLFeature.prototype.readGeometry = function (source, opt_options) {\n        if (!source) {\n            return null;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readGeometryFromDocument(doc, opt_options);\n        }\n        else if (isDocument(source)) {\n            return this.readGeometryFromDocument(\n            /** @type {Document} */ (source), opt_options);\n        }\n        else {\n            return this.readGeometryFromNode(\n            /** @type {Element} */ (source), opt_options);\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").defa
 ult} Geometry.\n     */\n    XMLFeature.prototype.readGeometryFromDocument = function (doc, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    XMLFeature.prototype.readGeometryFromNode = function (node, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Read the projection from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    XMLFeature.prototype.readProjection = function (source) {\n        if (!source) {\n            return null;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readProjectionFromDocument(doc);\n       
  }\n        else if (isDocument(source)) {\n            return this.readProjectionFromDocument(/** @type {Document} */ (source));\n        }\n        else {\n            return this.readProjectionFromNode(/** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    XMLFeature.prototype.readProjectionFromDocument = function (doc) {\n        return this.dataProjection;\n    };\n    /**\n     * @param {Element} node Node.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    XMLFeature.prototype.readProjectionFromNode = function (node) {\n        return this.dataProjection;\n    };\n    /**\n     * Encode a feature as string.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @r
 eturn {string} Encoded feature.\n     */\n    XMLFeature.prototype.writeFeature = function (feature, opt_options) {\n        var node = this.writeFeatureNode(feature, opt_options);\n        return this.xmlSerializer_.serializeToString(node);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @protected\n     * @return {Node} Node.\n     */\n    XMLFeature.prototype.writeFeatureNode = function (feature, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Encode an array of features as string.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Result.\n     * @api\n     */\n    XMLFeature.prototype.writeFeatures = function (features, opt_options) {\n        var node = this.writeFeaturesNode(features,
  opt_options);\n        return this.xmlSerializer_.serializeToString(node);\n    };\n    /**\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Node} Node.\n     */\n    XMLFeature.prototype.writeFeaturesNode = function (features, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Encode a geometry as string.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded geometry.\n     */\n    XMLFeature.prototype.writeGeometry = function (geometry, opt_options) {\n        var node = this.writeGeometryNode(geometry, opt_options);\n        return this.xmlSerializer_.serializeToString(node);\n    };\n    /**\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {imp
 ort(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Node} Node.\n     */\n    XMLFeature.prototype.writeGeometryNode = function (geometry, opt_options) {\n        return null; // not implemented\n    };\n    return XMLFeature;\n}(FeatureFormat));\nexport default XMLFeature;\n//# sourceMappingURL=XMLFeature.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GMLBase\n */\n// FIXME Envelopes
  should not be treated as geometries! readEnvelope_ is part\n// of GEOMETRY_PARSERS_ and methods using GEOMETRY_PARSERS_ do not expect\n// envelopes/extents, only geometries!\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport LinearRing from '../geom/LinearRing.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport XMLFeature from './XMLFeature.js';\nimport { assign } from '../obj.js';\nimport { extend } from '../array.js';\nimport { getAllTextContent, getAttributeNS, makeArrayPusher, makeReplacer, parseNode, pushParseAndPop, } from '../xml.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformExtentWithOptions, transformGeometryWithOptions, } from './Feature.js';\
 n/**\n * @const\n * @type {string}\n */\nexport var GMLNS = 'http://www.opengis.net/gml';\n/**\n * A regular expression that matches if a string only contains whitespace\n * characters. It will e.g. match `''`, `' '`, `'\\n'` etc. The non-breaking\n * space (0xa0) is explicitly included as IE doesn't include it in its\n * definition of `\\s`.\n *\n * Information from `goog.string.isEmptyOrWhitespace`: https://github.com/google/closure-library/blob/e877b1e/closure/goog/string/string.js#L156-L160\n *\n * @const\n * @type {RegExp}\n */\nvar ONLY_WHITESPACE_RE = /^[\\s\\xa0]*$/;\n/**\n * @typedef {Object} Options\n * @property {Object<string, string>|string} [featureNS] Feature\n * namespace. If not defined will be derived from GML. If multiple\n * feature types have been configured which come from different feature\n * namespaces, this will be an object with the keys being the prefixes used\n * in the entries of featureType array. The values of the object will be the\n * feature namesp
 aces themselves. So for instance there might be a featureType\n * item `topp:states` in the `featureType` array and then there will be a key\n * `topp` in the featureNS object with value `http://www.openplans.org/topp`.\n * @property {Array<string>|string} [featureType] Feature type(s) to parse.\n * If multiple feature types need to be configured\n * which come from different feature namespaces, `featureNS` will be an object\n * with the keys being the prefixes used in the entries of featureType array.\n * The values of the object will be the feature namespaces themselves.\n * So for instance there might be a featureType item `topp:states` and then\n * there will be a key named `topp` in the featureNS object with value\n * `http://www.openplans.org/topp`.\n * @property {string} srsName srsName to use when writing geometries.\n * @property {boolean} [surface=false] Write gml:Surface instead of gml:Polygon\n * elements. This also affects the elements in multi-part geometries.\n * @pro
 perty {boolean} [curve=false] Write gml:Curve instead of gml:LineString\n * elements. This also affects the elements in multi-part geometries.\n * @property {boolean} [multiCurve=true] Write gml:MultiCurve instead of gml:MultiLineString.\n * Since the latter is deprecated in GML 3.\n * @property {boolean} [multiSurface=true] Write gml:multiSurface instead of\n * gml:MultiPolygon. Since the latter is deprecated in GML 3.\n * @property {string} [schemaLocation] Optional schemaLocation to use when\n * writing out the GML, this will override the default provided.\n * @property {boolean} [hasZ=false] If coordinates have a Z value.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Feature base format for reading and writing data in the GML format.\n * This class cannot be instantiated, it contains only base content that\n * is shared with versioned format classes GML2 and GML3.\n *\n * @abstract\n */\nvar GML
 Base = /** @class */ (function (_super) {\n    __extends(GMLBase, _super);\n    /**\n     * @param {Options=} opt_options Optional configuration object.\n     */\n    function GMLBase(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = /** @type {Options} */ (opt_options ? opt_options : {});\n        /**\n         * @protected\n         * @type {Array<string>|string|undefined}\n         */\n        _this.featureType = options.featureType;\n        /**\n         * @protected\n         * @type {Object<string, string>|string|undefined}\n         */\n        _this.featureNS = options.featureNS;\n        /**\n         * @protected\n         * @type {string}\n         */\n        _this.srsName = options.srsName;\n        /**\n         * @protected\n         * @type {string}\n         */\n        _this.schemaLocation = '';\n        /**\n         * @type {Object<string, Object<string, Object>>}\n         */\n        _this.FEATURE_COLLECTION_PARSERS = {};\n 
        _this.FEATURE_COLLECTION_PARSERS[_this.namespace] = {\n            'featureMember': makeArrayPusher(_this.readFeaturesInternal),\n            'featureMembers': makeReplacer(_this.readFeaturesInternal),\n        };\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<Feature> | undefined} Features.\n     */\n    GMLBase.prototype.readFeaturesInternal = function (node, objectStack) {\n        var localName = node.localName;\n        var features = null;\n        if (localName == 'FeatureCollection') {\n            features = pushParseAndPop([], this.FEATURE_COLLECTION_PARSERS, node, objectStack, this);\n        }\n        else if (localName == 'featureMembers' || localName == 'featureMember') {\n            var context = objectStack[0];\n            var featureType = context['featureType'];\n            var featureNS = context['featureNS'];\n            var prefix = 'p';\n          
   var defaultPrefix = 'p0';\n            if (!featureType && node.childNodes) {\n                (featureType = []), (featureNS = {});\n                for (var i = 0, ii = node.childNodes.length; i < ii; ++i) {\n                    var child = node.childNodes[i];\n                    if (child.nodeType === 1) {\n                        var ft = child.nodeName.split(':').pop();\n                        if (featureType.indexOf(ft) === -1) {\n                            var key = '';\n                            var count = 0;\n                            var uri = child.namespaceURI;\n                            for (var candidate in featureNS) {\n                                if (featureNS[candidate] === uri) {\n                                    key = candidate;\n                                    break;\n                                }\n                                ++count;\n                            }\n                            if (!key) {\n                          
       key = prefix + count;\n                                featureNS[key] = uri;\n                            }\n                            featureType.push(key + ':' + ft);\n                        }\n                    }\n                }\n                if (localName != 'featureMember') {\n                    // recheck featureType for each featureMember\n                    context['featureType'] = featureType;\n                    context['featureNS'] = featureNS;\n                }\n            }\n            if (typeof featureNS === 'string') {\n                var ns = featureNS;\n                featureNS = {};\n                featureNS[defaultPrefix] = ns;\n            }\n            /** @type {Object<string, Object<string, import(\"../xml.js\").Parser>>} */\n            var parsersNS = {};\n            var featureTypes = Array.isArray(featureType)\n                ? featureType\n                : [featureType];\n            for (var p in featureNS) {\n             
    /** @type {Object<string, import(\"../xml.js\").Parser>} */\n                var parsers = {};\n                for (var i = 0, ii = featureTypes.length; i < ii; ++i) {\n                    var featurePrefix = featureTypes[i].indexOf(':') === -1\n                        ? defaultPrefix\n                        : featureTypes[i].split(':')[0];\n                    if (featurePrefix === p) {\n                        parsers[featureTypes[i].split(':').pop()] =\n                            localName == 'featureMembers'\n                                ? makeArrayPusher(this.readFeatureElement, this)\n                                : makeReplacer(this.readFeatureElement, this);\n                    }\n                }\n                parsersNS[featureNS[p]] = parsers;\n            }\n            if (localName == 'featureMember') {\n                features = pushParseAndPop(undefined, parsersNS, node, objectStack);\n            }\n            else {\n                features = push
 ParseAndPop([], parsersNS, node, objectStack);\n            }\n        }\n        if (features === null) {\n            features = [];\n        }\n        return features;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent|undefined} Geometry.\n     */\n    GMLBase.prototype.readGeometryElement = function (node, objectStack) {\n        var context = /** @type {Object} */ (objectStack[0]);\n        context['srsName'] = node.firstElementChild.getAttribute('srsName');\n        context['srsDimension'] = node.firstElementChild.getAttribute('srsDimension');\n        var geometry = pushParseAndPop(null, this.GEOMETRY_PARSERS, node, objectStack, this);\n        if (geometry) {\n            if (Array.isArray(geometry)) {\n                return transformExtentWithOptions(\n                /** @type {import(\"../extent.js\").Extent} */ (geometry), cont
 ext);\n            }\n            else {\n                return transformGeometryWithOptions(\n                /** @type {import(\"../geom/Geometry.js\").default} */ (geometry), false, context);\n            }\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {boolean} asFeature whether result should be wrapped as a feature.\n     * @return {Feature|Object} Feature\n     */\n    GMLBase.prototype.readFeatureElementInternal = function (node, objectStack, asFeature) {\n        var geometryName;\n        var values = {};\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var value = void 0;\n            var localName = n.localName;\n            // first, check if it is simple attribute\n            if (n.childNodes.length === 0 ||\n                (n.childNodes.length === 1 &&\n                    (n.firstChil
 d.nodeType === 3 || n.firstChild.nodeType === 4))) {\n                value = getAllTextContent(n, false);\n                if (ONLY_WHITESPACE_RE.test(value)) {\n                    value = undefined;\n                }\n            }\n            else {\n                if (asFeature) {\n                    //if feature, try it as a geometry\n                    value = this.readGeometryElement(n, objectStack);\n                }\n                if (!value) {\n                    //if not a geometry or not a feature, treat it as a complex attribute\n                    value = this.readFeatureElementInternal(n, objectStack, false);\n                }\n                else if (localName !== 'boundedBy') {\n                    // boundedBy is an extent and must not be considered as a geometry\n                    geometryName = localName;\n                }\n            }\n            if (values[localName]) {\n                if (!(values[localName] instanceof Array)) {\n          
           values[localName] = [values[localName]];\n                }\n                values[localName].push(value);\n            }\n            else {\n                values[localName] = value;\n            }\n            var len = n.attributes.length;\n            if (len > 0) {\n                values[localName] = { _content_: values[localName] };\n                for (var i = 0; i < len; i++) {\n                    var attName = n.attributes[i].name;\n                    values[localName][attName] = n.attributes[i].value;\n                }\n            }\n        }\n        if (!asFeature) {\n            return values;\n        }\n        else {\n            var feature = new Feature(values);\n            if (geometryName) {\n                feature.setGeometryName(geometryName);\n            }\n            var fid = node.getAttribute('fid') || getAttributeNS(node, this.namespace, 'id');\n            if (fid) {\n                feature.setId(fid);\n            }\n            
 return feature;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Feature} Feature.\n     */\n    GMLBase.prototype.readFeatureElement = function (node, objectStack) {\n        return this.readFeatureElementInternal(node, objectStack, true);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Point|undefined} Point.\n     */\n    GMLBase.prototype.readPoint = function (node, objectStack) {\n        var flatCoordinates = this.readFlatCoordinatesFromNode(node, objectStack);\n        if (flatCoordinates) {\n            return new Point(flatCoordinates, GeometryLayout.XYZ);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiPoint|undefined} MultiPoint.\n     */\n    GMLBase.prototype.readMultiPoint = function (node, objectStack) {\n        /** @type {
 Array<Array<number>>} */\n        var coordinates = pushParseAndPop([], this.MULTIPOINT_PARSERS, node, objectStack, this);\n        if (coordinates) {\n            return new MultiPoint(coordinates);\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiLineString|undefined} MultiLineString.\n     */\n    GMLBase.prototype.readMultiLineString = function (node, objectStack) {\n        /** @type {Array<LineString>} */\n        var lineStrings = pushParseAndPop([], this.MULTILINESTRING_PARSERS, node, objectStack, this);\n        if (lineStrings) {\n            return new MultiLineString(lineStrings);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiPolygon|undefined} MultiPolygon.\n     */\n    GMLBase.prototype.readMultiPolygon = function (node, objectStack)
  {\n        /** @type {Array<Polygon>} */\n        var polygons = pushParseAndPop([], this.MULTIPOLYGON_PARSERS, node, objectStack, this);\n        if (polygons) {\n            return new MultiPolygon(polygons);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GMLBase.prototype.pointMemberParser = function (node, objectStack) {\n        parseNode(this.POINTMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GMLBase.prototype.lineStringMemberParser = function (node, objectStack) {\n        parseNode(this.LINESTRINGMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GMLBase.prototype.polygonMemberParser = function (node, objectStack) {\n        parseNode(this.POLYGONMEMBER_PARSERS, node, obj
 ectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {LineString|undefined} LineString.\n     */\n    GMLBase.prototype.readLineString = function (node, objectStack) {\n        var flatCoordinates = this.readFlatCoordinatesFromNode(node, objectStack);\n        if (flatCoordinates) {\n            var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n            return lineString;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} LinearRing flat coordinates.\n     */\n    GMLBase.prototype.readFlatLinearRing = function (node, objectStack) {\n        var ring = pushParseAndPop(null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack, this);\n        if (ring) {\n            return ring;\n        }\n        else {\n 
            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {LinearRing|undefined} LinearRing.\n     */\n    GMLBase.prototype.readLinearRing = function (node, objectStack) {\n        var flatCoordinates = this.readFlatCoordinatesFromNode(node, objectStack);\n        if (flatCoordinates) {\n            return new LinearRing(flatCoordinates, GeometryLayout.XYZ);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Polygon|undefined} Polygon.\n     */\n    GMLBase.prototype.readPolygon = function (node, objectStack) {\n        /** @type {Array<Array<number>>} */\n        var flatLinearRings = pushParseAndPop([null], this.FLAT_LINEAR_RINGS_PARSERS, node, objectStack, this);\n        if (flatLinearRings && flatLinearRings[0]) {\n            var flatCoordinates = flatLinearRings[0];\n            var ends = [fl
 atCoordinates.length];\n            var i = void 0, ii = void 0;\n            for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {\n                extend(flatCoordinates, flatLinearRings[i]);\n                ends.push(flatCoordinates.length);\n            }\n            return new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>} Flat coordinates.\n     */\n    GMLBase.prototype.readFlatCoordinatesFromNode = function (node, objectStack) {\n        return pushParseAndPop(null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent}
  Geometry.\n     */\n    //@ts-ignore\n    GMLBase.prototype.readGeometryFromNode = function (node, opt_options) {\n        var geometry = this.readGeometryElement(node, [\n            this.getReadOptions(node, opt_options ? opt_options : {}),\n        ]);\n        return geometry ? geometry : null;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    GMLBase.prototype.readFeaturesFromNode = function (node, opt_options) {\n        var options = {\n            featureType: this.featureType,\n            featureNS: this.featureNS,\n        };\n        if (opt_options) {\n            assign(options, this.getReadOptions(node, opt_options));\n        }\n        var features = this.readFeaturesInternal(node, [options]);\n        return features || [];\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {import(\"../
 proj/Projection.js\").default} Projection.\n     */\n    GMLBase.prototype.readProjectionFromNode = function (node) {\n        return getProjection(this.srsName\n            ? this.srsName\n            : node.firstElementChild.getAttribute('srsName'));\n    };\n    return GMLBase;\n}(XMLFeature));\nGMLBase.prototype.namespace = GMLNS;\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml': {},\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml': {},\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.GEOMETRY_PARSERS = {\n    'http://www.opengis.net/gml': {},\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.
 prototype.MULTIPOINT_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'pointMember': makeArrayPusher(GMLBase.prototype.pointMemberParser),\n        'pointMembers': makeArrayPusher(GMLBase.prototype.pointMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.MULTILINESTRING_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'lineStringMember': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n        'lineStringMembers': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.MULTIPOLYGON_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'polygonMember': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n        'polygonMembers': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<strin
 g, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.POINTMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Point': makeArrayPusher(GMLBase.prototype.readFlatCoordinatesFromNode),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.LINESTRINGMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.POLYGONMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.RING_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LinearRing': makeReplacer(GMLBase.prototype.readFlatLinearRing),\n    
 },\n};\nexport default GMLBase;\n//# sourceMappingURL=GMLBase.js.map","/**\n * @module ol/format/xsd\n */\nimport { getAllTextContent, getDocument } from '../xml.js';\nimport { padNumber } from '../string.js';\n/**\n * @param {Node} node Node.\n * @return {boolean|undefined} Boolean.\n */\nexport function readBoolean(node) {\n    var s = getAllTextContent(node, false);\n    return readBooleanString(s);\n}\n/**\n * @param {string} string String.\n * @return {boolean|undefined} Boolean.\n */\nexport function readBooleanString(string) {\n    var m = /^\\s*(true|1)|(false|0)\\s*$/.exec(string);\n    if (m) {\n        return m[1] !== undefined || false;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {number|undefined} DateTime in seconds.\n */\nexport function readDateTime(node) {\n    var s = getAllTextContent(node, false);\n    var dateTime = Date.parse(s);\n    return isNaN(dateTime) ? undefined : dateTime / 1000;\n}\n/**\n * @par
 am {Node} node Node.\n * @return {number|undefined} Decimal.\n */\nexport function readDecimal(node) {\n    var s = getAllTextContent(node, false);\n    return readDecimalString(s);\n}\n/**\n * @param {string} string String.\n * @return {number|undefined} Decimal.\n */\nexport function readDecimalString(string) {\n    // FIXME check spec\n    var m = /^\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)\\s*$/i.exec(string);\n    if (m) {\n        return parseFloat(m[1]);\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {number|undefined} Non negative integer.\n */\nexport function readNonNegativeInteger(node) {\n    var s = getAllTextContent(node, false);\n    return readNonNegativeIntegerString(s);\n}\n/**\n * @param {string} string String.\n * @return {number|undefined} Non negative integer.\n */\nexport function readNonNegativeIntegerString(string) {\n    var m = /^\\s*(\\d+)\\s*$/.exec(string);\n    if (m) {\n        return parseInt(m[
 1], 10);\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {string|undefined} String.\n */\nexport function readString(node) {\n    return getAllTextContent(node, false).trim();\n}\n/**\n * @param {Node} node Node to append a TextNode with the boolean to.\n * @param {boolean} bool Boolean.\n */\nexport function writeBooleanTextNode(node, bool) {\n    writeStringTextNode(node, bool ? '1' : '0');\n}\n/**\n * @param {Node} node Node to append a CDATA Section with the string to.\n * @param {string} string String.\n */\nexport function writeCDATASection(node, string) {\n    node.appendChild(getDocument().createCDATASection(string));\n}\n/**\n * @param {Node} node Node to append a TextNode with the dateTime to.\n * @param {number} dateTime DateTime in seconds.\n */\nexport function writeDateTimeTextNode(node, dateTime) {\n    var date = new Date(dateTime * 1000);\n    var string = date.getUTCFullYear() +\n        '-' +\n        padNumber
 (date.getUTCMonth() + 1, 2) +\n        '-' +\n        padNumber(date.getUTCDate(), 2) +\n        'T' +\n        padNumber(date.getUTCHours(), 2) +\n        ':' +\n        padNumber(date.getUTCMinutes(), 2) +\n        ':' +\n        padNumber(date.getUTCSeconds(), 2) +\n        'Z';\n    node.appendChild(getDocument().createTextNode(string));\n}\n/**\n * @param {Node} node Node to append a TextNode with the decimal to.\n * @param {number} decimal Decimal.\n */\nexport function writeDecimalTextNode(node, decimal) {\n    var string = decimal.toPrecision();\n    node.appendChild(getDocument().createTextNode(string));\n}\n/**\n * @param {Node} node Node to append a TextNode with the decimal to.\n * @param {number} nonNegativeInteger Non negative integer.\n */\nexport function writeNonNegativeIntegerTextNode(node, nonNegativeInteger) {\n    var string = nonNegativeInteger.toString();\n    node.appendChild(getDocument().createTextNode(string));\n}\n/**\n * @param {Node} node Node to append
  a TextNode with the string to.\n * @param {string} string String.\n */\nexport function writeStringTextNode(node, string) {\n    node.appendChild(getDocument().createTextNode(string));\n}\n//# sourceMappingURL=xsd.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GML3\n */\nimport GMLBase, { GMLNS } from './GMLBase.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/
 LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Polygon from '../geom/Polygon.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, XML_SCHEMA_INSTANCE_URI, createElementNS, getAllTextContent, makeArrayPusher, makeChildAppender, makeReplacer, makeSimpleNodeFactory, parseNode, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { assign } from '../obj.js';\nimport { createOrUpdate } from '../extent.js';\nimport { extend } from '../array.js';\nimport { get as getProjection } from '../proj.js';\nimport { readNonNegativeIntegerString, writeStringTextNode } from './xsd.js';\nimport { transformExtentWithOptions, transformGeometryWithOptions, } from './Feature.js';\n/**\n * @const\n * @type {string}\n * @private\n */\nvar schemaLocation = GMLNS +\n    ' http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/' +\n    '1.0.0/gmlsf.xsd';\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar
  MULTIGEOMETRY_TO_MEMBER_NODENAME = {\n    'MultiLineString': 'lineStringMember',\n    'MultiCurve': 'curveMember',\n    'MultiPolygon': 'polygonMember',\n    'MultiSurface': 'surfaceMember',\n};\n/**\n * @classdesc\n * Feature format for reading and writing data in the GML format\n * version 3.1.1.\n * Currently only supports GML 3.1.1 Simple Features profile.\n *\n * @api\n */\nvar GML3 = /** @class */ (function (_super) {\n    __extends(GML3, _super);\n    /**\n     * @param {import(\"./GMLBase.js\").Options=} opt_options Optional configuration object.\n     */\n    function GML3(opt_options) {\n        var _this = this;\n        var options = \n        /** @type {import(\"./GMLBase.js\").Options} */\n        (opt_options ? opt_options : {});\n        _this = _super.call(this, options) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.surface_ = options.surface !== undefined ? options.surface : false;\n        /**\n         * @priv
 ate\n         * @type {boolean}\n         */\n        _this.curve_ = options.curve !== undefined ? options.curve : false;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.multiCurve_ =\n            options.multiCurve !== undefined ? options.multiCurve : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.multiSurface_ =\n            options.multiSurface !== undefined ? options.multiSurface : true;\n        /**\n         * @type {string}\n         */\n        _this.schemaLocation = options.schemaLocation\n            ? options.schemaLocation\n            : schemaLocation;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hasZ = options.hasZ !== undefined ? options.hasZ : false;\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiLineString|undefined} MultiLineString
 .\n     */\n    GML3.prototype.readMultiCurve = function (node, objectStack) {\n        /** @type {Array<LineString>} */\n        var lineStrings = pushParseAndPop([], this.MULTICURVE_PARSERS, node, objectStack, this);\n        if (lineStrings) {\n            var multiLineString = new MultiLineString(lineStrings);\n            return multiLineString;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiPolygon|undefined} MultiPolygon.\n     */\n    GML3.prototype.readMultiSurface = function (node, objectStack) {\n        /** @type {Array<Polygon>} */\n        var polygons = pushParseAndPop([], this.MULTISURFACE_PARSERS, node, objectStack, this);\n        if (polygons) {\n            return new MultiPolygon(polygons);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n 
    GML3.prototype.curveMemberParser = function (node, objectStack) {\n        parseNode(this.CURVEMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML3.prototype.surfaceMemberParser = function (node, objectStack) {\n        parseNode(this.SURFACEMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<(Array<number>)>|undefined} flat coordinates.\n     */\n    GML3.prototype.readPatch = function (node, objectStack) {\n        return pushParseAndPop([null], this.PATCHES_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} flat coordinates.\n     */\n    GML3.prototype.readSegment = function (node, objectStack) {\n        return pushPars
 eAndPop([null], this.SEGMENTS_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<(Array<number>)>|undefined} flat coordinates.\n     */\n    GML3.prototype.readPolygonPatch = function (node, objectStack) {\n        return pushParseAndPop([null], this.FLAT_LINEAR_RINGS_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} flat coordinates.\n     */\n    GML3.prototype.readLineStringSegment = function (node, objectStack) {\n        return pushParseAndPop([null], this.GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML3.prototype.interiorParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined}
  */\n        var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n        if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings.push(flatLinearRing);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML3.prototype.exteriorParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined} */\n        var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n        if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings[0] = flatLinearRing;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object st
 ack.\n     * @return {Polygon|undefined} Polygon.\n     */\n    GML3.prototype.readSurface = function (node, objectStack) {\n        /** @type {Array<Array<number>>} */\n        var flatLinearRings = pushParseAndPop([null], this.SURFACE_PARSERS, node, objectStack, this);\n        if (flatLinearRings && flatLinearRings[0]) {\n            var flatCoordinates = flatLinearRings[0];\n            var ends = [flatCoordinates.length];\n            var i = void 0, ii = void 0;\n            for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {\n                extend(flatCoordinates, flatLinearRings[i]);\n                ends.push(flatCoordinates.length);\n            }\n            return new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {LineString|undefined} LineString.\n     */\n    GML3.protot
 ype.readCurve = function (node, objectStack) {\n        /** @type {Array<number>} */\n        var flatCoordinates = pushParseAndPop([null], this.CURVE_PARSERS, node, objectStack, this);\n        if (flatCoordinates) {\n            var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n            return lineString;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {import(\"../extent.js\").Extent|undefined} Envelope.\n     */\n    GML3.prototype.readEnvelope = function (node, objectStack) {\n        /** @type {Array<number>} */\n        var flatCoordinates = pushParseAndPop([null], this.ENVELOPE_PARSERS, node, objectStack, this);\n        return createOrUpdate(flatCoordinates[1][0], flatCoordinates[1][1], flatCoordinates[2][0], flatCoordinates[2][1]);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} obj
 ectStack Object stack.\n     * @return {Array<number>|undefined} Flat coordinates.\n     */\n    GML3.prototype.readFlatPos = function (node, objectStack) {\n        var s = getAllTextContent(node, false);\n        var re = /^\\s*([+\\-]?\\d*\\.?\\d+(?:[eE][+\\-]?\\d+)?)\\s*/;\n        /** @type {Array<number>} */\n        var flatCoordinates = [];\n        var m;\n        while ((m = re.exec(s))) {\n            flatCoordinates.push(parseFloat(m[1]));\n            s = s.substr(m[0].length);\n        }\n        if (s !== '') {\n            return undefined;\n        }\n        var context = objectStack[0];\n        var containerSrs = context['srsName'];\n        var axisOrientation = 'enu';\n        if (containerSrs) {\n            var proj = getProjection(containerSrs);\n            axisOrientation = proj.getAxisOrientation();\n        }\n        if (axisOrientation === 'neu') {\n            var i = void 0, ii = void 0;\n            for (i = 0, ii = flatCoordinates.length; i < ii; i
  += 3) {\n                var y = flatCoordinates[i];\n                var x = flatCoordinates[i + 1];\n                flatCoordinates[i] = x;\n                flatCoordinates[i + 1] = y;\n            }\n        }\n        var len = flatCoordinates.length;\n        if (len == 2) {\n            flatCoordinates.push(0);\n        }\n        if (len === 0) {\n            return undefined;\n        }\n        return flatCoordinates;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} Flat coordinates.\n     */\n    GML3.prototype.readFlatPosList = function (node, objectStack) {\n        var s = getAllTextContent(node, false).replace(/^\\s*|\\s*$/g, '');\n        var context = objectStack[0];\n        var containerSrs = context['srsName'];\n        var contextDimension = context['srsDimension'];\n        var axisOrientation = 'enu';\n        if (containerSrs) {\n            var proj = getProjec
 tion(containerSrs);\n            axisOrientation = proj.getAxisOrientation();\n        }\n        var coords = s.split(/\\s+/);\n        // The \"dimension\" attribute is from the GML 3.0.1 spec.\n        var dim = 2;\n        if (node.getAttribute('srsDimension')) {\n            dim = readNonNegativeIntegerString(node.getAttribute('srsDimension'));\n        }\n        else if (node.getAttribute('dimension')) {\n            dim = readNonNegativeIntegerString(node.getAttribute('dimension'));\n        }\n        else if (\n        /** @type {Element} */ (node.parentNode).getAttribute('srsDimension')) {\n            dim = readNonNegativeIntegerString(\n            /** @type {Element} */ (node.parentNode).getAttribute('srsDimension'));\n        }\n        else if (contextDimension) {\n            dim = readNonNegativeIntegerString(contextDimension);\n        }\n        var x, y, z;\n        var flatCoordinates = [];\n        for (var i = 0, ii = coords.length; i < ii; i += dim) {\n     
        x = parseFloat(coords[i]);\n            y = parseFloat(coords[i + 1]);\n            z = dim === 3 ? parseFloat(coords[i + 2]) : 0;\n            if (axisOrientation.substr(0, 2) === 'en') {\n                flatCoordinates.push(x, y, z);\n            }\n            else {\n                flatCoordinates.push(y, x, z);\n            }\n        }\n        return flatCoordinates;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/Point.js\").default} value Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writePos_ = function (node, value, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsDimension = hasZ ? '3' : '2';\n        node.setAttribute('srsDimension', srsDimension);\n        var srsName = context['srsName'];\n        var axisOrientation = 'enu';\n        if (srsName) {\n            axisOrientation =
  getProjection(srsName).getAxisOrientation();\n        }\n        var point = value.getCoordinates();\n        var coords;\n        // only 2d for simple features profile\n        if (axisOrientation.substr(0, 2) === 'en') {\n            coords = point[0] + ' ' + point[1];\n        }\n        else {\n            coords = point[1] + ' ' + point[0];\n        }\n        if (hasZ) {\n            // For newly created points, Z can be undefined.\n            var z = point[2] || 0;\n            coords += ' ' + z;\n        }\n        writeStringTextNode(node, coords);\n    };\n    /**\n     * @param {Array<number>} point Point geometry.\n     * @param {string=} opt_srsName Optional srsName\n     * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not.\n     * @return {string} The coords string.\n     * @private\n     */\n    GML3.prototype.getCoords_ = function (point, opt_srsName, opt_hasZ) {\n        var axisOrientation = 'enu';\n        if (opt_srsName) {\n   
          axisOrientation = getProjection(opt_srsName).getAxisOrientation();\n        }\n        var coords = axisOrientation.substr(0, 2) === 'en'\n            ? point[0] + ' ' + point[1]\n            : point[1] + ' ' + point[0];\n        if (opt_hasZ) {\n            // For newly created points, Z can be undefined.\n            var z = point[2] || 0;\n            coords += ' ' + z;\n        }\n        return coords;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {LineString|import(\"../geom/LinearRing.js\").default} value Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writePosList_ = function (node, value, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsDimension = hasZ ? '3' : '2';\n        node.setAttribute('srsDimension', srsDimension);\n        var srsName = context['srsName'];\n        // only 2d for simple features prof
 ile\n        var points = value.getCoordinates();\n        var len = points.length;\n        var parts = new Array(len);\n        var point;\n        for (var i = 0; i < len; ++i) {\n            point = points[i];\n            parts[i] = this.getCoords_(point, srsName, hasZ);\n        }\n        writeStringTextNode(node, parts.join(' '));\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/Point.js\").default} geometry Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writePoint = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var pos = createElementNS(node.namespaceURI, 'pos');\n        node.appendChild(pos);\n        this.writePos_(pos, geometry, objectStack);\n    };\n    /**\n     * @param {Element} node Node.\n
      * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeEnvelope = function (node, extent, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var keys = ['lowerCorner', 'upperCorner'];\n        var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        ({ node: node }), this.ENVELOPE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, keys, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default} geometry LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeLinearRing = function (node, geometry, obj
 ectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var posList = createElementNS(node.namespaceURI, 'posList');\n        node.appendChild(posList);\n        this.writePosList_(posList, geometry, objectStack);\n    };\n    /**\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Node} Node.\n     * @private\n     */\n    GML3.prototype.RING_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = objectStack[objectStack.length - 1];\n        var parentNode = context.node;\n        var exteriorWritten = context['exteriorWritten'];\n        if (exteriorWritten === undefined) {\n            context['exteriorWritten'] = true;\n        }\n        return createElementNS(parentNode.namespaceURI, exteriorWritten
  !== undefined ? 'interior' : 'exterior');\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Polygon} geometry Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'PolygonPatch' && srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === 'Polygon' || node.nodeName === 'PolygonPatch') {\n            var rings = geometry.getLinearRings();\n            pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.RING_SERIALIZERS, this.RING_NODE_FACTORY_, rings, objectStack, undefined, this);\n        }\n        else if (node.nodeName === 'Surface') {\n            var patches = createElementNS(node.namespaceURI, 'patches');\n          
   node.appendChild(patches);\n            this.writeSurfacePatches_(patches, geometry, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {LineString} geometry LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'LineStringSegment' && srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === 'LineString' ||\n            node.nodeName === 'LineStringSegment') {\n            var posList = createElementNS(node.namespaceURI, 'posList');\n            node.appendChild(posList);\n            this.writePosList_(posList, geometry, objectStack);\n        }\n        else if (node.nodeName === 'Curve') {\n            var segments = createElementNS(node.namespaceUR
 I, 'segments');\n            node.appendChild(segments);\n            this.writeCurveSegments_(segments, geometry, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {MultiPolygon} geometry MultiPolygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeMultiSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var surface = context['surface'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var polygons = geometry.getPolygons();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, surface: surface }, this.SURFACEORPOLYGONMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons, objectStack, undefined, this);\n    };\n    /**\n     * @param {Element} node Node.\n     
 * @param {import(\"../geom/MultiPoint.js\").default} geometry MultiPoint geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeMultiPoint = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        var hasZ = context['hasZ'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var points = geometry.getPoints();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.POINTMEMBER_SERIALIZERS, makeSimpleNodeFactory('pointMember'), points, objectStack, undefined, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {MultiLineString} geometry MultiLineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeMultiCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.lengt
 h - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var curve = context['curve'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var lines = geometry.getLineStrings();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, curve: curve }, this.LINESTRINGORCURVEMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default} ring LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeRing = function (node, ring, objectStack) {\n        var linearRing = createElementNS(node.namespaceURI, 'LinearRing');\n        node.appendChild(linearRing);\n        this.writeLinearRing(linearRing, ring, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Polygon} polygon Po
 lygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeSurfaceOrPolygonMember = function (node, polygon, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(polygon, objectStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeSurfaceOrPolygon(child, polygon, objectStack);\n        }\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Point.js\").default} point Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writePointMember = function (node, point, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'Point');\n        node.appendChild(child);\n        this.writePoint(child, point, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {LineString} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeLineStringOrCurv
 eMember = function (node, line, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeCurveOrLineString(child, line, objectStack);\n        }\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Polygon} polygon Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writeSurfacePatches_ = function (node, polygon, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'PolygonPatch');\n        node.appendChild(child);\n        this.writeSurfaceOrPolygon(child, polygon, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {LineString} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writeCurveSegments_ = function (node, line, objectStack) {\n        var child = createElementNS(node.namespac
 eURI, 'LineStringSegment');\n        node.appendChild(child);\n        this.writeCurveOrLineString(child, line, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} geometry Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeGeometryElement = function (node, geometry, objectStack) {\n        var context = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[objectStack.length - 1]);\n        var item = assign({}, context);\n        item['node'] = node;\n        var value;\n        if (Array.isArray(geometry)) {\n            value = transformExtentWithOptions(\n            /** @type {import(\"../extent.js\").Extent} */ (geometry), context);\n        }\n        else {\n            value = transformGeometryWithOptions(\n            /** @type {import(\"../geom/Geometry.js\").default} */ (geometry), true, context);\n        }\n       
  pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), this.GEOMETRY_SERIALIZERS, this.GEOMETRY_NODE_FACTORY_, [value], objectStack, undefined, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeFeatureElement = function (node, feature, objectStack) {\n        var fid = feature.getId();\n        if (fid) {\n            node.setAttribute('fid', /** @type {string} */ (fid));\n        }\n        var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        var featureNS = context['featureNS'];\n        var geometryName = feature.getGeometryName();\n        if (!context.serializers) {\n            context.serializers = {};\n            context.serializers[featureNS] = {};\n        }\n        var keys = [];\n        var values = [];\n        if (feature.hasProperti
 es()) {\n            var properties = feature.getProperties();\n            for (var key in properties) {\n                var value = properties[key];\n                if (value !== null) {\n                    keys.push(key);\n                    values.push(value);\n                    if (key == geometryName ||\n                        typeof ( /** @type {?} */(value).getSimplifiedGeometry) ===\n                            'function') {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] = makeChildAppender(this.writeGeometryElement, this);\n                        }\n                    }\n                    else {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] = makeChildAppender(writeStringTextNode);\n                        }\n                    }\n                }\n            }\n        }\n      
   var item = assign({}, context);\n        item.node = node;\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), context.serializers, makeSimpleNodeFactory(undefined, featureNS), values, objectStack, keys);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writeFeatureMembers_ = function (node, features, objectStack) {\n        var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        var featureType = context['featureType'];\n        var featureNS = context['featureNS'];\n        /** @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>} */\n        var serializers = {};\n        serializers[featureNS] = {};\n        serializers[featureNS][featureType] = makeChildAppender(this.writeFeatureElement, this);\n        v
 ar item = assign({}, context);\n        item.node = node;\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), serializers, makeSimpleNodeFactory(featureType, featureNS), features, objectStack);\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Node|undefined} Node.\n     * @private\n     */\n    GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var parentNode = objectStack[objectStack.length - 1].node;\n        return createElementNS(this.namespace, MULTIGEOMETRY_TO_MEMBER_NODENAME[parentNode.nodeName]);\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Element|undefined} Node.\n     * @private\n     */\n    GML3.
 prototype.GEOMETRY_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = objectStack[objectStack.length - 1];\n        var multiSurface = context['multiSurface'];\n        var surface = context['surface'];\n        var curve = context['curve'];\n        var multiCurve = context['multiCurve'];\n        var nodeName;\n        if (!Array.isArray(value)) {\n            nodeName = /** @type {import(\"../geom/Geometry.js\").default} */ (value).getType();\n            if (nodeName === 'MultiPolygon' && multiSurface === true) {\n                nodeName = 'MultiSurface';\n            }\n            else if (nodeName === 'Polygon' && surface === true) {\n                nodeName = 'Surface';\n            }\n            else if (nodeName === 'LineString' && curve === true) {\n                nodeName = 'Curve';\n            }\n            else if (nodeName === 'MultiLineString' && multiCurve === true) {\n                nodeName = 'MultiCurve';\n            }\n 
        }\n        else {\n            nodeName = 'Envelope';\n        }\n        return createElementNS(this.namespace, nodeName);\n    };\n    /**\n     * Encode a geometry in GML 3.1.1 Simple Features.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Node} Node.\n     * @api\n     */\n    GML3.prototype.writeGeometryNode = function (geometry, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var geom = createElementNS(this.namespace, 'geom');\n        var context = {\n            node: geom,\n            hasZ: this.hasZ,\n            srsName: this.srsName,\n            curve: this.curve_,\n            surface: this.surface_,\n            multiSurface: this.multiSurface_,\n            multiCurve: this.multiCurve_,\n        };\n        if (opt_options) {\n            assign(context, opt_options);\n        }\n        this.writeG
 eometryElement(geom, geometry, [context]);\n        return geom;\n    };\n    /**\n     * Encode an array of features in the GML 3.1.1 format as an XML node.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Element} Node.\n     * @api\n     */\n    GML3.prototype.writeFeaturesNode = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var node = createElementNS(this.namespace, 'featureMembers');\n        node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', this.schemaLocation);\n        var context = {\n            srsName: this.srsName,\n            hasZ: this.hasZ,\n            curve: this.curve_,\n            surface: this.surface_,\n            multiSurface: this.multiSurface_,\n            multiCurve: this.multiCurve_,\n            featureNS: this.featureNS,\n            featureType: this.fe
 atureType,\n        };\n        if (opt_options) {\n            assign(context, opt_options);\n        }\n        this.writeFeatureMembers_(node, features, [context]);\n        return node;\n    };\n    return GML3;\n}(GMLBase));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'pos': makeReplacer(GML3.prototype.readFlatPos),\n        'posList': makeReplacer(GML3.prototype.readFlatPosList),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'interior': GML3.prototype.interiorParser,\n        'exterior': GML3.prototype.exteriorParser,\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.GEOMETRY_PARSERS = {\n    'http://www.openg
 is.net/gml': {\n        'Point': makeReplacer(GMLBase.prototype.readPoint),\n        'MultiPoint': makeReplacer(GMLBase.prototype.readMultiPoint),\n        'LineString': makeReplacer(GMLBase.prototype.readLineString),\n        'MultiLineString': makeReplacer(GMLBase.prototype.readMultiLineString),\n        'LinearRing': makeReplacer(GMLBase.prototype.readLinearRing),\n        'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n        'MultiPolygon': makeReplacer(GMLBase.prototype.readMultiPolygon),\n        'Surface': makeReplacer(GML3.prototype.readSurface),\n        'MultiSurface': makeReplacer(GML3.prototype.readMultiSurface),\n        'Curve': makeReplacer(GML3.prototype.readCurve),\n        'MultiCurve': makeReplacer(GML3.prototype.readMultiCurve),\n        'Envelope': makeReplacer(GML3.prototype.readEnvelope),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.MULTICURVE_PARSERS = {\n    'http://www.o
 pengis.net/gml': {\n        'curveMember': makeArrayPusher(GML3.prototype.curveMemberParser),\n        'curveMembers': makeArrayPusher(GML3.prototype.curveMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.MULTISURFACE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'surfaceMember': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n        'surfaceMembers': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.CURVEMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n        'Curve': makeArrayPusher(GML3.prototype.readCurve),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.SURFACEMEMBER_PARSERS = {\n    'http://www.o
 pengis.net/gml': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n        'Surface': makeArrayPusher(GML3.prototype.readSurface),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.SURFACE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'patches': makeReplacer(GML3.prototype.readPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.CURVE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'segments': makeReplacer(GML3.prototype.readSegment),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.ENVELOPE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'lowerCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n        'upperCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n    },\n};\n/**\n * @const\n * @type {O
 bject<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.PATCHES_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'PolygonPatch': makeReplacer(GML3.prototype.readPolygonPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.SEGMENTS_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LineStringSegment': makeReplacer(GML3.prototype.readLineStringSegment),\n    },\n};\n/**\n * Encode an array of features in GML 3.1.1 Simple Features.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @return {string} Result.\n * @api\n */\nGML3.prototype.writeFeatures;\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.RING_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'exterior': makeChildAppender(GML3.pr
 ototype.writeRing),\n        'interior': makeChildAppender(GML3.prototype.writeRing),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.ENVELOPE_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lowerCorner': makeChildAppender(writeStringTextNode),\n        'upperCorner': makeChildAppender(writeStringTextNode),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'surfaceMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n        'polygonMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.POINTMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'pointMember': makeChildAppender(GML3.prototype.
 writePointMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lineStringMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n        'curveMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.GEOMETRY_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'Curve': makeChildAppender(GML3.prototype.writeCurveOrLineString),\n        'MultiCurve': makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),\n        'Point': makeChildAppender(GML3.prototype.writePoint),\n        'MultiPoint': makeChildAppender(GML3.prototype.writeMultiPoint),\n        'LineString': makeChildAppender(GML3.prototype.writeCurveOrLineString),\n        'MultiLineString': makeChildAppender(G
 ML3.prototype.writeMultiCurveOrLineString),\n        'LinearRing': makeChildAppender(GML3.prototype.writeLinearRing),\n        'Polygon': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiPolygon': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Surface': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiSurface': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Envelope': makeChildAppender(GML3.prototype.writeEnvelope),\n    },\n};\nexport default GML3;\n//# sourceMappingURL=GML3.js.map","/**\n * @module ol/format/GML\n */\nimport GML3 from './GML3.js';\n/**\n * @classdesc\n * Feature format for reading and writing data in the GML format\n * version 3.1.1.\n * Currently only supports GML 3.1.1 Simple Features profile.\n *\n * @param {import(\"./GMLBase.js\").Options=} opt_options\n *     Optional configuration object.\n * @api\n */\nvar GML = GML3;\n/**\n * Encode an array of features in GML 
 3.1.1 Simple Features.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @return {string} Result.\n * @api\n */\nGML.prototype.writeFeatures;\n/**\n * Encode an array of features in the GML 3.1.1 format as an XML node.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @return {Node} Node.\n * @api\n */\nGML.prototype.writeFeaturesNode;\nexport default GML;\n//# sourceMappingURL=GML.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, 
 b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GML2\n */\nimport GMLBase, { GMLNS } from './GMLBase.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, createElementNS, getAllTextContent, makeArrayPusher, makeChildAppender, makeReplacer, makeSimpleNodeFactory, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { assign } from '../obj.js';\nimport { createOrUpdate } from '../extent.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformExtentWithOptions, transformGeometryWithOptions, } from './Feature.js';\nimport { writeStringTextNode } from './xsd.js';\n/**\n * @const\n * @type {string}\n */\nvar schemaLocation = GMLNS + ' http://schemas.opengis.net/gml/2.1.2/feature.xsd';\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar MULTIGEOMETRY
 _TO_MEMBER_NODENAME = {\n    'MultiLineString': 'lineStringMember',\n    'MultiCurve': 'curveMember',\n    'MultiPolygon': 'polygonMember',\n    'MultiSurface': 'surfaceMember',\n};\n/**\n * @classdesc\n * Feature format for reading and writing data in the GML format,\n * version 2.1.2.\n *\n * @api\n */\nvar GML2 = /** @class */ (function (_super) {\n    __extends(GML2, _super);\n    /**\n     * @param {import(\"./GMLBase.js\").Options=} opt_options Optional configuration object.\n     */\n    function GML2(opt_options) {\n        var _this = this;\n        var options = \n        /** @type {import(\"./GMLBase.js\").Options} */\n        (opt_options ? opt_options : {});\n        _this = _super.call(this, options) || this;\n        _this.FEATURE_COLLECTION_PARSERS[GMLNS]['featureMember'] = makeArrayPusher(_this.readFeaturesInternal);\n        /**\n         * @type {string}\n         */\n        _this.schemaLocation = options.schemaLocation\n            ? options.schemaLocation\n    
         : schemaLocation;\n        return _this;\n    }\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} Flat coordinates.\n     */\n    GML2.prototype.readFlatCoordinates = function (node, objectStack) {\n        var s = getAllTextContent(node, false).replace(/^\\s*|\\s*$/g, '');\n        var context = /** @type {import(\"../xml.js\").NodeStackItem} */ (objectStack[0]);\n        var containerSrs = context['srsName'];\n        var axisOrientation = 'enu';\n        if (containerSrs) {\n            var proj = getProjection(containerSrs);\n            if (proj) {\n                axisOrientation = proj.getAxisOrientation();\n            }\n        }\n        var coordsGroups = s.trim().split(/\\s+/);\n        var flatCoordinates = [];\n        for (var i = 0, ii = coordsGroups.length; i < ii; i++) {\n            var coords = coordsGroups[i].split(/,+/);\n            var x = parseFloat(coords[0]);\n  
           var y = parseFloat(coords[1]);\n            var z = coords.length === 3 ? parseFloat(coords[2]) : 0;\n            if (axisOrientation.substr(0, 2) === 'en') {\n                flatCoordinates.push(x, y, z);\n            }\n            else {\n                flatCoordinates.push(y, x, z);\n            }\n        }\n        return flatCoordinates;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {import(\"../extent.js\").Extent|undefined} Envelope.\n     */\n    GML2.prototype.readBox = function (node, objectStack) {\n        /** @type {Array<number>} */\n        var flatCoordinates = pushParseAndPop([null], this.BOX_PARSERS_, node, objectStack, this);\n        return createOrUpdate(flatCoordinates[1][0], flatCoordinates[1][1], flatCoordinates[1][3], flatCoordinates[1][4]);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML2.prototy
 pe.innerBoundaryIsParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined} */\n        var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n        if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings.push(flatLinearRing);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML2.prototype.outerBoundaryIsParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined} */\n        var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n        if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings[0] = flatLinearRing;\n 
        }\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Element|undefined} Node.\n     * @private\n     */\n    GML2.prototype.GEOMETRY_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = objectStack[objectStack.length - 1];\n        var multiSurface = context['multiSurface'];\n        var surface = context['surface'];\n        var multiCurve = context['multiCurve'];\n        var nodeName;\n        if (!Array.isArray(value)) {\n            nodeName = /** @type {import(\"../geom/Geometry.js\").default} */ (value).getType();\n            if (nodeName === 'MultiPolygon' && multiSurface === true) {\n                nodeName = 'MultiSurface';\n            }\n            else if (nodeName === 'Polygon' && surface === true) {\n                nodeName = 'Surface';\n            }\n            else if (nodeName === 'MultiLineS
 tring' && multiCurve === true) {\n                nodeName = 'MultiCurve';\n            }\n        }\n        else {\n            nodeName = 'Envelope';\n        }\n        return createElementNS('http://www.opengis.net/gml', nodeName);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeFeatureElement = function (node, feature, objectStack) {\n        var fid = feature.getId();\n        if (fid) {\n            node.setAttribute('fid', /** @type {string} */ (fid));\n        }\n        var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        var featureNS = context['featureNS'];\n        var geometryName = feature.getGeometryName();\n        if (!context.serializers) {\n            context.serializers = {};\n            context.serializers[featureNS] = {};\n        }\n        var keys = [];\n        var val
 ues = [];\n        if (feature.hasProperties()) {\n            var properties = feature.getProperties();\n            for (var key in properties) {\n                var value = properties[key];\n                if (value !== null) {\n                    keys.push(key);\n                    values.push(value);\n                    if (key == geometryName ||\n                        typeof ( /** @type {?} */(value).getSimplifiedGeometry) ===\n                            'function') {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] = makeChildAppender(this.writeGeometryElement, this);\n                        }\n                    }\n                    else {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] = makeChildAppender(writeStringTextNode);\n                        }\n                    }\n         
        }\n            }\n        }\n        var item = assign({}, context);\n        item.node = node;\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), context.serializers, makeSimpleNodeFactory(undefined, featureNS), values, objectStack, keys);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LineString.js\").default} geometry LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'LineStringSegment' && srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === 'LineString' ||\n            node.nodeName === 'LineStringSegment') {\n            var coordinates = this.createCoordinatesNode_(node.namespaceU
 RI);\n            node.appendChild(coordinates);\n            this.writeCoordinates_(coordinates, geometry, objectStack);\n        }\n        else if (node.nodeName === 'Curve') {\n            var segments = createElementNS(node.namespaceURI, 'segments');\n            node.appendChild(segments);\n            this.writeCurveSegments_(segments, geometry, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LineString.js\").default} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeLineStringOrCurveMember = function (node, line, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeCurveOrLineString(child, line, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/MultiLineString.js\").default} geometr
 y MultiLineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeMultiCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var curve = context['curve'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var lines = geometry.getLineStrings();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, curve: curve }, this.LINESTRINGORCURVEMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} geometry Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeGeometryElement = function (node, geometry, objectSta
 ck) {\n        var context = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[objectStack.length - 1]);\n        var item = assign({}, context);\n        item['node'] = node;\n        var value;\n        if (Array.isArray(geometry)) {\n            value = transformExtentWithOptions(\n            /** @type {import(\"../extent.js\").Extent} */ (geometry), context);\n        }\n        else {\n            value = transformGeometryWithOptions(\n            /** @type {import(\"../geom/Geometry.js\").default} */ (geometry), true, context);\n        }\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), this.GEOMETRY_SERIALIZERS, this.GEOMETRY_NODE_FACTORY_, [value], objectStack, undefined, this);\n    };\n    /**\n     * @param {string} namespaceURI XML namespace.\n     * @returns {Element} coordinates node.\n     * @private\n     */\n    GML2.prototype.createCoordinatesNode_ = function (namespaceURI) {\n        var co
 ordinates = createElementNS(namespaceURI, 'coordinates');\n        coordinates.setAttribute('decimal', '.');\n        coordinates.setAttribute('cs', ',');\n        coordinates.setAttribute('ts', ' ');\n        return coordinates;\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/LineString.js\").default|import(\"../geom/LinearRing.js\").default} value Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML2.prototype.writeCoordinates_ = function (node, value, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        // only 2d for simple features profile\n        var points = value.getCoordinates();\n        var len = points.length;\n        var parts = new Array(len);\n        for (var i = 0; i < len; ++i) {\n            var point = points[i];\n            parts[i] = this.getCoords_(point, srsName, hasZ);\n
         }\n        writeStringTextNode(node, parts.join(' '));\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/LineString.js\").default} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML2.prototype.writeCurveSegments_ = function (node, line, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'LineStringSegment');\n        node.appendChild(child);\n        this.writeCurveOrLineString(child, line, objectStack);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/Polygon.js\").default} geometry Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'PolygonPatch' &&
  srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === 'Polygon' || node.nodeName === 'PolygonPatch') {\n            var rings = geometry.getLinearRings();\n            pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.RING_SERIALIZERS, this.RING_NODE_FACTORY_, rings, objectStack, undefined, this);\n        }\n        else if (node.nodeName === 'Surface') {\n            var patches = createElementNS(node.namespaceURI, 'patches');\n            node.appendChild(patches);\n            this.writeSurfacePatches_(patches, geometry, objectStack);\n        }\n    };\n    /**\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Node} Node.\n     * @private\n     */\n    GML2.prototype.RING_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = objectStack[objectStack.length - 1];\n        var par
 entNode = context.node;\n        var exteriorWritten = context['exteriorWritten'];\n        if (exteriorWritten === undefined) {\n            context['exteriorWritten'] = true;\n        }\n        return createElementNS(parentNode.namespaceURI, exteriorWritten !== undefined ? 'innerBoundaryIs' : 'outerBoundaryIs');\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Polygon.js\").default} polygon Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML2.prototype.writeSurfacePatches_ = function (node, polygon, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'PolygonPatch');\n        node.appendChild(child);\n        this.writeSurfaceOrPolygon(child, polygon, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default} ring LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.wr
 iteRing = function (node, ring, objectStack) {\n        var linearRing = createElementNS(node.namespaceURI, 'LinearRing');\n        node.appendChild(linearRing);\n        this.writeLinearRing(linearRing, ring, objectStack);\n    };\n    /**\n     * @param {Array<number>} point Point geometry.\n     * @param {string=} opt_srsName Optional srsName\n     * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not.\n     * @return {string} The coords string.\n     * @private\n     */\n    GML2.prototype.getCoords_ = function (point, opt_srsName, opt_hasZ) {\n        var axisOrientation = 'enu';\n        if (opt_srsName) {\n            axisOrientation = getProjection(opt_srsName).getAxisOrientation();\n        }\n        var coords = axisOrientation.substr(0, 2) === 'en'\n            ? point[0] + ',' + point[1]\n            : point[1] + ',' + point[0];\n        if (opt_hasZ) {\n            // For newly created points, Z can be undefined.\n            var z = point
 [2] || 0;\n            coords += ',' + z;\n        }\n        return coords;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/Point.js\").default} geometry Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writePoint = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var coordinates = this.createCoordinatesNode_(node.namespaceURI);\n        node.appendChild(coordinates);\n        var point = geometry.getCoordinates();\n        var coord = this.getCoords_(point, srsName, hasZ);\n        writeStringTextNode(coordinates, coord);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/MultiPoint.js\").default} geometry MultiPoint geometry.\n     * @para
 m {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeMultiPoint = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var points = geometry.getPoints();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.POINTMEMBER_SERIALIZERS, makeSimpleNodeFactory('pointMember'), points, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Point.js\").default} point Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writePointMember = function (node, point, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'Point');\n        node.appendChild(child);\n        this.writePoint(child, point, objectStack);\n   
  };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default} geometry LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeLinearRing = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var coordinates = this.createCoordinatesNode_(node.namespaceURI);\n        node.appendChild(coordinates);\n        this.writeCoordinates_(coordinates, geometry, objectStack);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeMultiSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.lengt
 h - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var surface = context['surface'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var polygons = geometry.getPolygons();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, surface: surface }, this.SURFACEORPOLYGONMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Polygon.js\").default} polygon Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeSurfaceOrPolygonMember = function (node, polygon, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(polygon, objectStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeSurfaceOrPolygon(child, polygon, objectStack);\n        }\n    };\n    /**\n   
   * @param {Element} node Node.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeEnvelope = function (node, extent, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var keys = ['lowerCorner', 'upperCorner'];\n        var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        ({ node: node }), this.ENVELOPE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, keys, this);\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Node|undefined} Node.\n     * @private\n     */\n    
 GML2.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var parentNode = objectStack[objectStack.length - 1].node;\n        return createElementNS('http://www.opengis.net/gml', MULTIGEOMETRY_TO_MEMBER_NODENAME[parentNode.nodeName]);\n    };\n    return GML2;\n}(GMLBase));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'coordinates': makeReplacer(GML2.prototype.readFlatCoordinates),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML2.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'innerBoundaryIs': GML2.prototype.innerBoundaryIsParser,\n        'outerBoundaryIs': GML2.prototype.outerBoundaryIsParser,\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Pa
 rser>>}\n */\nGML2.prototype.BOX_PARSERS_ = {\n    'http://www.opengis.net/gml': {\n        'coordinates': makeArrayPusher(GML2.prototype.readFlatCoordinates),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML2.prototype.GEOMETRY_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Point': makeReplacer(GMLBase.prototype.readPoint),\n        'MultiPoint': makeReplacer(GMLBase.prototype.readMultiPoint),\n        'LineString': makeReplacer(GMLBase.prototype.readLineString),\n        'MultiLineString': makeReplacer(GMLBase.prototype.readMultiLineString),\n        'LinearRing': makeReplacer(GMLBase.prototype.readLinearRing),\n        'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n        'MultiPolygon': makeReplacer(GMLBase.prototype.readMultiPolygon),\n        'Box': makeReplacer(GML2.prototype.readBox),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n *
 /\nGML2.prototype.GEOMETRY_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'Curve': makeChildAppender(GML2.prototype.writeCurveOrLineString),\n        'MultiCurve': makeChildAppender(GML2.prototype.writeMultiCurveOrLineString),\n        'Point': makeChildAppender(GML2.prototype.writePoint),\n        'MultiPoint': makeChildAppender(GML2.prototype.writeMultiPoint),\n        'LineString': makeChildAppender(GML2.prototype.writeCurveOrLineString),\n        'MultiLineString': makeChildAppender(GML2.prototype.writeMultiCurveOrLineString),\n        'LinearRing': makeChildAppender(GML2.prototype.writeLinearRing),\n        'Polygon': makeChildAppender(GML2.prototype.writeSurfaceOrPolygon),\n        'MultiPolygon': makeChildAppender(GML2.prototype.writeMultiSurfaceOrPolygon),\n        'Surface': makeChildAppender(GML2.prototype.writeSurfaceOrPolygon),\n        'MultiSurface': makeChildAppender(GML2.prototype.writeMultiSurfaceOrPolygon),\n        'Envelope': makeChildAppender(GML2
 .prototype.writeEnvelope),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lineStringMember': makeChildAppender(GML2.prototype.writeLineStringOrCurveMember),\n        'curveMember': makeChildAppender(GML2.prototype.writeLineStringOrCurveMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.RING_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'outerBoundaryIs': makeChildAppender(GML2.prototype.writeRing),\n        'innerBoundaryIs': makeChildAppender(GML2.prototype.writeRing),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.POINTMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'pointMember': makeChildAppender(GML2.prototype.writePointMember),\n    },\n};\n/**\n * @
 const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'surfaceMember': makeChildAppender(GML2.prototype.writeSurfaceOrPolygonMember),\n        'polygonMember': makeChildAppender(GML2.prototype.writeSurfaceOrPolygonMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.ENVELOPE_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lowerCorner': makeChildAppender(writeStringTextNode),\n        'upperCorner': makeChildAppender(writeStringTextNode),\n    },\n};\nexport default GML2;\n//# sourceMappingURL=GML2.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            functi
 on (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GML32\n */\nimport GML3 from './GML3.js';\nimport GMLBase from './GMLBase.js';\nimport { makeArrayPusher, makeChildAppender, makeReplacer } from '../xml.js';\nimport { writeStringTextNode } from '../format/xsd.js';\n/**\n * @classdesc Feature format for reading and writing data in the GML format\n *            version 3.2.1.\n * @api\n */\nvar GML32 = /** @class */ (function (_super) {\n    __extends(GML32, _super);\n    /**\n     * @param {import(\"./GMLBase.js\").Options=} opt_options Optional configuration object.\n     */\n    function GML32(opt_options) {\n        var _this = this;\n        var options = /** @type {import(\
 "./GMLBase.js\").Options} */ (opt_options\n            ? opt_options\n            : {});\n        _this = _super.call(this, options) || this;\n        /**\n         * @type {string}\n         */\n        _this.schemaLocation = options.schemaLocation\n            ? options.schemaLocation\n            : _this.namespace + ' http://schemas.opengis.net/gml/3.2.1/gml.xsd';\n        return _this;\n    }\n    return GML32;\n}(GML3));\nGML32.prototype.namespace = 'http://www.opengis.net/gml/3.2';\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'pos': makeReplacer(GML3.prototype.readFlatPos),\n        'posList': makeReplacer(GML3.prototype.readFlatPosList),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml/3.2'
 : {\n        'interior': GML3.prototype.interiorParser,\n        'exterior': GML3.prototype.exteriorParser,\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.GEOMETRY_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Point': makeReplacer(GMLBase.prototype.readPoint),\n        'MultiPoint': makeReplacer(GMLBase.prototype.readMultiPoint),\n        'LineString': makeReplacer(GMLBase.prototype.readLineString),\n        'MultiLineString': makeReplacer(GMLBase.prototype.readMultiLineString),\n        'LinearRing': makeReplacer(GMLBase.prototype.readLinearRing),\n        'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n        'MultiPolygon': makeReplacer(GMLBase.prototype.readMultiPolygon),\n        'Surface': makeReplacer(GML32.prototype.readSurface),\n        'MultiSurface': makeReplacer(GML3.prototype.readMultiSurface),\n        'Curve': makeReplacer(GML32.prototype.readCurve),\n        'Multi
 Curve': makeReplacer(GML3.prototype.readMultiCurve),\n        'Envelope': makeReplacer(GML32.prototype.readEnvelope),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTICURVE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'curveMember': makeArrayPusher(GML3.prototype.curveMemberParser),\n        'curveMembers': makeArrayPusher(GML3.prototype.curveMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTISURFACE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'surfaceMember': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n        'surfaceMembers': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.CURVEMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n    
     'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n        'Curve': makeArrayPusher(GML3.prototype.readCurve),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.SURFACEMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n        'Surface': makeArrayPusher(GML3.prototype.readSurface),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.SURFACE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'patches': makeReplacer(GML3.prototype.readPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.CURVE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'segments': makeReplacer(GML3.prototype.readSegment),\n    },\n};\n/**\n * @const\n * @type {Object<string, O
 bject<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.ENVELOPE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'lowerCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n        'upperCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.PATCHES_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'PolygonPatch': makeReplacer(GML3.prototype.readPolygonPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.SEGMENTS_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'LineStringSegment': makeReplacer(GML3.prototype.readLineStringSegment),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTIPOINT_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'p
 ointMember': makeArrayPusher(GMLBase.prototype.pointMemberParser),\n        'pointMembers': makeArrayPusher(GMLBase.prototype.pointMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTILINESTRING_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'lineStringMember': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n        'lineStringMembers': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTIPOLYGON_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'polygonMember': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n        'polygonMembers': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.POINT
 MEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Point': makeArrayPusher(GMLBase.prototype.readFlatCoordinatesFromNode),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.LINESTRINGMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.POLYGONMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.RING_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'LinearRing': makeReplacer(GMLBase.prototype.readFlatLinearRing),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.
 js\").Serializer>>}\n */\nGML32.prototype.RING_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'exterior': makeChildAppender(GML3.prototype.writeRing),\n        'interior': makeChildAppender(GML3.prototype.writeRing),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.ENVELOPE_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'lowerCorner': makeChildAppender(writeStringTextNode),\n        'upperCorner': makeChildAppender(writeStringTextNode),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'surfaceMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n        'polygonMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\
 ").Serializer>>}\n */\nGML32.prototype.POINTMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'pointMember': makeChildAppender(GML3.prototype.writePointMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'lineStringMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n        'curveMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.GEOMETRY_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Curve': makeChildAppender(GML3.prototype.writeCurveOrLineString),\n        'MultiCurve': makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),\n        'Point': makeChildAppender(GML32.prototype.writePoint),\n        'MultiPoint': mak
 eChildAppender(GML3.prototype.writeMultiPoint),\n        'LineString': makeChildAppender(GML3.prototype.writeCurveOrLineString),\n        'MultiLineString': makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),\n        'LinearRing': makeChildAppender(GML3.prototype.writeLinearRing),\n        'Polygon': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiPolygon': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Surface': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiSurface': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Envelope': makeChildAppender(GML3.prototype.writeEnvelope),\n    },\n};\nexport default GML32;\n//# sourceMappingURL=GML32.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__
  = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GPX\n */\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport Point from '../geom/Point.js';\nimport XMLFeature from './XMLFeature.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, XML_SCHEMA_INSTANCE_URI, createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender, makeObjectPropertySetter, makeSequence, makeSimpleNodeFactory, makeStructureNS, parseNode, pushParseAndPop, pushSeriali
 zeAndPop, } from '../xml.js';\nimport { get as getProjection } from '../proj.js';\nimport { includes } from '../array.js';\nimport { readDateTime, readDecimal, readNonNegativeInteger, readString, writeDateTimeTextNode, writeDecimalTextNode, writeNonNegativeIntegerTextNode, writeStringTextNode, } from './xsd.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [\n    null,\n    'http://www.topografix.com/GPX/1/0',\n    'http://www.topografix.com/GPX/1/1',\n];\n/**\n * @const\n * @type {string}\n */\nvar SCHEMA_LOCATION = 'http://www.topografix.com/GPX/1/1 ' +\n    'http://www.topografix.com/GPX/1/1/gpx.xsd';\n/**\n * @const\n * @type {Object<string, function(Node, Array<*>): (Feature|undefined)>}\n */\nvar FEATURE_READER = {\n    'rte': readRte,\n    'trk': readTrk,\n    'wpt': readWpt,\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore
 \nvar GPX_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'rte': makeArrayPusher(readRte),\n    'trk': makeArrayPusher(readTrk),\n    'wpt': makeArrayPusher(readWpt),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LINK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'text': makeObjectPropertySetter(readString, 'linkText'),\n    'type': makeObjectPropertySetter(readString, 'linkType'),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar GPX_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'rte': makeChildAppender(writeRte),\n    'trk': makeChildAppender(writeTrk),\n    'wpt': makeChildAppender(writeWpt),\n});\n/**\n * @typedef {Object} Options\n * @property {function(Feature, Node):void} [readExtensions] Callback function\n * to process `extensions` nodes. To prevent memory leaks, this callback function must\n * not store any references 
 to the node. Note that the `extensions`\n * node is not allowed in GPX 1.0. Moreover, only `extensions`\n * nodes from `wpt`, `rte` and `trk` can be processed, as those are\n * directly mapped to a feature.\n */\n/**\n * @typedef {Object} LayoutOptions\n * @property {boolean} [hasZ]\n * @property {boolean} [hasM]\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the GPX format.\n *\n * Note that {@link module:ol/format/GPX~GPX#readFeature} only reads the first\n * feature of the source.\n *\n * When reading, routes (`<rte>`) are converted into LineString geometries, and\n * tracks (`<trk>`) into MultiLineString. Any properties on route and track\n * waypoints are ignored.\n *\n * When writing, LineString geometries are output as routes (`<rte>`), and\n * MultiLineString as tracks (`<trk>`).\n *\n * @api\n */\nvar GPX = /** @class */ (function (_super) {\n    __extends(GPX, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    functi
 on GPX(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        /**\n         * @type {function(Feature, Node): void|undefined}\n         * @private\n         */\n        _this.readExtensions_ = options.readExtensions;\n        return _this;\n    }\n    /**\n     * @param {Array<Feature>} features List of features.\n     * @private\n     */\n    GPX.prototype.handleReadExtensions_ = function (features) {\n        if (!features) {\n            features = [];\n        }\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            var feature = features[i];\n            if (this.readExtensions_) {\n                var extensionsNode = feature.get('extensionsNode_') || null;\n                this.readExtensions_(feature, extensionsNode);\n            }\n     
        feature.set('extensionsNode_', undefined);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    GPX.prototype.readFeatureFromNode = function (node, opt_options) {\n        if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n            return null;\n        }\n        var featureReader = FEATURE_READER[node.localName];\n        if (!featureReader) {\n            return null;\n        }\n        var feature = featureReader(node, [\n            this.getReadOptions(node, opt_options),\n        ]);\n        if (!feature) {\n            return null;\n        }\n        this.handleReadExtensions_([feature]);\n        return feature;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Feat
 ures.\n     */\n    GPX.prototype.readFeaturesFromNode = function (node, opt_options) {\n        if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n            return [];\n        }\n        if (node.localName == 'gpx') {\n            /** @type {Array<Feature>} */\n            var features = pushParseAndPop([], GPX_PARSERS, node, [\n                this.getReadOptions(node, opt_options),\n            ]);\n            if (features) {\n                this.handleReadExtensions_(features);\n                return features;\n            }\n            else {\n                return [];\n            }\n        }\n        return [];\n    };\n    /**\n     * Encode an array of features in the GPX format as an XML node.\n     * LineString geometries are output as routes (`<rte>`), and MultiLineString\n     * as tracks (`<trk>`).\n     *\n     * @param {Array<Feature>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Node} Nod
 e.\n     * @api\n     */\n    GPX.prototype.writeFeaturesNode = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        //FIXME Serialize metadata\n        var gpx = createElementNS('http://www.topografix.com/GPX/1/1', 'gpx');\n        var xmlnsUri = 'http://www.w3.org/2000/xmlns/';\n        gpx.setAttributeNS(xmlnsUri, 'xmlns:xsi', XML_SCHEMA_INSTANCE_URI);\n        gpx.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', SCHEMA_LOCATION);\n        gpx.setAttribute('version', '1.1');\n        gpx.setAttribute('creator', 'OpenLayers');\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        ({ node: gpx }), GPX_SERIALIZERS, GPX_NODE_FACTORY, features, [opt_options]);\n        return gpx;\n    };\n    return GPX;\n}(XMLFeature));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar RTE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n
     'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'desc': makeObjectPropertySetter(readString),\n    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'number': makeObjectPropertySetter(readNonNegativeInteger),\n    'extensions': parseExtensions,\n    'type': makeObjectPropertySetter(readString),\n    'rtept': parseRtePt,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar RTEPT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TRK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'desc': makeObjectPropertySetter(readString),\n 
    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'number': makeObjectPropertySetter(readNonNegativeInteger),\n    'type': makeObjectPropertySetter(readString),\n    'extensions': parseExtensions,\n    'trkseg': parseTrkSeg,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TRKSEG_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'trkpt': parseTrkPt,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TRKPT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar WPT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime),\n    
 'magvar': makeObjectPropertySetter(readDecimal),\n    'geoidheight': makeObjectPropertySetter(readDecimal),\n    'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'desc': makeObjectPropertySetter(readString),\n    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'sym': makeObjectPropertySetter(readString),\n    'type': makeObjectPropertySetter(readString),\n    'fix': makeObjectPropertySetter(readString),\n    'sat': makeObjectPropertySetter(readNonNegativeInteger),\n    'hdop': makeObjectPropertySetter(readDecimal),\n    'vdop': makeObjectPropertySetter(readDecimal),\n    'pdop': makeObjectPropertySetter(readDecimal),\n    'ageofdgpsdata': makeObjectPropertySetter(readDecimal),\n    'dgpsid': makeObjectPropertySetter(readNonNegativeInteger),\n    'extensions': parseExtensions,\n});\n/**\n * @const\n * @type {Array<string>}\n */\nvar LINK_SEQUENCE = ['text', 'type'];\n/**\n * @const\n * @type {Object<string,
  Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar LINK_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'text': makeChildAppender(writeStringTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar RTE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'name',\n    'cmt',\n    'desc',\n    'src',\n    'link',\n    'number',\n    'type',\n    'rtept',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar RTE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'number': makeChildAppender(writeNonNegativeIntegerTextNode),\n    'type': makeChildAp
 pender(writeStringTextNode),\n    'rtept': makeArraySerializer(makeChildAppender(writeWptType)),\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar RTEPT_TYPE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, ['ele', 'time']);\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar TRK_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'name',\n    'cmt',\n    'desc',\n    'src',\n    'link',\n    'number',\n    'type',\n    'trkseg',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar TRK_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'number': makeChildAppender(writeNonNegativeIntegerTextNode),\n    't
 ype': makeChildAppender(writeStringTextNode),\n    'trkseg': makeArraySerializer(makeChildAppender(writeTrkSeg)),\n});\n/**\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar TRKSEG_NODE_FACTORY = makeSimpleNodeFactory('trkpt');\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar TRKSEG_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'trkpt': makeChildAppender(writeWptType),\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar WPT_TYPE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'ele',\n    'time',\n    'magvar',\n    'geoidheight',\n    'name',\n    'cmt',\n    'desc',\n    'src',\n    'link',\n    'sym',\n    'type',\n    'fix',\n    'sat',\n    'hdop',\n    'vdop',\n    'pdop',\n    'ageofdgpsdata',\n    'dgpsid',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar WPT_
 TYPE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeChildAppender(writeDecimalTextNode),\n    'time': makeChildAppender(writeDateTimeTextNode),\n    'magvar': makeChildAppender(writeDecimalTextNode),\n    'geoidheight': makeChildAppender(writeDecimalTextNode),\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'sym': makeChildAppender(writeStringTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n    'fix': makeChildAppender(writeStringTextNode),\n    'sat': makeChildAppender(writeNonNegativeIntegerTextNode),\n    'hdop': makeChildAppender(writeDecimalTextNode),\n    'vdop': makeChildAppender(writeDecimalTextNode),\n    'pdop': makeChildAppender(writeDecimalTextNode),\n    'ageofdgpsdata': makeChildAppender(writeDecimalTextNode),\n    'dgpsid': makeC
 hildAppender(writeNonNegativeIntegerTextNode),\n});\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar GEOMETRY_TYPE_TO_NODENAME = {\n    'Point': 'wpt',\n    'LineString': 'rte',\n    'MultiLineString': 'trk',\n};\n/**\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nfunction GPX_NODE_FACTORY(value, objectStack, opt_nodeName) {\n    var geometry = /** @type {Feature} */ (value).getGeometry();\n    if (geometry) {\n        var nodeName = GEOMETRY_TYPE_TO_NODENAME[geometry.getType()];\n        if (nodeName) {\n            var parentNode = objectStack[objectStack.length - 1].node;\n            return createElementNS(parentNode.namespaceURI, nodeName);\n        }\n    }\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {LayoutOptions} layoutOptions Layout options.\n * @param {Element} node Node.\n * @param {!Object} values Values.\n * 
 @return {Array<number>} Flat coordinates.\n */\nfunction appendCoordinate(flatCoordinates, layoutOptions, node, values) {\n    flatCoordinates.push(parseFloat(node.getAttribute('lon')), parseFloat(node.getAttribute('lat')));\n    if ('ele' in values) {\n        flatCoordinates.push(/** @type {number} */ (values['ele']));\n        delete values['ele'];\n        layoutOptions.hasZ = true;\n    }\n    else {\n        flatCoordinates.push(0);\n    }\n    if ('time' in values) {\n        flatCoordinates.push(/** @type {number} */ (values['time']));\n        delete values['time'];\n        layoutOptions.hasM = true;\n    }\n    else {\n        flatCoordinates.push(0);\n    }\n    return flatCoordinates;\n}\n/**\n * Choose GeometryLayout based on flags in layoutOptions and adjust flatCoordinates\n * and ends arrays by shrinking them accordingly (removing unused zero entries).\n *\n * @param {LayoutOptions} layoutOptions Layout options.\n * @param {Array<number>} flatCoordinates Flat coordi
 nates.\n * @param {Array<number>=} ends Ends.\n * @return {import(\"../geom/GeometryLayout.js\").default} Layout.\n */\nfunction applyLayoutOptions(layoutOptions, flatCoordinates, ends) {\n    var layout = GeometryLayout.XY;\n    var stride = 2;\n    if (layoutOptions.hasZ && layoutOptions.hasM) {\n        layout = GeometryLayout.XYZM;\n        stride = 4;\n    }\n    else if (layoutOptions.hasZ) {\n        layout = GeometryLayout.XYZ;\n        stride = 3;\n    }\n    else if (layoutOptions.hasM) {\n        layout = GeometryLayout.XYM;\n        stride = 3;\n    }\n    if (stride !== 4) {\n        for (var i = 0, ii = flatCoordinates.length / 4; i < ii; i++) {\n            flatCoordinates[i * stride] = flatCoordinates[i * 4];\n            flatCoordinates[i * stride + 1] = flatCoordinates[i * 4 + 1];\n            if (layoutOptions.hasZ) {\n                flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 2];\n            }\n            if (layoutOptions.hasM) {\n              
   flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 3];\n            }\n        }\n        flatCoordinates.length = (flatCoordinates.length / 4) * stride;\n        if (ends) {\n            for (var i = 0, ii = ends.length; i < ii; i++) {\n                ends[i] = (ends[i] / 4) * stride;\n            }\n        }\n    }\n    return layout;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseLink(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var href = node.getAttribute('href');\n    if (href !== null) {\n        values['link'] = href;\n    }\n    parseNode(LINK_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseExtensions(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    values['extensionsNode_'] = node;\n}\n/**\n * @param {El
 ement} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseRtePt(node, objectStack) {\n    var values = pushParseAndPop({}, RTEPT_PARSERS, node, objectStack);\n    if (values) {\n        var rteValues = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n        var flatCoordinates = /** @type {Array<number>} */ (rteValues['flatCoordinates']);\n        var layoutOptions = /** @type {LayoutOptions} */ (rteValues['layoutOptions']);\n        appendCoordinate(flatCoordinates, layoutOptions, node, values);\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseTrkPt(node, objectStack) {\n    var values = pushParseAndPop({}, TRKPT_PARSERS, node, objectStack);\n    if (values) {\n        var trkValues = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n        var flatCoordinates = /** @type {Array<number>} */ (trkValues['flatCoordinates']);\n        var layoutOptions = /** @type 
 {LayoutOptions} */ (trkValues['layoutOptions']);\n        appendCoordinate(flatCoordinates, layoutOptions, node, values);\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseTrkSeg(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    parseNode(TRKSEG_PARSERS, node, objectStack);\n    var flatCoordinates = \n    /** @type {Array<number>} */\n    (values['flatCoordinates']);\n    var ends = /** @type {Array<number>} */ (values['ends']);\n    ends.push(flatCoordinates.length);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Track.\n */\nfunction readRte(node, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n    var values = pushParseAndPop({\n        'flatCoordinates': [],\n        'layoutOptions': {},\n    }, RTE_PARSERS, node, objectStack);\n   
  if (!values) {\n        return undefined;\n    }\n    var flatCoordinates = \n    /** @type {Array<number>} */\n    (values['flatCoordinates']);\n    delete values['flatCoordinates'];\n    var layoutOptions = /** @type {LayoutOptions} */ (values['layoutOptions']);\n    delete values['layoutOptions'];\n    var layout = applyLayoutOptions(layoutOptions, flatCoordinates);\n    var geometry = new LineString(flatCoordinates, layout);\n    transformGeometryWithOptions(geometry, false, options);\n    var feature = new Feature(geometry);\n    feature.setProperties(values, true);\n    return feature;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Track.\n */\nfunction readTrk(node, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n    var values = pushParseAndPop({\n        'flatCoordinates': [],\n        'ends': [],\n        'layoutOptions': {},\n    }, TRK_PARSER
 S, node, objectStack);\n    if (!values) {\n        return undefined;\n    }\n    var flatCoordinates = \n    /** @type {Array<number>} */\n    (values['flatCoordinates']);\n    delete values['flatCoordinates'];\n    var ends = /** @type {Array<number>} */ (values['ends']);\n    delete values['ends'];\n    var layoutOptions = /** @type {LayoutOptions} */ (values['layoutOptions']);\n    delete values['layoutOptions'];\n    var layout = applyLayoutOptions(layoutOptions, flatCoordinates, ends);\n    var geometry = new MultiLineString(flatCoordinates, layout, ends);\n    transformGeometryWithOptions(geometry, false, options);\n    var feature = new Feature(geometry);\n    feature.setProperties(values, true);\n    return feature;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Waypoint.\n */\nfunction readWpt(node, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);
 \n    var values = pushParseAndPop({}, WPT_PARSERS, node, objectStack);\n    if (!values) {\n        return undefined;\n    }\n    var layoutOptions = /** @type {LayoutOptions} */ ({});\n    var coordinates = appendCoordinate([], layoutOptions, node, values);\n    var layout = applyLayoutOptions(layoutOptions, coordinates);\n    var geometry = new Point(coordinates, layout);\n    transformGeometryWithOptions(geometry, false, options);\n    var feature = new Feature(geometry);\n    feature.setProperties(values, true);\n    return feature;\n}\n/**\n * @param {Element} node Node.\n * @param {string} value Value for the link's `href` attribute.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeLink(node, value, objectStack) {\n    node.setAttribute('href', value);\n    var context = objectStack[objectStack.length - 1];\n    var properties = context['properties'];\n    var link = [properties['linkText'], properties['linkType']];\n    pushSerializeAndPop(\n    /** @type {i
 mport(\"../xml.js\").NodeStackItem} */ ({ node: node }), LINK_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, link, objectStack, LINK_SEQUENCE);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeWptType(node, coordinate, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var parentNode = context.node;\n    var namespaceURI = parentNode.namespaceURI;\n    var properties = context['properties'];\n    //FIXME Projection handling\n    node.setAttributeNS(null, 'lat', String(coordinate[1]));\n    node.setAttributeNS(null, 'lon', String(coordinate[0]));\n    var geometryLayout = context['geometryLayout'];\n    switch (geometryLayout) {\n        case GeometryLayout.XYZM:\n            if (coordinate[3] !== 0) {\n                properties['time'] = coordinate[3];\n            }\n        // fall through\n        case GeometryLayout.XYZ:\n  
           if (coordinate[2] !== 0) {\n                properties['ele'] = coordinate[2];\n            }\n            break;\n        case GeometryLayout.XYM:\n            if (coordinate[2] !== 0) {\n                properties['time'] = coordinate[2];\n            }\n            break;\n        default:\n        // pass\n    }\n    var orderedKeys = node.nodeName == 'rtept'\n        ? RTEPT_TYPE_SEQUENCE[namespaceURI]\n        : WPT_TYPE_SEQUENCE[namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    ({ node: node, 'properties': properties }), WPT_TYPE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeRte(node, feature, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectS
 tack[0]);\n    var properties = feature.getProperties();\n    var context = { node: node };\n    context['properties'] = properties;\n    var geometry = feature.getGeometry();\n    if (geometry.getType() == GeometryType.LINE_STRING) {\n        var lineString = /** @type {LineString} */ (transformGeometryWithOptions(geometry, true, options));\n        context['geometryLayout'] = lineString.getLayout();\n        properties['rtept'] = lineString.getCoordinates();\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = RTE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, RTE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeTrk(node, feature, objectStack) {\n    var options = /** @type {import(\"./Feature.
 js\").WriteOptions} */ (objectStack[0]);\n    var properties = feature.getProperties();\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var context = { node: node };\n    context['properties'] = properties;\n    var geometry = feature.getGeometry();\n    if (geometry.getType() == GeometryType.MULTI_LINE_STRING) {\n        var multiLineString = /** @type {MultiLineString} */ (transformGeometryWithOptions(geometry, true, options));\n        properties['trkseg'] = multiLineString.getLineStrings();\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = TRK_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, TRK_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node.\n * @param {LineString} lineString LineString.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeTrkSeg(node, lineString, o
 bjectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var context = { node: node };\n    context['geometryLayout'] = lineString.getLayout();\n    context['properties'] = {};\n    pushSerializeAndPop(context, TRKSEG_SERIALIZERS, TRKSEG_NODE_FACTORY, lineString.getCoordinates(), objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeWpt(node, feature, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n    var context = objectStack[objectStack.length - 1];\n    context['properties'] = feature.getProperties();\n    var geometry = feature.getGeometry();\n    if (geometry.getType() == GeometryType.POINT) {\n        var point = /** @type {Point} */ (transformGeometryWithOptions(geometry, true, options));\n        context['geometryLayout'] = point.getLayout();\n        writeWptType(node, point.getCoordinates(), o
 bjectStack);\n    }\n}\nexport default GPX;\n//# sourceMappingURL=GPX.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/TextFeature\n */\nimport FeatureFormat from '../format/Feature.js';\nimport FormatType from '../format/FormatType.js';\nimport { abstract } from '../util.js';\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base cla
 ss for text feature formats.\n *\n * @abstract\n */\nvar TextFeature = /** @class */ (function (_super) {\n    __extends(TextFeature, _super);\n    function TextFeature() {\n        return _super.call(this) || this;\n    }\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    TextFeature.prototype.getType = function () {\n        return FormatType.TEXT;\n    };\n    /**\n     * Read the feature from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     * @api\n     */\n    TextFeature.prototype.readFeature = function (source, opt_options) {\n        return this.readFeatureFromText(getText(source), this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\
 n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    TextFeature.prototype.readFeatureFromText = function (text, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the features from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     * @api\n     */\n    TextFeature.prototype.readFeatures = function (source, opt_options) {\n        return this.readFeaturesFromText(getText(source), this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    TextFeature.prototype.readFeaturesFromText = function (text, opt_options) {\n
         return abstract();\n    };\n    /**\n     * Read the geometry from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     * @api\n     */\n    TextFeature.prototype.readGeometry = function (source, opt_options) {\n        return this.readGeometryFromText(getText(source), this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    TextFeature.prototype.readGeometryFromText = function (text, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the projection from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @ret
 urn {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    TextFeature.prototype.readProjection = function (source) {\n        return this.readProjectionFromText(getText(source));\n    };\n    /**\n     * @param {string} text Text.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    TextFeature.prototype.readProjectionFromText = function (text) {\n        return this.dataProjection;\n    };\n    /**\n     * Encode a feature as a string.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded feature.\n     * @api\n     */\n    TextFeature.prototype.writeFeature = function (feature, opt_options) {\n        return this.writeFeatureText(feature, this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../Feature.js\").default} feature Fe
 atures.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    TextFeature.prototype.writeFeatureText = function (feature, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode an array of features as string.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded features.\n     * @api\n     */\n    TextFeature.prototype.writeFeatures = function (features, opt_options) {\n        return this.writeFeaturesText(features, this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    TextFeature.prototype.w
 riteFeaturesText = function (features, opt_options) {\n        return abstract();\n    };\n    /**\n     * Write a single geometry.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Geometry.\n     * @api\n     */\n    TextFeature.prototype.writeGeometry = function (geometry, opt_options) {\n        return this.writeGeometryText(geometry, this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    TextFeature.prototype.writeGeometryText = function (geometry, opt_options) {\n        return abstract();\n    };\n    return TextFeature;\n}(FeatureFormat));\n/**\n * @param {Document|Element|Object|string} source Source.\n
  * @return {string} Text.\n */\nfunction getText(source) {\n    if (typeof source === 'string') {\n        return source;\n    }\n    else {\n        return '';\n    }\n}\nexport default TextFeature;\n//# sourceMappingURL=TextFeature.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/KML\n */\nimport Feature from '../Feature.js';\nimport Fill from '../style/Fill.js';\nimport GeometryCollection from '../geom/Geo
 metryCollection.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Icon from '../style/Icon.js';\nimport IconAnchorUnits from '../style/IconAnchorUnits.js';\nimport IconOrigin from '../style/IconOrigin.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport Stroke from '../style/Stroke.js';\nimport Style from '../style/Style.js';\nimport Text from '../style/Text.js';\nimport XMLFeature from './XMLFeature.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, XML_SCHEMA_INSTANCE_URI, createElementNS, getAllTextContent, isDocument, makeArrayExtender, makeArrayPusher, makeChildAppender, makeObjectPropertySetter, makeReplacer, makeSequence, makeSimpleNodeFactory, makeStructureNS, p
 arse, parseNode, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { asArray } from '../color.js';\nimport { assert } from '../asserts.js';\nimport { extend, includes } from '../array.js';\nimport { get as getProjection } from '../proj.js';\nimport { readBoolean, readDecimal, readString, writeBooleanTextNode, writeCDATASection, writeDecimalTextNode, writeStringTextNode, } from './xsd.js';\nimport { toRadians } from '../math.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {Object} Vec2\n * @property {number} x\n * @property {import(\"../style/IconAnchorUnits\").default} xunits\n * @property {number} y\n * @property {import(\"../style/IconAnchorUnits\").default} yunits\n * @property {import(\"../style/IconOrigin.js\").default} origin\n */\n/**\n * @typedef {Object} GxTrackObject\n * @property {Array<number>} flatCoordinates\n * @property {Array<number>} whens\n */\n/**\n * @const\n * @type {Array<string>}\n */\nvar GX_NAMESPACE_URIS
  = ['http://www.google.com/kml/ext/2.2'];\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [\n    null,\n    'http://earth.google.com/kml/2.0',\n    'http://earth.google.com/kml/2.1',\n    'http://earth.google.com/kml/2.2',\n    'http://www.opengis.net/kml/2.2',\n];\n/**\n * @const\n * @type {string}\n */\nvar SCHEMA_LOCATION = 'http://www.opengis.net/kml/2.2 ' +\n    'https://developers.google.com/kml/schema/kml22gx.xsd';\n/**\n * @type {Object<string, import(\"../style/IconAnchorUnits\").default>}\n */\nvar ICON_ANCHOR_UNITS_MAP = {\n    'fraction': IconAnchorUnits.FRACTION,\n    'pixels': IconAnchorUnits.PIXELS,\n    'insetPixels': IconAnchorUnits.PIXELS,\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PLACEMARK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ExtendedData': extendedDataParser,\n    'Region': regionParser,\n    'MultiGeometry': makeObjectPropertySetter(readMultiGeometr
 y, 'geometry'),\n    'LineString': makeObjectPropertySetter(readLineString, 'geometry'),\n    'LinearRing': makeObjectPropertySetter(readLinearRing, 'geometry'),\n    'Point': makeObjectPropertySetter(readPoint, 'geometry'),\n    'Polygon': makeObjectPropertySetter(readPolygon, 'geometry'),\n    'Style': makeObjectPropertySetter(readStyle),\n    'StyleMap': placemarkStyleMapParser,\n    'address': makeObjectPropertySetter(readString),\n    'description': makeObjectPropertySetter(readString),\n    'name': makeObjectPropertySetter(readString),\n    'open': makeObjectPropertySetter(readBoolean),\n    'phoneNumber': makeObjectPropertySetter(readString),\n    'styleUrl': makeObjectPropertySetter(readURI),\n    'visibility': makeObjectPropertySetter(readBoolean),\n}, makeStructureNS(GX_NAMESPACE_URIS, {\n    'MultiTrack': makeObjectPropertySetter(readGxMultiTrack, 'geometry'),\n    'Track': makeObjectPropertySetter(readGxTrack, 'geometry'),\n}));\n/**\n * @const\n * @type {Object<string, 
 Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar NETWORK_LINK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ExtendedData': extendedDataParser,\n    'Region': regionParser,\n    'Link': linkParser,\n    'address': makeObjectPropertySetter(readString),\n    'description': makeObjectPropertySetter(readString),\n    'name': makeObjectPropertySetter(readString),\n    'open': makeObjectPropertySetter(readBoolean),\n    'phoneNumber': makeObjectPropertySetter(readString),\n    'visibility': makeObjectPropertySetter(readBoolean),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LINK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'href': makeObjectPropertySetter(readURI),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar REGION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LatLonAltBox': latLonAltBoxParser,\n    'Lod': lod
 Parser,\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar KML_SEQUENCE = makeStructureNS(NAMESPACE_URIS, ['Document', 'Placemark']);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar KML_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'Document': makeChildAppender(writeDocument),\n    'Placemark': makeChildAppender(writePlacemark),\n});\n/**\n * @type {import(\"../color.js\").Color}\n */\nvar DEFAULT_COLOR;\n/**\n * @type {Fill}\n */\nvar DEFAULT_FILL_STYLE = null;\n/**\n * Get the default fill style (or null if not yet set).\n * @return {Fill} The default fill style.\n */\nexport function getDefaultFillStyle() {\n    return DEFAULT_FILL_STYLE;\n}\n/**\n * @type {import(\"../size.js\").Size}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR;\n/**\n * @type {import(\"../style/IconAnchorUnits\").default}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS;\n/**\n * @type {import(\"../style/IconA
 nchorUnits\").default}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS;\n/**\n * @type {import(\"../size.js\").Size}\n */\nvar DEFAULT_IMAGE_STYLE_SIZE;\n/**\n * @type {string}\n */\nvar DEFAULT_IMAGE_STYLE_SRC;\n/**\n * @type {number}\n */\nvar DEFAULT_IMAGE_SCALE_MULTIPLIER;\n/**\n * @type {import(\"../style/Image.js\").default}\n */\nvar DEFAULT_IMAGE_STYLE = null;\n/**\n * Get the default image style (or null if not yet set).\n * @return {import(\"../style/Image.js\").default} The default image style.\n */\nexport function getDefaultImageStyle() {\n    return DEFAULT_IMAGE_STYLE;\n}\n/**\n * @type {string}\n */\nvar DEFAULT_NO_IMAGE_STYLE;\n/**\n * @type {Stroke}\n */\nvar DEFAULT_STROKE_STYLE = null;\n/**\n * Get the default stroke style (or null if not yet set).\n * @return {Stroke} The default stroke style.\n */\nexport function getDefaultStrokeStyle() {\n    return DEFAULT_STROKE_STYLE;\n}\n/**\n * @type {Stroke}\n */\nvar DEFAULT_TEXT_STROKE_STYLE;\n/**\n * @type {Text}\n */\n
 var DEFAULT_TEXT_STYLE = null;\n/**\n * Get the default text style (or null if not yet set).\n * @return {Text} The default text style.\n */\nexport function getDefaultTextStyle() {\n    return DEFAULT_TEXT_STYLE;\n}\n/**\n * @type {Style}\n */\nvar DEFAULT_STYLE = null;\n/**\n * Get the default style (or null if not yet set).\n * @return {Style} The default style.\n */\nexport function getDefaultStyle() {\n    return DEFAULT_STYLE;\n}\n/**\n * @type {Array<Style>}\n */\nvar DEFAULT_STYLE_ARRAY = null;\n/**\n * Get the default style array (or null if not yet set).\n * @return {Array<Style>} The default style.\n */\nexport function getDefaultStyleArray() {\n    return DEFAULT_STYLE_ARRAY;\n}\nfunction createStyleDefaults() {\n    DEFAULT_COLOR = [255, 255, 255, 1];\n    DEFAULT_FILL_STYLE = new Fill({\n        color: DEFAULT_COLOR,\n    });\n    DEFAULT_IMAGE_STYLE_ANCHOR = [20, 2]; // FIXME maybe [8, 32] ?\n    DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS = IconAnchorUnits.PIXELS;\n    DEFAUL
 T_IMAGE_STYLE_ANCHOR_Y_UNITS = IconAnchorUnits.PIXELS;\n    DEFAULT_IMAGE_STYLE_SIZE = [64, 64];\n    DEFAULT_IMAGE_STYLE_SRC =\n        'https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png';\n    DEFAULT_IMAGE_SCALE_MULTIPLIER = 0.5;\n    DEFAULT_IMAGE_STYLE = new Icon({\n        anchor: DEFAULT_IMAGE_STYLE_ANCHOR,\n        anchorOrigin: IconOrigin.BOTTOM_LEFT,\n        anchorXUnits: DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,\n        anchorYUnits: DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS,\n        crossOrigin: 'anonymous',\n        rotation: 0,\n        scale: DEFAULT_IMAGE_SCALE_MULTIPLIER,\n        size: DEFAULT_IMAGE_STYLE_SIZE,\n        src: DEFAULT_IMAGE_STYLE_SRC,\n    });\n    DEFAULT_NO_IMAGE_STYLE = 'NO_IMAGE';\n    DEFAULT_STROKE_STYLE = new Stroke({\n        color: DEFAULT_COLOR,\n        width: 1,\n    });\n    DEFAULT_TEXT_STROKE_STYLE = new Stroke({\n        color: [51, 51, 51, 1],\n        width: 2,\n    });\n    DEFAULT_TEXT_STYLE = new Text({\n        font: 'bold 16px
  Helvetica',\n        fill: DEFAULT_FILL_STYLE,\n        stroke: DEFAULT_TEXT_STROKE_STYLE,\n        scale: 0.8,\n    });\n    DEFAULT_STYLE = new Style({\n        fill: DEFAULT_FILL_STYLE,\n        image: DEFAULT_IMAGE_STYLE,\n        text: DEFAULT_TEXT_STYLE,\n        stroke: DEFAULT_STROKE_STYLE,\n        zIndex: 0,\n    });\n    DEFAULT_STYLE_ARRAY = [DEFAULT_STYLE];\n}\n/**\n * @type {HTMLTextAreaElement}\n */\nvar TEXTAREA;\n/**\n * @typedef {Object} Options\n * @property {boolean} [extractStyles=true] Extract styles from the KML.\n * @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points.\n * @property {Array<Style>} [defaultStyle] Default style. The\n * default default style is the same as Google Earth.\n * @property {boolean} [writeStyles=true] Write styles into KML.\n * @property {null|string} [crossOrigin='anonymous'] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want 
 to access pixel data with the Canvas renderer.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the KML format.\n *\n * {@link module:ol/format/KML~KML#readFeature} will read the first feature from\n * a KML source.\n *\n * MultiGeometries are converted into GeometryCollections if they are a mix of\n * geometry types, and into MultiPoint/MultiLineString/MultiPolygon if they are\n * all of the same type.\n *\n * Note that the KML format uses the URL() constructor. Older browsers such as IE\n * which do not support this will need a URL polyfill to be loaded before use.\n *\n * @api\n */\nvar KML = /** @class */ (function (_super) {\n    __extends(KML, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function KML(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        if (!DEFAULT_STYLE_ARRAY) {\n            createStyleDefaults();\n        }\n        /**\n    
      * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        /**\n         * @private\n         * @type {Array<Style>}\n         */\n        _this.defaultStyle_ = options.defaultStyle\n            ? options.defaultStyle\n            : DEFAULT_STYLE_ARRAY;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.extractStyles_ =\n            options.extractStyles !== undefined ? options.extractStyles : true;\n        /**\n         * @type {boolean}\n         */\n        _this.writeStyles_ =\n            options.writeStyles !== undefined ? options.writeStyles : true;\n        /**\n         * @private\n         * @type {!Object<string, (Array<Style>|string)>}\n         */\n        _this.sharedStyles_ = {};\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.showPointNames_ =\n            options.showPointNames !== undefined ? options.showP
 ointNames : true;\n        /**\n         * @type {null|string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : 'anonymous';\n        return _this;\n    }\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     * @return {Array<Feature>|undefined} Features.\n     */\n    KML.prototype.readDocumentOrFolder_ = function (node, objectStack) {\n        // FIXME use scope somehow\n        var parsersNS = makeStructureNS(NAMESPACE_URIS, {\n            'Document': makeArrayExtender(this.readDocumentOrFolder_, this),\n            'Folder': makeArrayExtender(this.readDocumentOrFolder_, this),\n            'Placemark': makeArrayPusher(this.readPlacemark_, this),\n            'Style': this.readSharedStyle_.bind(this),\n            'StyleMap': this.readSharedStyleMap_.bind(this),\n        });\n        /** @type {Array<Feature>} */\n        // @ts-ignore\n        var featu
 res = pushParseAndPop([], parsersNS, node, objectStack, this);\n        if (features) {\n            return features;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     * @return {Feature|undefined} Feature.\n     */\n    KML.prototype.readPlacemark_ = function (node, objectStack) {\n        var object = pushParseAndPop({ 'geometry': null }, PLACEMARK_PARSERS, node, objectStack, this);\n        if (!object) {\n            return undefined;\n        }\n        var feature = new Feature();\n        var id = node.getAttribute('id');\n        if (id !== null) {\n            feature.setId(id);\n        }\n        var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n        var geometry = object['geometry'];\n        if (geometry) {\n            transformGeometryWithOptions(geometry, false, options);\n        }\n 
        feature.setGeometry(geometry);\n        delete object['geometry'];\n        if (this.extractStyles_) {\n            var style = object['Style'];\n            var styleUrl = object['styleUrl'];\n            var styleFunction = createFeatureStyleFunction(style, styleUrl, this.defaultStyle_, this.sharedStyles_, this.showPointNames_);\n            feature.setStyle(styleFunction);\n        }\n        delete object['Style'];\n        // we do not remove the styleUrl property from the object, so it\n        // gets stored on feature when setProperties is called\n        feature.setProperties(object, true);\n        return feature;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     */\n    KML.prototype.readSharedStyle_ = function (node, objectStack) {\n        var id = node.getAttribute('id');\n        if (id !== null) {\n            var style = readStyle.call(this, node, objectStack);\n            if (styl
 e) {\n                var styleUri = void 0;\n                var baseURI = node.baseURI;\n                if (!baseURI || baseURI == 'about:blank') {\n                    baseURI = window.location.href;\n                }\n                if (baseURI) {\n                    var url = new URL('#' + id, baseURI);\n                    styleUri = url.href;\n                }\n                else {\n                    styleUri = '#' + id;\n                }\n                this.sharedStyles_[styleUri] = style;\n            }\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     */\n    KML.prototype.readSharedStyleMap_ = function (node, objectStack) {\n        var id = node.getAttribute('id');\n        if (id === null) {\n            return;\n        }\n        var styleMapValue = readStyleMapValue.call(this, node, objectStack);\n        if (!styleMapValue) {\n            return;\n        }\n        
 var styleUri;\n        var baseURI = node.baseURI;\n        if (!baseURI || baseURI == 'about:blank') {\n            baseURI = window.location.href;\n        }\n        if (baseURI) {\n            var url = new URL('#' + id, baseURI);\n            styleUri = url.href;\n        }\n        else {\n            styleUri = '#' + id;\n        }\n        this.sharedStyles_[styleUri] = styleMapValue;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    KML.prototype.readFeatureFromNode = function (node, opt_options) {\n        if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n            return null;\n        }\n        var feature = this.readPlacemark_(node, [\n            this.getReadOptions(node, opt_options),\n        ]);\n        if (feature) {\n            return feature;\n        }\n        else {\n            return null;\n        
 }\n    };\n    /**\n     * @protected\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    KML.prototype.readFeaturesFromNode = function (node, opt_options) {\n        if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n            return [];\n        }\n        var features;\n        var localName = node.localName;\n        if (localName == 'Document' || localName == 'Folder') {\n            features = this.readDocumentOrFolder_(node, [\n                this.getReadOptions(node, opt_options),\n            ]);\n            if (features) {\n                return features;\n            }\n            else {\n                return [];\n            }\n        }\n        else if (localName == 'Placemark') {\n            var feature = this.readPlacemark_(node, [\n                this.getReadOptions(node, opt_options),\n            ]);\n          
   if (feature) {\n                return [feature];\n            }\n            else {\n                return [];\n            }\n        }\n        else if (localName == 'kml') {\n            features = [];\n            for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n                var fs = this.readFeaturesFromNode(n, opt_options);\n                if (fs) {\n                    extend(features, fs);\n                }\n            }\n            return features;\n        }\n        else {\n            return [];\n        }\n    };\n    /**\n     * Read the name of the KML.\n     *\n     * @param {Document|Element|string} source Source.\n     * @return {string|undefined} Name.\n     * @api\n     */\n    KML.prototype.readName = function (source) {\n        if (!source) {\n            return undefined;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readNameFromDocument(doc);\n        }
 \n        else if (isDocument(source)) {\n            return this.readNameFromDocument(/** @type {Document} */ (source));\n        }\n        else {\n            return this.readNameFromNode(/** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {string|undefined} Name.\n     */\n    KML.prototype.readNameFromDocument = function (doc) {\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                var name_1 = this.readNameFromNode(/** @type {Element} */ (n));\n                if (name_1) {\n                    return name_1;\n                }\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {string|undefined} Name.\n     */\n    KML.prototype.readNameFromNode = function (node) {\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n  
           if (includes(NAMESPACE_URIS, n.namespaceURI) && n.localName == 'name') {\n                return readString(n);\n            }\n        }\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var localName = n.localName;\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n                (localName == 'Document' ||\n                    localName == 'Folder' ||\n                    localName == 'Placemark' ||\n                    localName == 'kml')) {\n                var name_2 = this.readNameFromNode(n);\n                if (name_2) {\n                    return name_2;\n                }\n            }\n        }\n        return undefined;\n    };\n    /**\n     * Read the network links of the KML.\n     *\n     * @param {Document|Element|string} source Source.\n     * @return {Array<Object>} Network links.\n     * @api\n     */\n    KML.prototype.readNetworkLinks = function (source) {\n        var networkLinks = [];\n      
   if (typeof source === 'string') {\n            var doc = parse(source);\n            extend(networkLinks, this.readNetworkLinksFromDocument(doc));\n        }\n        else if (isDocument(source)) {\n            extend(networkLinks, this.readNetworkLinksFromDocument(/** @type {Document} */ (source)));\n        }\n        else {\n            extend(networkLinks, this.readNetworkLinksFromNode(/** @type {Element} */ (source)));\n        }\n        return networkLinks;\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {Array<Object>} Network links.\n     */\n    KML.prototype.readNetworkLinksFromDocument = function (doc) {\n        var networkLinks = [];\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                extend(networkLinks, this.readNetworkLinksFromNode(/** @type {Element} */ (n)));\n            }\n        }\n        return networkLinks;\n    };\n    /**\n     *
  @param {Element} node Node.\n     * @return {Array<Object>} Network links.\n     */\n    KML.prototype.readNetworkLinksFromNode = function (node) {\n        var networkLinks = [];\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n                n.localName == 'NetworkLink') {\n                var obj = pushParseAndPop({}, NETWORK_LINK_PARSERS, n, []);\n                networkLinks.push(obj);\n            }\n        }\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var localName = n.localName;\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n                (localName == 'Document' || localName == 'Folder' || localName == 'kml')) {\n                extend(networkLinks, this.readNetworkLinksFromNode(n));\n            }\n        }\n        return networkLinks;\n    };\n    /**\n     * Read the regions of the KML.\n     *\n     * @param {Docum
 ent|Element|string} source Source.\n     * @return {Array<Object>} Regions.\n     * @api\n     */\n    KML.prototype.readRegion = function (source) {\n        var regions = [];\n        if (typeof source === 'string') {\n            var doc = parse(source);\n            extend(regions, this.readRegionFromDocument(doc));\n        }\n        else if (isDocument(source)) {\n            extend(regions, this.readRegionFromDocument(/** @type {Document} */ (source)));\n        }\n        else {\n            extend(regions, this.readRegionFromNode(/** @type {Element} */ (source)));\n        }\n        return regions;\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {Array<Object>} Region.\n     */\n    KML.prototype.readRegionFromDocument = function (doc) {\n        var regions = [];\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                extend(regions, this.readRegionFr
 omNode(/** @type {Element} */ (n)));\n            }\n        }\n        return regions;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {Array<Object>} Region.\n     * @api\n     */\n    KML.prototype.readRegionFromNode = function (node) {\n        var regions = [];\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            if (includes(NAMESPACE_URIS, n.namespaceURI) && n.localName == 'Region') {\n                var obj = pushParseAndPop({}, REGION_PARSERS, n, []);\n                regions.push(obj);\n            }\n        }\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var localName = n.localName;\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n                (localName == 'Document' || localName == 'Folder' || localName == 'kml')) {\n                extend(regions, this.readRegionFromNode(n));\n            }\n        }\n        return regions;\n    };\n    /**\n     * 
 Encode an array of features in the KML format as an XML node. GeometryCollections,\n     * MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.\n     *\n     * @param {Array<Feature>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Node} Node.\n     * @api\n     */\n    KML.prototype.writeFeaturesNode = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var kml = createElementNS(NAMESPACE_URIS[4], 'kml');\n        var xmlnsUri = 'http://www.w3.org/2000/xmlns/';\n        kml.setAttributeNS(xmlnsUri, 'xmlns:gx', GX_NAMESPACE_URIS[0]);\n        kml.setAttributeNS(xmlnsUri, 'xmlns:xsi', XML_SCHEMA_INSTANCE_URI);\n        kml.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', SCHEMA_LOCATION);\n        var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {\n            node: kml,\n        };\n        /** @type {!Object<string, 
 (Array<Feature>|Feature|undefined)>} */\n        var properties = {};\n        if (features.length > 1) {\n            properties['Document'] = features;\n        }\n        else if (features.length == 1) {\n            properties['Placemark'] = features[0];\n        }\n        var orderedKeys = KML_SEQUENCE[kml.namespaceURI];\n        var values = makeSequence(properties, orderedKeys);\n        pushSerializeAndPop(context, KML_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, [opt_options], orderedKeys, this);\n        return kml;\n    };\n    return KML;\n}(XMLFeature));\n/**\n * @param {Style|undefined} foundStyle Style.\n * @param {string} name Name.\n * @return {Style} style Style.\n */\nfunction createNameStyleFunction(foundStyle, name) {\n    var textOffset = [0, 0];\n    var textAlign = 'start';\n    var imageStyle = foundStyle.getImage();\n    if (imageStyle) {\n        var imageSize = imageStyle.getImageSize();\n        if (imageSize === null) {\n            imageSize = D
 EFAULT_IMAGE_STYLE_SIZE;\n        }\n        if (imageSize.length == 2) {\n            var imageScale = imageStyle.getScaleArray();\n            // Offset the label to be centered to the right of the icon,\n            // if there is one.\n            textOffset[0] = (imageScale[0] * imageSize[0]) / 2;\n            textOffset[1] = (-imageScale[1] * imageSize[1]) / 2;\n            textAlign = 'left';\n        }\n    }\n    var textStyle = foundStyle.getText();\n    if (textStyle) {\n        // clone the text style, customizing it with name, alignments and offset.\n        // Note that kml does not support many text options that OpenLayers does (rotation, textBaseline).\n        textStyle = textStyle.clone();\n        textStyle.setFont(textStyle.getFont() || DEFAULT_TEXT_STYLE.getFont());\n        textStyle.setScale(textStyle.getScale() || DEFAULT_TEXT_STYLE.getScale());\n        textStyle.setFill(textStyle.getFill() || DEFAULT_TEXT_STYLE.getFill());\n        textStyle.setStroke(textS
 tyle.getStroke() || DEFAULT_TEXT_STROKE_STYLE);\n    }\n    else {\n        textStyle = DEFAULT_TEXT_STYLE.clone();\n    }\n    textStyle.setText(name);\n    textStyle.setOffsetX(textOffset[0]);\n    textStyle.setOffsetY(textOffset[1]);\n    textStyle.setTextAlign(textAlign);\n    var nameStyle = new Style({\n        image: imageStyle,\n        text: textStyle,\n    });\n    return nameStyle;\n}\n/**\n * @param {Array<Style>|undefined} style Style.\n * @param {string} styleUrl Style URL.\n * @param {Array<Style>} defaultStyle Default style.\n * @param {!Object<string, (Array<Style>|string)>} sharedStyles Shared styles.\n * @param {boolean|undefined} showPointNames true to show names for point placemarks.\n * @return {import(\"../style/Style.js\").StyleFunction} Feature style function.\n */\nfunction createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles, showPointNames) {\n    return (\n    /**\n     * @param {Feature} feature feature.\n     * @param {number} resolut
 ion Resolution.\n     * @return {Array<Style>|Style} Style.\n     */\n    function (feature, resolution) {\n        var drawName = showPointNames;\n        var name = '';\n        var multiGeometryPoints = [];\n        if (drawName) {\n            var geometry = feature.getGeometry();\n            if (geometry) {\n                var type = geometry.getType();\n                if (type === GeometryType.GEOMETRY_COLLECTION) {\n                    multiGeometryPoints = geometry\n                        .getGeometriesArrayRecursive()\n                        .filter(function (geometry) {\n                        var type = geometry.getType();\n                        return (type === GeometryType.POINT ||\n                            type === GeometryType.MULTI_POINT);\n                    });\n                    drawName = multiGeometryPoints.length > 0;\n                }\n                else {\n                    drawName =\n                        type === GeometryType.POINT || 
 type === GeometryType.MULTI_POINT;\n                }\n            }\n        }\n        if (drawName) {\n            name = /** @type {string} */ (feature.get('name'));\n            drawName = drawName && !!name;\n            // convert any html character codes\n            if (drawName && name.search(/&[^&]+;/) > -1) {\n                if (!TEXTAREA) {\n                    TEXTAREA = document.createElement('textarea');\n                }\n                TEXTAREA.innerHTML = name;\n                name = TEXTAREA.value;\n            }\n        }\n        var featureStyle = defaultStyle;\n        if (style) {\n            featureStyle = style;\n        }\n        else if (styleUrl) {\n            featureStyle = findStyle(styleUrl, defaultStyle, sharedStyles);\n        }\n        if (drawName) {\n            var nameStyle = createNameStyleFunction(featureStyle[0], name);\n            if (multiGeometryPoints.length > 0) {\n                // in multigeometries restrict the name style
  to points and create a\n                // style without image or text for geometries requiring fill or stroke\n                // including any polygon specific style if there is one\n                nameStyle.setGeometry(new GeometryCollection(multiGeometryPoints));\n                var baseStyle = new Style({\n                    geometry: featureStyle[0].getGeometry(),\n                    image: null,\n                    fill: featureStyle[0].getFill(),\n                    stroke: featureStyle[0].getStroke(),\n                    text: null,\n                });\n                return [nameStyle, baseStyle].concat(featureStyle.slice(1));\n            }\n            return nameStyle;\n        }\n        return featureStyle;\n    });\n}\n/**\n * @param {Array<Style>|string|undefined} styleValue Style value.\n * @param {Array<Style>} defaultStyle Default style.\n * @param {!Object<string, (Array<Style>|string)>} sharedStyles\n * Shared styles.\n * @return {Array<Style>} Style.
 \n */\nfunction findStyle(styleValue, defaultStyle, sharedStyles) {\n    if (Array.isArray(styleValue)) {\n        return styleValue;\n    }\n    else if (typeof styleValue === 'string') {\n        // KML files in the wild occasionally forget the leading `#` on styleUrls\n        // defined in the same document.  Add a leading `#` if it enables to find\n        // a style.\n        if (!(styleValue in sharedStyles) && '#' + styleValue in sharedStyles) {\n            styleValue = '#' + styleValue;\n        }\n        return findStyle(sharedStyles[styleValue], defaultStyle, sharedStyles);\n    }\n    else {\n        return defaultStyle;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {import(\"../color.js\").Color|undefined} Color.\n */\nfunction readColor(node) {\n    var s = getAllTextContent(node, false);\n    // The KML specification states that colors should not include a leading `#`\n    // but we tolerate them.\n    var m = /^\\s*#?\\s*([0-9A-Fa-f]{8})\\s*$/.exec(s);\n 
    if (m) {\n        var hexColor = m[1];\n        return [\n            parseInt(hexColor.substr(6, 2), 16),\n            parseInt(hexColor.substr(4, 2), 16),\n            parseInt(hexColor.substr(2, 2), 16),\n            parseInt(hexColor.substr(0, 2), 16) / 255,\n        ];\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {Array<number>|undefined} Flat coordinates.\n */\nexport function readFlatCoordinates(node) {\n    var s = getAllTextContent(node, false);\n    var flatCoordinates = [];\n    // The KML specification states that coordinate tuples should not include\n    // spaces, but we tolerate them.\n    var re = /^\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)\\s*,\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)(?:\\s*,\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?))?\\s*/i;\n    var m;\n    while ((m = re.exec(s))) {\n        var x = parseFloat(m[1]);\n        var y = parseFloat(m[2]);\n        var z = m[3] ? parseFloat(m[3]) : 0;\n    
     flatCoordinates.push(x, y, z);\n        s = s.substr(m[0].length);\n    }\n    if (s !== '') {\n        return undefined;\n    }\n    return flatCoordinates;\n}\n/**\n * @param {Node} node Node.\n * @return {string} URI.\n */\nfunction readURI(node) {\n    var s = getAllTextContent(node, false).trim();\n    var baseURI = node.baseURI;\n    if (!baseURI || baseURI == 'about:blank') {\n        baseURI = window.location.href;\n    }\n    if (baseURI) {\n        var url = new URL(s, baseURI);\n        return url.href;\n    }\n    else {\n        return s;\n    }\n}\n/**\n * @param {Element} node Node.\n * @return {Vec2} Vec2.\n */\nfunction readVec2(node) {\n    var xunits = node.getAttribute('xunits');\n    var yunits = node.getAttribute('yunits');\n    var origin;\n    if (xunits !== 'insetPixels') {\n        if (yunits !== 'insetPixels') {\n            origin = IconOrigin.BOTTOM_LEFT;\n        }\n        else {\n            origin = IconOrigin.TOP_LEFT;\n        }\n    }\n    els
 e {\n        if (yunits !== 'insetPixels') {\n            origin = IconOrigin.BOTTOM_RIGHT;\n        }\n        else {\n            origin = IconOrigin.TOP_RIGHT;\n        }\n    }\n    return {\n        x: parseFloat(node.getAttribute('x')),\n        xunits: ICON_ANCHOR_UNITS_MAP[xunits],\n        y: parseFloat(node.getAttribute('y')),\n        yunits: ICON_ANCHOR_UNITS_MAP[yunits],\n        origin: origin,\n    };\n}\n/**\n * @param {Node} node Node.\n * @return {number|undefined} Scale.\n */\nfunction readScale(node) {\n    return readDecimal(node);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_MAP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Pair': pairDataParser,\n});\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<Style>|string|undefined} StyleMap.\n */\nfunction readStyleMapValue(node, objectStack) {\n    return pushParseAnd
 Pop(undefined, STYLE_MAP_PARSERS, node, objectStack, this);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ICON_STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Icon': makeObjectPropertySetter(readIcon),\n    'color': makeObjectPropertySetter(readColor),\n    'heading': makeObjectPropertySetter(readDecimal),\n    'hotSpot': makeObjectPropertySetter(readVec2),\n    'scale': makeObjectPropertySetter(readScale),\n});\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction iconStyleParser(node, objectStack) {\n    // FIXME refreshMode\n    // FIXME refreshInterval\n    // FIXME viewRefreshTime\n    // FIXME viewBoundScale\n    // FIXME viewFormat\n    // FIXME httpQuery\n    var object = pushParseAndPop({}, ICON_STYLE_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var styleObject = /** @type {Object} */ (objectStack[objec
 tStack.length - 1]);\n    var IconObject = 'Icon' in object ? object['Icon'] : {};\n    var drawIcon = !('Icon' in object) || Object.keys(IconObject).length > 0;\n    var src;\n    var href = /** @type {string|undefined} */ (IconObject['href']);\n    if (href) {\n        src = href;\n    }\n    else if (drawIcon) {\n        src = DEFAULT_IMAGE_STYLE_SRC;\n    }\n    var anchor, anchorXUnits, anchorYUnits;\n    var anchorOrigin = IconOrigin.BOTTOM_LEFT;\n    var hotSpot = /** @type {Vec2|undefined} */ (object['hotSpot']);\n    if (hotSpot) {\n        anchor = [hotSpot.x, hotSpot.y];\n        anchorXUnits = hotSpot.xunits;\n        anchorYUnits = hotSpot.yunits;\n        anchorOrigin = hotSpot.origin;\n    }\n    else if (src === DEFAULT_IMAGE_STYLE_SRC) {\n        anchor = DEFAULT_IMAGE_STYLE_ANCHOR;\n        anchorXUnits = DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS;\n        anchorYUnits = DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS;\n    }\n    else if (/^http:\\/\\/maps\\.(?:google|gstatic)\\.com\
 \//.test(src)) {\n        anchor = [0.5, 0];\n        anchorXUnits = IconAnchorUnits.FRACTION;\n        anchorYUnits = IconAnchorUnits.FRACTION;\n    }\n    var offset;\n    var x = /** @type {number|undefined} */ (IconObject['x']);\n    var y = /** @type {number|undefined} */ (IconObject['y']);\n    if (x !== undefined && y !== undefined) {\n        offset = [x, y];\n    }\n    var size;\n    var w = /** @type {number|undefined} */ (IconObject['w']);\n    var h = /** @type {number|undefined} */ (IconObject['h']);\n    if (w !== undefined && h !== undefined) {\n        size = [w, h];\n    }\n    var rotation;\n    var heading = /** @type {number} */ (object['heading']);\n    if (heading !== undefined) {\n        rotation = toRadians(heading);\n    }\n    var scale = /** @type {number|undefined} */ (object['scale']);\n    var color = /** @type {Array<number>|undefined} */ (object['color']);\n    if (drawIcon) {\n        if (src == DEFAULT_IMAGE_STYLE_SRC) {\n            size = DEFAUL
 T_IMAGE_STYLE_SIZE;\n            if (scale === undefined) {\n                scale = DEFAULT_IMAGE_SCALE_MULTIPLIER;\n            }\n        }\n        var imageStyle = new Icon({\n            anchor: anchor,\n            anchorOrigin: anchorOrigin,\n            anchorXUnits: anchorXUnits,\n            anchorYUnits: anchorYUnits,\n            crossOrigin: this.crossOrigin_,\n            offset: offset,\n            offsetOrigin: IconOrigin.BOTTOM_LEFT,\n            rotation: rotation,\n            scale: scale,\n            size: size,\n            src: src,\n            color: color,\n        });\n        styleObject['imageStyle'] = imageStyle;\n    }\n    else {\n        // handle the case when we explicitly want to draw no icon.\n        styleObject['imageStyle'] = DEFAULT_NO_IMAGE_STYLE;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LABEL_STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': 
 makeObjectPropertySetter(readColor),\n    'scale': makeObjectPropertySetter(readScale),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction labelStyleParser(node, objectStack) {\n    // FIXME colorMode\n    var object = pushParseAndPop({}, LABEL_STYLE_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var styleObject = objectStack[objectStack.length - 1];\n    var textStyle = new Text({\n        fill: new Fill({\n            color: \n            /** @type {import(\"../color.js\").Color} */\n            ('color' in object ? object['color'] : DEFAULT_COLOR),\n        }),\n        scale: /** @type {number|undefined} */ (object['scale']),\n    });\n    styleObject['textStyle'] = textStyle;\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LINE_STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeObjectPropertySetter(readColor),
 \n    'width': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction lineStyleParser(node, objectStack) {\n    // FIXME colorMode\n    // FIXME gx:outerColor\n    // FIXME gx:outerWidth\n    // FIXME gx:physicalWidth\n    // FIXME gx:labelVisibility\n    var object = pushParseAndPop({}, LINE_STYLE_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var styleObject = objectStack[objectStack.length - 1];\n    var strokeStyle = new Stroke({\n        color: \n        /** @type {import(\"../color.js\").Color} */\n        ('color' in object ? object['color'] : DEFAULT_COLOR),\n        width: /** @type {number} */ ('width' in object ? object['width'] : 1),\n    });\n    styleObject['strokeStyle'] = strokeStyle;\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar POLY_STYLE_PARSERS = makeStructureNS(NAMESPACE_URI
 S, {\n    'color': makeObjectPropertySetter(readColor),\n    'fill': makeObjectPropertySetter(readBoolean),\n    'outline': makeObjectPropertySetter(readBoolean),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction polyStyleParser(node, objectStack) {\n    // FIXME colorMode\n    var object = pushParseAndPop({}, POLY_STYLE_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var styleObject = objectStack[objectStack.length - 1];\n    var fillStyle = new Fill({\n        color: \n        /** @type {import(\"../color.js\").Color} */\n        ('color' in object ? object['color'] : DEFAULT_COLOR),\n    });\n    styleObject['fillStyle'] = fillStyle;\n    var fill = /** @type {boolean|undefined} */ (object['fill']);\n    if (fill !== undefined) {\n        styleObject['fill'] = fill;\n    }\n    var outline = /** @type {boolean|undefined} */ (object['outline']);\n    if (outline !== undefined) {\n        styleObje
 ct['outline'] = outline;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar FLAT_LINEAR_RING_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'coordinates': makeReplacer(readFlatCoordinates),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<number>} LinearRing flat coordinates.\n */\nfunction readFlatLinearRing(node, objectStack) {\n    return pushParseAndPop(null, FLAT_LINEAR_RING_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction gxCoordParser(node, objectStack) {\n    var gxTrackObject = \n    /** @type {GxTrackObject} */\n    (objectStack[objectStack.length - 1]);\n    var flatCoordinates = gxTrackObject.flatCoordinates;\n    var s = getAllTextContent(node, false);\n    var re = /^\\s*([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)\\s+([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)
 \\s+([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)\\s*$/i;\n    var m = re.exec(s);\n    if (m) {\n        var x = parseFloat(m[1]);\n        var y = parseFloat(m[2]);\n        var z = parseFloat(m[3]);\n        flatCoordinates.push(x, y, z, 0);\n    }\n    else {\n        flatCoordinates.push(0, 0, 0, 0);\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar GX_MULTITRACK_GEOMETRY_PARSERS = makeStructureNS(GX_NAMESPACE_URIS, {\n    'Track': makeArrayPusher(readGxTrack),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {MultiLineString|undefined} MultiLineString.\n */\nfunction readGxMultiTrack(node, objectStack) {\n    var lineStrings = pushParseAndPop([], GX_MULTITRACK_GEOMETRY_PARSERS, node, objectStack);\n    if (!lineStrings) {\n        return undefined;\n    }\n    return new MultiLineString(lineStrings);\n}\n/**\n * @const\n * @type {Object<string, Object<str
 ing, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar GX_TRACK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'when': whenParser,\n}, makeStructureNS(GX_NAMESPACE_URIS, {\n    'coord': gxCoordParser,\n}));\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {LineString|undefined} LineString.\n */\nfunction readGxTrack(node, objectStack) {\n    var gxTrackObject = pushParseAndPop(\n    /** @type {GxTrackObject} */ ({\n        flatCoordinates: [],\n        whens: [],\n    }), GX_TRACK_PARSERS, node, objectStack);\n    if (!gxTrackObject) {\n        return undefined;\n    }\n    var flatCoordinates = gxTrackObject.flatCoordinates;\n    var whens = gxTrackObject.whens;\n    for (var i = 0, ii = Math.min(flatCoordinates.length, whens.length); i < ii; ++i) {\n        flatCoordinates[4 * i + 3] = whens[i];\n    }\n    return new LineString(flatCoordinates, GeometryLayout.XYZM);\n}\n/**\n * @const\n * @type {Object<string, Object<string
 , import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ICON_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'href': makeObjectPropertySetter(readURI),\n}, makeStructureNS(GX_NAMESPACE_URIS, {\n    'x': makeObjectPropertySetter(readDecimal),\n    'y': makeObjectPropertySetter(readDecimal),\n    'w': makeObjectPropertySetter(readDecimal),\n    'h': makeObjectPropertySetter(readDecimal),\n}));\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Icon object.\n */\nfunction readIcon(node, objectStack) {\n    var iconObject = pushParseAndPop({}, ICON_PARSERS, node, objectStack);\n    if (iconObject) {\n        return iconObject;\n    }\n    else {\n        return null;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar GEOMETRY_FLAT_COORDINATES_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'coordinates': makeReplacer(readFlatCoordinates),\n});\n/**\n * @pa
 ram {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<number>} Flat coordinates.\n */\nfunction readFlatCoordinatesFromNode(node, objectStack) {\n    return pushParseAndPop(null, GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EXTRUDE_AND_ALTITUDE_MODE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'extrude': makeObjectPropertySetter(readBoolean),\n    'tessellate': makeObjectPropertySetter(readBoolean),\n    'altitudeMode': makeObjectPropertySetter(readString),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {LineString|undefined} LineString.\n */\nfunction readLineString(node, objectStack) {\n    var properties = pushParseAndPop({}, EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatCoordinates = readFlatCoordinatesFromNode(node, objectStack);\n    i
 f (flatCoordinates) {\n        var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n        lineString.setProperties(properties, true);\n        return lineString;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Polygon|undefined} Polygon.\n */\nfunction readLinearRing(node, objectStack) {\n    var properties = pushParseAndPop({}, EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatCoordinates = readFlatCoordinatesFromNode(node, objectStack);\n    if (flatCoordinates) {\n        var polygon = new Polygon(flatCoordinates, GeometryLayout.XYZ, [\n            flatCoordinates.length,\n        ]);\n        polygon.setProperties(properties, true);\n        return polygon;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar MULTI_GEOMETR
 Y_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LineString': makeArrayPusher(readLineString),\n    'LinearRing': makeArrayPusher(readLinearRing),\n    'MultiGeometry': makeArrayPusher(readMultiGeometry),\n    'Point': makeArrayPusher(readPoint),\n    'Polygon': makeArrayPusher(readPolygon),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readMultiGeometry(node, objectStack) {\n    var geometries = pushParseAndPop([], MULTI_GEOMETRY_PARSERS, node, objectStack);\n    if (!geometries) {\n        return null;\n    }\n    if (geometries.length === 0) {\n        return new GeometryCollection(geometries);\n    }\n    var multiGeometry;\n    var homogeneous = true;\n    var type = geometries[0].getType();\n    var geometry;\n    for (var i = 1, ii = geometries.length; i < ii; ++i) {\n        geometry = geometries[i];\n        if (geometry.getType() != type) {\n       
      homogeneous = false;\n            break;\n        }\n    }\n    if (homogeneous) {\n        var layout = void 0;\n        var flatCoordinates = void 0;\n        if (type == GeometryType.POINT) {\n            var point = geometries[0];\n            layout = point.getLayout();\n            flatCoordinates = point.getFlatCoordinates();\n            for (var i = 1, ii = geometries.length; i < ii; ++i) {\n                geometry = geometries[i];\n                extend(flatCoordinates, geometry.getFlatCoordinates());\n            }\n            multiGeometry = new MultiPoint(flatCoordinates, layout);\n            setCommonGeometryProperties(multiGeometry, geometries);\n        }\n        else if (type == GeometryType.LINE_STRING) {\n            multiGeometry = new MultiLineString(geometries);\n            setCommonGeometryProperties(multiGeometry, geometries);\n        }\n        else if (type == GeometryType.POLYGON) {\n            multiGeometry = new MultiPolygon(geometries);\n  
           setCommonGeometryProperties(multiGeometry, geometries);\n        }\n        else if (type == GeometryType.GEOMETRY_COLLECTION) {\n            multiGeometry = new GeometryCollection(geometries);\n        }\n        else {\n            assert(false, 37); // Unknown geometry type found\n        }\n    }\n    else {\n        multiGeometry = new GeometryCollection(geometries);\n    }\n    return /** @type {import(\"../geom/Geometry.js\").default} */ (multiGeometry);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Point|undefined} Point.\n */\nfunction readPoint(node, objectStack) {\n    var properties = pushParseAndPop({}, EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatCoordinates = readFlatCoordinatesFromNode(node, objectStack);\n    if (flatCoordinates) {\n        var point = new Point(flatCoordinates, GeometryLayout.XYZ);\n        point.setProperties(properties, true);\n        return point;\n    }\n  
   else {\n        return undefined;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar FLAT_LINEAR_RINGS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'innerBoundaryIs': innerBoundaryIsParser,\n    'outerBoundaryIs': outerBoundaryIsParser,\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Polygon|undefined} Polygon.\n */\nfunction readPolygon(node, objectStack) {\n    var properties = pushParseAndPop(\n    /** @type {Object<string,*>} */ ({}), EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatLinearRings = pushParseAndPop([null], FLAT_LINEAR_RINGS_PARSERS, node, objectStack);\n    if (flatLinearRings && flatLinearRings[0]) {\n        var flatCoordinates = flatLinearRings[0];\n        var ends = [flatCoordinates.length];\n        for (var i = 1, ii = flatLinearRings.length; i < ii; ++i) {\n            extend(flatCoordinates, flatLinearRing
 s[i]);\n            ends.push(flatCoordinates.length);\n        }\n        var polygon = new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n        polygon.setProperties(properties, true);\n        return polygon;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'IconStyle': iconStyleParser,\n    'LabelStyle': labelStyleParser,\n    'LineStyle': lineStyleParser,\n    'PolyStyle': polyStyleParser,\n});\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<Style>} Style.\n */\nfunction readStyle(node, objectStack) {\n    var styleObject = pushParseAndPop({}, STYLE_PARSERS, node, objectStack, this);\n    if (!styleObject) {\n        return null;\n    }\n    var fillStyle = \n    /** @type {Fill} */\n    ('fillStyle' in styleObject\n        ? 
 styleObject['fillStyle']\n        : DEFAULT_FILL_STYLE);\n    var fill = /** @type {boolean|undefined} */ (styleObject['fill']);\n    if (fill !== undefined && !fill) {\n        fillStyle = null;\n    }\n    var imageStyle;\n    if ('imageStyle' in styleObject) {\n        if (styleObject['imageStyle'] != DEFAULT_NO_IMAGE_STYLE) {\n            imageStyle = styleObject['imageStyle'];\n        }\n    }\n    else {\n        imageStyle = DEFAULT_IMAGE_STYLE;\n    }\n    var textStyle = \n    /** @type {Text} */\n    ('textStyle' in styleObject\n        ? styleObject['textStyle']\n        : DEFAULT_TEXT_STYLE);\n    var strokeStyle = \n    /** @type {Stroke} */\n    ('strokeStyle' in styleObject\n        ? styleObject['strokeStyle']\n        : DEFAULT_STROKE_STYLE);\n    var outline = /** @type {boolean|undefined} */ (styleObject['outline']);\n    if (outline !== undefined && !outline) {\n        // if the polystyle specifies no outline two styles are needed,\n        // one for non-polyg
 on geometries where linestrings require a stroke\n        // and one for polygons where there should be no stroke\n        return [\n            new Style({\n                geometry: function (feature) {\n                    var geometry = feature.getGeometry();\n                    var type = geometry.getType();\n                    if (type === GeometryType.GEOMETRY_COLLECTION) {\n                        return new GeometryCollection(geometry\n                            .getGeometriesArrayRecursive()\n                            .filter(function (geometry) {\n                            var type = geometry.getType();\n                            return (type !== GeometryType.POLYGON &&\n                                type !== GeometryType.MULTI_POLYGON);\n                        }));\n                    }\n                    else if (type !== GeometryType.POLYGON &&\n                        type !== GeometryType.MULTI_POLYGON) {\n                        return geometry;\n    
                 }\n                },\n                fill: fillStyle,\n                image: imageStyle,\n                stroke: strokeStyle,\n                text: textStyle,\n                zIndex: undefined,\n            }),\n            new Style({\n                geometry: function (feature) {\n                    var geometry = feature.getGeometry();\n                    var type = geometry.getType();\n                    if (type === GeometryType.GEOMETRY_COLLECTION) {\n                        return new GeometryCollection(geometry\n                            .getGeometriesArrayRecursive()\n                            .filter(function (geometry) {\n                            var type = geometry.getType();\n                            return (type === GeometryType.POLYGON ||\n                                type === GeometryType.MULTI_POLYGON);\n                        }));\n                    }\n                    else if (type === GeometryType.POLYGON ||\n         
                type === GeometryType.MULTI_POLYGON) {\n                        return geometry;\n                    }\n                },\n                fill: fillStyle,\n                stroke: null,\n                zIndex: undefined,\n            }),\n        ];\n    }\n    return [\n        new Style({\n            fill: fillStyle,\n            image: imageStyle,\n            stroke: strokeStyle,\n            text: textStyle,\n            zIndex: undefined,\n        }),\n    ];\n}\n/**\n * Reads an array of geometries and creates arrays for common geometry\n * properties. Then sets them to the multi geometry.\n * @param {MultiPoint|MultiLineString|MultiPolygon} multiGeometry A multi-geometry.\n * @param {Array<import(\"../geom/Geometry.js\").default>} geometries List of geometries.\n */\nfunction setCommonGeometryProperties(multiGeometry, geometries) {\n    var ii = geometries.length;\n    var extrudes = new Array(geometries.length);\n    var tessellates = new Array(geometrie
 s.length);\n    var altitudeModes = new Array(geometries.length);\n    var hasExtrude, hasTessellate, hasAltitudeMode;\n    hasExtrude = false;\n    hasTessellate = false;\n    hasAltitudeMode = false;\n    for (var i = 0; i < ii; ++i) {\n        var geometry = geometries[i];\n        extrudes[i] = geometry.get('extrude');\n        tessellates[i] = geometry.get('tessellate');\n        altitudeModes[i] = geometry.get('altitudeMode');\n        hasExtrude = hasExtrude || extrudes[i] !== undefined;\n        hasTessellate = hasTessellate || tessellates[i] !== undefined;\n        hasAltitudeMode = hasAltitudeMode || altitudeModes[i];\n    }\n    if (hasExtrude) {\n        multiGeometry.set('extrude', extrudes);\n    }\n    if (hasTessellate) {\n        multiGeometry.set('tessellate', tessellates);\n    }\n    if (hasAltitudeMode) {\n        multiGeometry.set('altitudeMode', altitudeModes);\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n
  */\n// @ts-ignore\nvar DATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'displayName': makeObjectPropertySetter(readString),\n    'value': makeObjectPropertySetter(readString),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction dataParser(node, objectStack) {\n    var name = node.getAttribute('name');\n    parseNode(DATA_PARSERS, node, objectStack);\n    var featureObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    if (name && featureObject.displayName) {\n        featureObject[name] = {\n            value: featureObject.value,\n            displayName: featureObject.displayName,\n            toString: function () {\n                return featureObject.value;\n            },\n        };\n    }\n    else if (name !== null) {\n        featureObject[name] = featureObject.value;\n    }\n    else if (featureObject.displayName !== null) {\n        featureObject[featureObject.displayName] = featureObject.v
 alue;\n    }\n    delete featureObject['value'];\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EXTENDED_DATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Data': dataParser,\n    'SchemaData': schemaDataParser,\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction extendedDataParser(node, objectStack) {\n    parseNode(EXTENDED_DATA_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction regionParser(node, objectStack) {\n    parseNode(REGION_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PAIR_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Style': makeObjectPropertySetter(readStyle),\n    'key': makeObjectPropertySetter(readString),\n    'styleUrl': makeObjectPropertySetter(readURI),\n
 });\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction pairDataParser(node, objectStack) {\n    var pairObject = pushParseAndPop({}, PAIR_PARSERS, node, objectStack, this);\n    if (!pairObject) {\n        return;\n    }\n    var key = /** @type {string|undefined} */ (pairObject['key']);\n    if (key && key == 'normal') {\n        var styleUrl = /** @type {string|undefined} */ (pairObject['styleUrl']);\n        if (styleUrl) {\n            objectStack[objectStack.length - 1] = styleUrl;\n        }\n        var style = /** @type {Style} */ (pairObject['Style']);\n        if (style) {\n            objectStack[objectStack.length - 1] = style;\n        }\n    }\n}\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction placemarkStyleMapParser(node, objectStack) {\n    var styleMapValue = readStyleMapValue.call(this, node, objectStack);\n    if (!styleMapValue) {\n        return;\
 n    }\n    var placemarkObject = objectStack[objectStack.length - 1];\n    if (Array.isArray(styleMapValue)) {\n        placemarkObject['Style'] = styleMapValue;\n    }\n    else if (typeof styleMapValue === 'string') {\n        placemarkObject['styleUrl'] = styleMapValue;\n    }\n    else {\n        assert(false, 38); // `styleMapValue` has an unknown type\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SCHEMA_DATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'SimpleData': simpleDataParser,\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction schemaDataParser(node, objectStack) {\n    parseNode(SCHEMA_DATA_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction simpleDataParser(node, objectStack) {\n    var name = node.getAttribute('name');\n    if (name !== null) {\n        v
 ar data = readString(node);\n        var featureObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        featureObject[name] = data;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LAT_LON_ALT_BOX_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'altitudeMode': makeObjectPropertySetter(readString),\n    'minAltitude': makeObjectPropertySetter(readDecimal),\n    'maxAltitude': makeObjectPropertySetter(readDecimal),\n    'north': makeObjectPropertySetter(readDecimal),\n    'south': makeObjectPropertySetter(readDecimal),\n    'east': makeObjectPropertySetter(readDecimal),\n    'west': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction latLonAltBoxParser(node, objectStack) {\n    var object = pushParseAndPop({}, LAT_LON_ALT_BOX_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }
 \n    var regionObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var extent = [\n        parseFloat(object['west']),\n        parseFloat(object['south']),\n        parseFloat(object['east']),\n        parseFloat(object['north']),\n    ];\n    regionObject['extent'] = extent;\n    regionObject['altitudeMode'] = object['altitudeMode'];\n    regionObject['minAltitude'] = parseFloat(object['minAltitude']);\n    regionObject['maxAltitude'] = parseFloat(object['maxAltitude']);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LOD_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'minLodPixels': makeObjectPropertySetter(readDecimal),\n    'maxLodPixels': makeObjectPropertySetter(readDecimal),\n    'minFadeExtent': makeObjectPropertySetter(readDecimal),\n    'maxFadeExtent': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack
 .\n */\nfunction lodParser(node, objectStack) {\n    var object = pushParseAndPop({}, LOD_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var lodObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    lodObject['minLodPixels'] = parseFloat(object['minLodPixels']);\n    lodObject['maxLodPixels'] = parseFloat(object['maxLodPixels']);\n    lodObject['minFadeExtent'] = parseFloat(object['minFadeExtent']);\n    lodObject['maxFadeExtent'] = parseFloat(object['maxFadeExtent']);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar INNER_BOUNDARY_IS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LinearRing': makeReplacer(readFlatLinearRing),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction innerBoundaryIsParser(node, objectStack) {\n    /** @type {Array<number>|undefined} */\n    var flatLinearRing = pushParseAndPop(undefi
 ned, INNER_BOUNDARY_IS_PARSERS, node, objectStack);\n    if (flatLinearRing) {\n        var flatLinearRings = \n        /** @type {Array<Array<number>>} */\n        (objectStack[objectStack.length - 1]);\n        flatLinearRings.push(flatLinearRing);\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar OUTER_BOUNDARY_IS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LinearRing': makeReplacer(readFlatLinearRing),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction outerBoundaryIsParser(node, objectStack) {\n    /** @type {Array<number>|undefined} */\n    var flatLinearRing = pushParseAndPop(undefined, OUTER_BOUNDARY_IS_PARSERS, node, objectStack);\n    if (flatLinearRing) {\n        var flatLinearRings = \n        /** @type {Array<Array<number>>} */\n        (objectStack[objectStack.length - 1]);\n        flatLinearRings[0] = flatLinearRing;\n    }\n}\n/**\n 
 * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction linkParser(node, objectStack) {\n    parseNode(LINK_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction whenParser(node, objectStack) {\n    var gxTrackObject = \n    /** @type {GxTrackObject} */\n    (objectStack[objectStack.length - 1]);\n    var whens = gxTrackObject.whens;\n    var s = getAllTextContent(node, false);\n    var when = Date.parse(s);\n    whens.push(isNaN(when) ? 0 : when);\n}\n/**\n * @param {Node} node Node to append a TextNode with the color to.\n * @param {import(\"../color.js\").Color|string} color Color.\n */\nfunction writeColorTextNode(node, color) {\n    var rgba = asArray(color);\n    var opacity = rgba.length == 4 ? rgba[3] : 1;\n    /** @type {Array<string|number>} */\n    var abgr = [opacity * 255, rgba[2], rgba[1], rgba[0]];\n    for (var i = 0; i < 4; ++i) {\n        var hex = Math.f
 loor(/** @type {number} */ (abgr[i])).toString(16);\n        abgr[i] = hex.length == 1 ? '0' + hex : hex;\n    }\n    writeStringTextNode(node, abgr.join(''));\n}\n/**\n * @param {Node} node Node to append a TextNode with the coordinates to.\n * @param {Array<number>} coordinates Coordinates.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeCoordinatesTextNode(node, coordinates, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var layout = context['layout'];\n    var stride = context['stride'];\n    var dimension;\n    if (layout == GeometryLayout.XY || layout == GeometryLayout.XYM) {\n        dimension = 2;\n    }\n    else if (layout == GeometryLayout.XYZ || layout == GeometryLayout.XYZM) {\n        dimension = 3;\n    }\n    else {\n        assert(false, 34); // Invalid geometry layout\n    }\n    var ii = coordinates.length;\n    var text = '';\n    if (ii > 0) {\n        text += coordinates[0];\n        for (var d = 1; d < dimension
 ; ++d) {\n            text += ',' + coordinates[d];\n        }\n        for (var i = stride; i < ii; i += stride) {\n            text += ' ' + coordinates[i];\n            for (var d = 1; d < dimension; ++d) {\n                text += ',' + coordinates[i + d];\n            }\n        }\n    }\n    writeStringTextNode(node, text);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar EXTENDEDDATA_NODE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'Data': makeChildAppender(writeDataNode),\n    'value': makeChildAppender(writeDataNodeValue),\n    'displayName': makeChildAppender(writeDataNodeName),\n});\n/**\n * @param {Element} node Node.\n * @param {{name: *, value: *}} pair Name value pair.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeDataNode(node, pair, objectStack) {\n    node.setAttribute('name', pair.name);\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node
 : node };\n    var value = pair.value;\n    if (typeof value == 'object') {\n        if (value !== null && value.displayName) {\n            pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, [value.displayName], objectStack, ['displayName']);\n        }\n        if (value !== null && value.value) {\n            pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, [value.value], objectStack, ['value']);\n        }\n    }\n    else {\n        pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, [value], objectStack, ['value']);\n    }\n}\n/**\n * @param {Node} node Node to append a TextNode with the name to.\n * @param {string} name DisplayName.\n */\nfunction writeDataNodeName(node, name) {\n    writeCDATASection(node, name);\n}\n/**\n * @param {Node} node Node to append a CDATA Section with the value to.\n * @param {string} value Value.\n */\nfunction writeDataNodeValue(
 node, value) {\n    writeStringTextNode(node, value);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar DOCUMENT_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'Placemark': makeChildAppender(writePlacemark),\n});\n/**\n * @const\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nvar DOCUMENT_NODE_FACTORY = function (value, objectStack, opt_nodeName) {\n    var parentNode = objectStack[objectStack.length - 1].node;\n    return createElementNS(parentNode.namespaceURI, 'Placemark');\n};\n/**\n * @param {Node} node Node.\n * @param {Array<Feature>} features Features.\n * @param {Array<*>} objectStack Object stack.\n * @this {KML}\n */\nfunction writeDocument(node, features, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    pushSerializeAndPop(cont
 ext, DOCUMENT_SERIALIZERS, DOCUMENT_NODE_FACTORY, features, objectStack, undefined, this);\n}\n/**\n * A factory for creating Data nodes.\n * @const\n * @type {function(*, Array<*>): (Node|undefined)}\n */\nvar DATA_NODE_FACTORY = makeSimpleNodeFactory('Data');\n/**\n * @param {Node} node Node.\n * @param {{names: Array<string>, values: (Array<*>)}} namesAndValues Names and values.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeExtendedData(node, namesAndValues, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var names = namesAndValues.names;\n    var values = namesAndValues.values;\n    var length = names.length;\n    for (var i = 0; i < length; i++) {\n        pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, DATA_NODE_FACTORY, [{ name: names[i], value: values[i] }], objectStack);\n    }\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar ICON_SEQUENCE = makeS
 tructureNS(NAMESPACE_URIS, ['href'], makeStructureNS(GX_NAMESPACE_URIS, ['x', 'y', 'w', 'h']));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar ICON_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'href': makeChildAppender(writeStringTextNode),\n}, makeStructureNS(GX_NAMESPACE_URIS, {\n    'x': makeChildAppender(writeDecimalTextNode),\n    'y': makeChildAppender(writeDecimalTextNode),\n    'w': makeChildAppender(writeDecimalTextNode),\n    'h': makeChildAppender(writeDecimalTextNode),\n}));\n/**\n * @const\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nvar GX_NODE_FACTORY = function (value, objectStack, opt_nodeName) {\n    return createElementNS(GX_NAMESPACE_URIS[0], 'gx:' + opt_nodeName);\n};\n/**\n * @param {Node} node Node.\n * @param {Object} icon Icon object.\n * @param {Array<*>} objectSta
 ck Object stack.\n */\nfunction writeIcon(node, icon, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = ICON_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(icon, orderedKeys);\n    pushSerializeAndPop(context, ICON_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n    orderedKeys = ICON_SEQUENCE[GX_NAMESPACE_URIS[0]];\n    values = makeSequence(icon, orderedKeys);\n    pushSerializeAndPop(context, ICON_SERIALIZERS, GX_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar ICON_STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'scale',\n    'heading',\n    'Icon',\n    'color',\n    'hotSpot',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar IC
 ON_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'Icon': makeChildAppender(writeIcon),\n    'color': makeChildAppender(writeColorTextNode),\n    'heading': makeChildAppender(writeDecimalTextNode),\n    'hotSpot': makeChildAppender(writeVec2),\n    'scale': makeChildAppender(writeScaleTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {import(\"../style/Icon.js\").default} style Icon style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeIconStyle(node, style, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var /** @type {Object<string, any>} */ properties = {};\n    var src = style.getSrc();\n    var size = style.getSize();\n    var iconImageSize = style.getImageSize();\n    var iconProperties = {\n        'href': src,\n    };\n    if (size) {\n        iconProperties['w'] = size[0];\n        iconProperties['h'] = size[1];\n        var anchor = style.getAnchor(); // top-left\n        
 var origin_1 = style.getOrigin(); // top-left\n        if (origin_1 && iconImageSize && origin_1[0] !== 0 && origin_1[1] !== size[1]) {\n            iconProperties['x'] = origin_1[0];\n            iconProperties['y'] = iconImageSize[1] - (origin_1[1] + size[1]);\n        }\n        if (anchor && (anchor[0] !== size[0] / 2 || anchor[1] !== size[1] / 2)) {\n            var /** @type {Vec2} */ hotSpot = {\n                x: anchor[0],\n                xunits: IconAnchorUnits.PIXELS,\n                y: size[1] - anchor[1],\n                yunits: IconAnchorUnits.PIXELS,\n            };\n            properties['hotSpot'] = hotSpot;\n        }\n    }\n    properties['Icon'] = iconProperties;\n    var scale = style.getScale();\n    if (scale !== 1) {\n        properties['scale'] = scale;\n    }\n    var rotation = style.getRotation();\n    if (rotation !== 0) {\n        properties['heading'] = rotation; // 0-360\n    }\n    var color = style.getColor();\n    if (color) {\n        proper
 ties['color'] = color;\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = ICON_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, ICON_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar LABEL_STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'color',\n    'scale',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar LABEL_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeChildAppender(writeColorTextNode),\n    'scale': makeChildAppender(writeScaleTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {Text} style style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeLabelStyle(node, style, objectStack) {\n    var /** @typ
 e {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var properties = {};\n    var fill = style.getFill();\n    if (fill) {\n        properties['color'] = fill.getColor();\n    }\n    var scale = style.getScale();\n    if (scale && scale !== 1) {\n        properties['scale'] = scale;\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = LABEL_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, LABEL_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar LINE_STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, ['color', 'width']);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar LINE_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeChildAppender
 (writeColorTextNode),\n    'width': makeChildAppender(writeDecimalTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {Stroke} style style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeLineStyle(node, style, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var properties = {\n        'color': style.getColor(),\n        'width': Number(style.getWidth()) || 1,\n    };\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = LINE_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, LINE_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar GEOMETRY_TYPE_TO_NODENAME = {\n    'Point': 'Point',\n    'LineString': 'LineString',\n    'LinearRing': 'LinearRing',\n    'Polygon': 'Polygon',\n    'MultiPoint
 ': 'MultiGeometry',\n    'MultiLineString': 'MultiGeometry',\n    'MultiPolygon': 'MultiGeometry',\n    'GeometryCollection': 'MultiGeometry',\n};\n/**\n * @const\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nvar GEOMETRY_NODE_FACTORY = function (value, objectStack, opt_nodeName) {\n    if (value) {\n        var parentNode = objectStack[objectStack.length - 1].node;\n        return createElementNS(parentNode.namespaceURI, GEOMETRY_TYPE_TO_NODENAME[\n        /** @type {import(\"../geom/Geometry.js\").default} */ (value).getType()]);\n    }\n};\n/**\n * A factory for creating Point nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar POINT_NODE_FACTORY = makeSimpleNodeFactory('Point');\n/**\n * A factory for creating LineString nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar LINE_STRING_NODE_FAC
 TORY = makeSimpleNodeFactory('LineString');\n/**\n * A factory for creating LinearRing nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar LINEAR_RING_NODE_FACTORY = makeSimpleNodeFactory('LinearRing');\n/**\n * A factory for creating Polygon nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar POLYGON_NODE_FACTORY = makeSimpleNodeFactory('Polygon');\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar MULTI_GEOMETRY_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'LineString': makeChildAppender(writePrimitiveGeometry),\n    'Point': makeChildAppender(writePrimitiveGeometry),\n    'Polygon': makeChildAppender(writePolygon),\n    'GeometryCollection': makeChildAppender(writeMultiGeometry),\n});\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {Array<*>} objectStack Object stac
 k.\n */\nfunction writeMultiGeometry(node, geometry, objectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var context = { node: node };\n    var type = geometry.getType();\n    /** @type {Array<import(\"../geom/Geometry.js\").default>} */\n    var geometries = [];\n    /** @type {function(*, Array<*>, string=): (Node|undefined)} */\n    var factory;\n    if (type === GeometryType.GEOMETRY_COLLECTION) {\n        /** @type {GeometryCollection} */ (geometry)\n            .getGeometriesArrayRecursive()\n            .forEach(function (geometry) {\n            var type = geometry.getType();\n            if (type === GeometryType.MULTI_POINT) {\n                geometries = geometries.concat(\n                /** @type {MultiPoint} */ (geometry).getPoints());\n            }\n            else if (type === GeometryType.MULTI_LINE_STRING) {\n                geometries = geometries.concat(\n                /** @type {MultiLineString} */ (geometry).getLineStrings());\n   
          }\n            else if (type === GeometryType.MULTI_POLYGON) {\n                geometries = geometries.concat(\n                /** @type {MultiPolygon} */ (geometry).getPolygons());\n            }\n            else if (type === GeometryType.POINT ||\n                type === GeometryType.LINE_STRING ||\n                type === GeometryType.POLYGON) {\n                geometries.push(geometry);\n            }\n            else {\n                assert(false, 39); // Unknown geometry type\n            }\n        });\n        factory = GEOMETRY_NODE_FACTORY;\n    }\n    else if (type === GeometryType.MULTI_POINT) {\n        geometries = /** @type {MultiPoint} */ (geometry).getPoints();\n        factory = POINT_NODE_FACTORY;\n    }\n    else if (type === GeometryType.MULTI_LINE_STRING) {\n        geometries = /** @type {MultiLineString} */ (geometry).getLineStrings();\n        factory = LINE_STRING_NODE_FACTORY;\n    }\n    else if (type === GeometryType.MULTI_POLYGON) {\n 
        geometries = /** @type {MultiPolygon} */ (geometry).getPolygons();\n        factory = POLYGON_NODE_FACTORY;\n    }\n    else {\n        assert(false, 39); // Unknown geometry type\n    }\n    pushSerializeAndPop(context, MULTI_GEOMETRY_SERIALIZERS, factory, geometries, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar BOUNDARY_IS_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'LinearRing': makeChildAppender(writePrimitiveGeometry),\n});\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/LinearRing.js\").default} linearRing Linear ring.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeBoundaryIs(node, linearRing, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    pushSerializeAndPop(context, BOUNDARY_IS_SERIALIZERS, LINEAR_RING_NODE_FACTORY, [linearRing], objectStack);\n}\n/**\n * @const\n * @type {Obje
 ct<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar PLACEMARK_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'ExtendedData': makeChildAppender(writeExtendedData),\n    'MultiGeometry': makeChildAppender(writeMultiGeometry),\n    'LineString': makeChildAppender(writePrimitiveGeometry),\n    'LinearRing': makeChildAppender(writePrimitiveGeometry),\n    'Point': makeChildAppender(writePrimitiveGeometry),\n    'Polygon': makeChildAppender(writePolygon),\n    'Style': makeChildAppender(writeStyle),\n    'address': makeChildAppender(writeStringTextNode),\n    'description': makeChildAppender(writeStringTextNode),\n    'name': makeChildAppender(writeStringTextNode),\n    'open': makeChildAppender(writeBooleanTextNode),\n    'phoneNumber': makeChildAppender(writeStringTextNode),\n    'styleUrl': makeChildAppender(writeStringTextNode),\n    'visibility': makeChildAppender(writeBooleanTextNode),\n});\n/**\n * @const\n * @type {Object<string, Array<stri
 ng>>}\n */\n// @ts-ignore\nvar PLACEMARK_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'name',\n    'open',\n    'visibility',\n    'address',\n    'phoneNumber',\n    'description',\n    'styleUrl',\n    'Style',\n]);\n/**\n * A factory for creating ExtendedData nodes.\n * @const\n * @type {function(*, Array<*>): (Node|undefined)}\n */\nvar EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');\n/**\n * FIXME currently we do serialize arbitrary/custom feature properties\n * (ExtendedData).\n * @param {Element} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n * @this {KML}\n */\nfunction writePlacemark(node, feature, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    // set id\n    if (feature.getId()) {\n        node.setAttribute('id', /** @type {string} */ (feature.getId()));\n    }\n    // serialize properties (properties unknown to KML are not serialized)\n   
  var properties = feature.getProperties();\n    // don't export these to ExtendedData\n    var filter = {\n        'address': 1,\n        'description': 1,\n        'name': 1,\n        'open': 1,\n        'phoneNumber': 1,\n        'styleUrl': 1,\n        'visibility': 1,\n    };\n    filter[feature.getGeometryName()] = 1;\n    var keys = Object.keys(properties || {})\n        .sort()\n        .filter(function (v) {\n        return !filter[v];\n    });\n    var styleFunction = feature.getStyleFunction();\n    if (styleFunction) {\n        // FIXME the styles returned by the style function are supposed to be\n        // resolution-independent here\n        var styles = styleFunction(feature, 0);\n        if (styles) {\n            var styleArray = Array.isArray(styles) ? styles : [styles];\n            var pointStyles = styleArray;\n            if (feature.getGeometry()) {\n                pointStyles = styleArray.filter(function (style) {\n                    var geometry = style.ge
 tGeometryFunction()(feature);\n                    if (geometry) {\n                        var type = geometry.getType();\n                        if (type === GeometryType.GEOMETRY_COLLECTION) {\n                            return /** @type {GeometryCollection} */ (geometry)\n                                .getGeometriesArrayRecursive()\n                                .filter(function (geometry) {\n                                var type = geometry.getType();\n                                return (type === GeometryType.POINT ||\n                                    type === GeometryType.MULTI_POINT);\n                            }).length;\n                        }\n                        return (type === GeometryType.POINT || type === GeometryType.MULTI_POINT);\n                    }\n                });\n            }\n            if (this.writeStyles_) {\n                var lineStyles = styleArray;\n                var polyStyles = styleArray;\n                if (featur
 e.getGeometry()) {\n                    lineStyles = styleArray.filter(function (style) {\n                        var geometry = style.getGeometryFunction()(feature);\n                        if (geometry) {\n                            var type = geometry.getType();\n                            if (type === GeometryType.GEOMETRY_COLLECTION) {\n                                return /** @type {GeometryCollection} */ (geometry)\n                                    .getGeometriesArrayRecursive()\n                                    .filter(function (geometry) {\n                                    var type = geometry.getType();\n                                    return (type === GeometryType.LINE_STRING ||\n                                        type === GeometryType.MULTI_LINE_STRING);\n                                }).length;\n                            }\n                            return (type === GeometryType.LINE_STRING ||\n                                type === Geomet
 ryType.MULTI_LINE_STRING);\n                        }\n                    });\n                    polyStyles = styleArray.filter(function (style) {\n                        var geometry = style.getGeometryFunction()(feature);\n                        if (geometry) {\n                            var type = geometry.getType();\n                            if (type === GeometryType.GEOMETRY_COLLECTION) {\n                                return /** @type {GeometryCollection} */ (geometry)\n                                    .getGeometriesArrayRecursive()\n                                    .filter(function (geometry) {\n                                    var type = geometry.getType();\n                                    return (type === GeometryType.POLYGON ||\n                                        type === GeometryType.MULTI_POLYGON);\n                                }).length;\n                            }\n                            return (type === GeometryType.POLYGON ||\
 n                                type === GeometryType.MULTI_POLYGON);\n                        }\n                    });\n                }\n                properties['Style'] = {\n                    pointStyles: pointStyles,\n                    lineStyles: lineStyles,\n                    polyStyles: polyStyles,\n                };\n            }\n            if (pointStyles.length && properties['name'] === undefined) {\n                var textStyle = pointStyles[0].getText();\n                if (textStyle) {\n                    properties['name'] = textStyle.getText();\n                }\n            }\n        }\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = PLACEMARK_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, PLACEMARK_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n    if (keys.length > 0) {\n        var sequenc
 e = makeSequence(properties, keys);\n        var namesAndValues = { names: keys, values: sequence };\n        pushSerializeAndPop(context, PLACEMARK_SERIALIZERS, EXTENDEDDATA_NODE_FACTORY, [namesAndValues], objectStack);\n    }\n    // serialize geometry\n    var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n    var geometry = feature.getGeometry();\n    if (geometry) {\n        geometry = transformGeometryWithOptions(geometry, true, options);\n    }\n    pushSerializeAndPop(context, PLACEMARK_SERIALIZERS, GEOMETRY_NODE_FACTORY, [geometry], objectStack);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar PRIMITIVE_GEOMETRY_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'extrude',\n    'tessellate',\n    'altitudeMode',\n    'coordinates',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar PRIMITIVE_GEOMETRY_SERIALIZERS = makeStructureNS(NA
 MESPACE_URIS, {\n    'extrude': makeChildAppender(writeBooleanTextNode),\n    'tessellate': makeChildAppender(writeBooleanTextNode),\n    'altitudeMode': makeChildAppender(writeStringTextNode),\n    'coordinates': makeChildAppender(writeCoordinatesTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePrimitiveGeometry(node, geometry, objectStack) {\n    var flatCoordinates = geometry.getFlatCoordinates();\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    context['layout'] = geometry.getLayout();\n    context['stride'] = geometry.getStride();\n    // serialize properties (properties unknown to KML are not serialized)\n    var properties = geometry.getProperties();\n    properties.coordinates = flatCoordinates;\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = PRIMITIV
 E_GEOMETRY_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, PRIMITIVE_GEOMETRY_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar POLY_STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'color',\n    'fill',\n    'outline',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar POLYGON_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'outerBoundaryIs': makeChildAppender(writeBoundaryIs),\n    'innerBoundaryIs': makeChildAppender(writeBoundaryIs),\n});\n/**\n * A factory for creating innerBoundaryIs nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar INNER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('innerBoundaryIs');\n/**\n * A factory for creating outerBoundaryIs nodes.\n * @const
 \n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar OUTER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('outerBoundaryIs');\n/**\n * @param {Node} node Node.\n * @param {Polygon} polygon Polygon.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePolygon(node, polygon, objectStack) {\n    var linearRings = polygon.getLinearRings();\n    var outerRing = linearRings.shift();\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    // inner rings\n    pushSerializeAndPop(context, POLYGON_SERIALIZERS, INNER_BOUNDARY_NODE_FACTORY, linearRings, objectStack);\n    // outer ring\n    pushSerializeAndPop(context, POLYGON_SERIALIZERS, OUTER_BOUNDARY_NODE_FACTORY, [outerRing], objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar POLY_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeChildAppender(writeColorTextNode),\n   
  'fill': makeChildAppender(writeBooleanTextNode),\n    'outline': makeChildAppender(writeBooleanTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {Style} style Style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePolyStyle(node, style, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var fill = style.getFill();\n    var stroke = style.getStroke();\n    var properties = {\n        'color': fill ? fill.getColor() : undefined,\n        'fill': fill ? undefined : false,\n        'outline': stroke ? undefined : false,\n    };\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = POLY_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, POLY_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node to append a TextNode with the s
 cale to.\n * @param {number|undefined} scale Scale.\n */\nfunction writeScaleTextNode(node, scale) {\n    // the Math is to remove any excess decimals created by float arithmetic\n    writeDecimalTextNode(node, Math.round(scale * 1e6) / 1e6);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'IconStyle',\n    'LabelStyle',\n    'LineStyle',\n    'PolyStyle',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'IconStyle': makeChildAppender(writeIconStyle),\n    'LabelStyle': makeChildAppender(writeLabelStyle),\n    'LineStyle': makeChildAppender(writeLineStyle),\n    'PolyStyle': makeChildAppender(writePolyStyle),\n});\n/**\n * @param {Node} node Node.\n * @param {Object<string, Array<Style>>} styles Styles.\n * @param {Array<*>} objectStack Object stack.\n */\nfun
 ction writeStyle(node, styles, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var properties = {};\n    if (styles.pointStyles.length) {\n        var textStyle = styles.pointStyles[0].getText();\n        if (textStyle) {\n            properties['LabelStyle'] = textStyle;\n        }\n        var imageStyle = styles.pointStyles[0].getImage();\n        if (imageStyle &&\n            typeof ( /** @type {?} */(imageStyle).getSrc) === 'function') {\n            properties['IconStyle'] = imageStyle;\n        }\n    }\n    if (styles.lineStyles.length) {\n        var strokeStyle = styles.lineStyles[0].getStroke();\n        if (strokeStyle) {\n            properties['LineStyle'] = strokeStyle;\n        }\n    }\n    if (styles.polyStyles.length) {\n        var strokeStyle = styles.polyStyles[0].getStroke();\n        if (strokeStyle && !properties['LineStyle']) {\n            properties['LineStyle'] = strokeStyle;\n        }\n        
 properties['PolyStyle'] = styles.polyStyles[0];\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Element} node Node to append a TextNode with the Vec2 to.\n * @param {Vec2} vec2 Vec2.\n */\nfunction writeVec2(node, vec2) {\n    node.setAttribute('x', String(vec2.x));\n    node.setAttribute('y', String(vec2.y));\n    node.setAttribute('xunits', vec2.xunits);\n    node.setAttribute('yunits', vec2.yunits);\n}\nexport default KML;\n//# sourceMappingURL=KML.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n    
         function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/IGC\n */\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport TextFeature from './TextFeature.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * IGC altitude/z. One of 'barometric', 'gps', 'none'.\n * @enum {string}\n */\nvar IGCZ = {\n    BAROMETRIC: 'barometric',\n    GPS: 'gps',\n    NONE: 'none',\n};\n/**\n * @const\n * @type {RegExp}\n */\nvar B_RECORD_RE = /^B(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{5})([NS])(\\d{3})(\\d{5})([EW])([AV])(\\d
 {5})(\\d{5})/;\n/**\n * @const\n * @type {RegExp}\n */\nvar H_RECORD_RE = /^H.([A-Z]{3}).*?:(.*)/;\n/**\n * @const\n * @type {RegExp}\n */\nvar HFDTE_RECORD_RE = /^HFDTE(\\d{2})(\\d{2})(\\d{2})/;\n/**\n * A regular expression matching the newline characters `\\r\\n`, `\\r` and `\\n`.\n *\n * @const\n * @type {RegExp}\n */\nvar NEWLINE_RE = /\\r\\n|\\r|\\n/;\n/**\n * @typedef {Object} Options\n * @property {IGCZ|string} [altitudeMode='none'] Altitude mode. Possible\n * values are `'barometric'`, `'gps'`, and `'none'`.\n */\n/**\n * @classdesc\n * Feature format for `*.igc` flight recording files.\n *\n * As IGC sources contain a single feature,\n * {@link module:ol/format/IGC~IGC#readFeatures} will return the feature in an\n * array\n *\n * @api\n */\nvar IGC = /** @class */ (function (_super) {\n    __extends(IGC, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function IGC(opt_options) {\n        var _this = _super.call(this) || this;\n        var opt
 ions = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        /**\n         * @private\n         * @type {IGCZ}\n         */\n        _this.altitudeMode_ = options.altitudeMode\n            ? options.altitudeMode\n            : IGCZ.NONE;\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    IGC.prototype.readFeatureFromText = function (text, opt_options) {\n        var altitudeMode = this.altitudeMode_;\n        var lines = text.split(NEWLINE_RE);\n        /** @type {Object<string, string>} */\n        var properties = {};\n        var flatCoordinates = [];\n        var year = 2000;\n        var month = 0;\n        var day = 1;\n        var lastDateTime = -1;
 \n        var i, ii;\n        for (i = 0, ii = lines.length; i < ii; ++i) {\n            var line = lines[i];\n            var m = void 0;\n            if (line.charAt(0) == 'B') {\n                m = B_RECORD_RE.exec(line);\n                if (m) {\n                    var hour = parseInt(m[1], 10);\n                    var minute = parseInt(m[2], 10);\n                    var second = parseInt(m[3], 10);\n                    var y = parseInt(m[4], 10) + parseInt(m[5], 10) / 60000;\n                    if (m[6] == 'S') {\n                        y = -y;\n                    }\n                    var x = parseInt(m[7], 10) + parseInt(m[8], 10) / 60000;\n                    if (m[9] == 'W') {\n                        x = -x;\n                    }\n                    flatCoordinates.push(x, y);\n                    if (altitudeMode != IGCZ.NONE) {\n                        var z = void 0;\n                        if (altitudeMode == IGCZ.GPS) {\n                            z = par
 seInt(m[11], 10);\n                        }\n                        else if (altitudeMode == IGCZ.BAROMETRIC) {\n                            z = parseInt(m[12], 10);\n                        }\n                        else {\n                            z = 0;\n                        }\n                        flatCoordinates.push(z);\n                    }\n                    var dateTime = Date.UTC(year, month, day, hour, minute, second);\n                    // Detect UTC midnight wrap around.\n                    if (dateTime < lastDateTime) {\n                        dateTime = Date.UTC(year, month, day + 1, hour, minute, second);\n                    }\n                    flatCoordinates.push(dateTime / 1000);\n                    lastDateTime = dateTime;\n                }\n            }\n            else if (line.charAt(0) == 'H') {\n                m = HFDTE_RECORD_RE.exec(line);\n                if (m) {\n                    day = parseInt(m[1], 10);\n                
     month = parseInt(m[2], 10) - 1;\n                    year = 2000 + parseInt(m[3], 10);\n                }\n                else {\n                    m = H_RECORD_RE.exec(line);\n                    if (m) {\n                        properties[m[1]] = m[2].trim();\n                    }\n                }\n            }\n        }\n        if (flatCoordinates.length === 0) {\n            return null;\n        }\n        var layout = altitudeMode == IGCZ.NONE ? GeometryLayout.XYM : GeometryLayout.XYZM;\n        var lineString = new LineString(flatCoordinates, layout);\n        var feature = new Feature(transformGeometryWithOptions(lineString, false, opt_options));\n        feature.setProperties(properties, true);\n        return feature;\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    IGC.prototype.readFeaturesFromText =
  function (text, opt_options) {\n        var feature = this.readFeatureFromText(text, opt_options);\n        if (feature) {\n            return [feature];\n        }\n        else {\n            return [];\n        }\n    };\n    return IGC;\n}(TextFeature));\nexport default IGC;\n//# sourceMappingURL=IGC.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/OSMXML\n */\n// FIXME add typedef for stack state object
 s\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport XMLFeature from './XMLFeature.js';\nimport { extend } from '../array.js';\nimport { get as getProjection } from '../proj.js';\nimport { isEmpty } from '../obj.js';\nimport { makeStructureNS, pushParseAndPop } from '../xml.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @const\n * @type {Array<null>}\n */\nvar NAMESPACE_URIS = [null];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar WAY_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'nd': readNd,\n    'tag': readTag,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'node': readNode,\n    'way
 ': readWay,\n});\n/**\n * @classdesc\n * Feature format for reading data in the\n * [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML).\n *\n * @api\n */\nvar OSMXML = /** @class */ (function (_super) {\n    __extends(OSMXML, _super);\n    function OSMXML() {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    OSMXML.prototype.readFeaturesFromNode = function (node, opt_options) {\n        var options = this.getReadOptions(node, opt_options);\n        if (node.localName == 'osm') {\n            var state = pushParseAndPop({\n                nodes: {},\n                ways: [],\n      
           features: [],\n            }, PARSERS, node, [options]);\n            // parse nodes in ways\n            for (var j = 0; j < state.ways.length; j++) {\n                var values = /** @type {Object} */ (state.ways[j]);\n                /** @type {Array<number>} */\n                var flatCoordinates = [];\n                for (var i = 0, ii = values.ndrefs.length; i < ii; i++) {\n                    var point = state.nodes[values.ndrefs[i]];\n                    extend(flatCoordinates, point);\n                }\n                var geometry = void 0;\n                if (values.ndrefs[0] == values.ndrefs[values.ndrefs.length - 1]) {\n                    // closed way\n                    geometry = new Polygon(flatCoordinates, GeometryLayout.XY, [\n                        flatCoordinates.length,\n                    ]);\n                }\n                else {\n                    geometry = new LineString(flatCoordinates, GeometryLayout.XY);\n                }\n    
             transformGeometryWithOptions(geometry, false, options);\n                var feature = new Feature(geometry);\n                feature.setId(values.id);\n                feature.setProperties(values.tags, true);\n                state.features.push(feature);\n            }\n            if (state.features) {\n                return state.features;\n            }\n        }\n        return [];\n    };\n    return OSMXML;\n}(XMLFeature));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar NODE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'tag': readTag,\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readNode(node, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n    var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var id = node.getAttribute('id');\n    /** @type {impo
 rt(\"../coordinate.js\").Coordinate} */\n    var coordinates = [\n        parseFloat(node.getAttribute('lon')),\n        parseFloat(node.getAttribute('lat')),\n    ];\n    state.nodes[id] = coordinates;\n    var values = pushParseAndPop({\n        tags: {},\n    }, NODE_PARSERS, node, objectStack);\n    if (!isEmpty(values.tags)) {\n        var geometry = new Point(coordinates);\n        transformGeometryWithOptions(geometry, false, options);\n        var feature = new Feature(geometry);\n        feature.setId(id);\n        feature.setProperties(values.tags, true);\n        state.features.push(feature);\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readWay(node, objectStack) {\n    var id = node.getAttribute('id');\n    var values = pushParseAndPop({\n        id: id,\n        ndrefs: [],\n        tags: {},\n    }, WAY_PARSERS, node, objectStack);\n    var state = /** @type {Object} */ (objectStack[objectStack.length - 1
 ]);\n    state.ways.push(values);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readNd(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    values.ndrefs.push(node.getAttribute('ref'));\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readTag(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    values.tags[node.getAttribute('k')] = node.getAttribute('v');\n}\nexport default OSMXML;\n//# sourceMappingURL=OSMXML.js.map","/**\n * @module ol/geom/flat/flip\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<number>=} opt_dest Destination.\n * @param {number=} opt_destOffset Destination offset.\n * @return {Array<number>} Flat coordinates.\n *
 /\nexport function flipXY(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {\n    var dest, destOffset;\n    if (opt_dest !== undefined) {\n        dest = opt_dest;\n        destOffset = opt_destOffset !== undefined ? opt_destOffset : 0;\n    }\n    else {\n        dest = [];\n        destOffset = 0;\n    }\n    var j = offset;\n    while (j < end) {\n        var x = flatCoordinates[j++];\n        dest[destOffset++] = flatCoordinates[j++];\n        dest[destOffset++] = x;\n        for (var k = 2; k < stride; ++k) {\n            dest[destOffset++] = flatCoordinates[j++];\n        }\n    }\n    dest.length = destOffset;\n    return dest;\n}\n//# sourceMappingURL=flip.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.
 hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/Polyline\n */\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport TextFeature from './TextFeature.js';\nimport { assert } from '../asserts.js';\nimport { flipXY } from '../geom/flat/flip.js';\nimport { get as getProjection } from '../proj.js';\nimport { getStrideForLayout } from '../geom/SimpleGeometry.js';\nimport { inflateCoordinates } from '../geom/flat/inflate.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {Object} Options\n * @property {number} [factor=1e5] The factor by which the coordinates values will be scaled.\n * @pr
 operty {GeometryLayout} [geometryLayout='XY'] Layout of the\n * feature geometries created by the format reader.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the Encoded\n * Polyline Algorithm Format.\n *\n * When reading features, the coordinates are assumed to be in two dimensions\n * and in [latitude, longitude] order.\n *\n * As Polyline sources contain a single feature,\n * {@link module:ol/format/Polyline~Polyline#readFeatures} will return the\n * feature in an array.\n *\n * @api\n */\nvar Polyline = /** @class */ (function (_super) {\n    __extends(Polyline, _super);\n    /**\n     * @param {Options=} opt_options Optional configuration object.\n     */\n    function Polyline(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n       
  /**\n         * @private\n         * @type {number}\n         */\n        _this.factor_ = options.factor ? options.factor : 1e5;\n        /**\n         * @private\n         * @type {import(\"../geom/GeometryLayout\").default}\n         */\n        _this.geometryLayout_ = options.geometryLayout\n            ? options.geometryLayout\n            : GeometryLayout.XY;\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    Polyline.prototype.readFeatureFromText = function (text, opt_options) {\n        var geometry = this.readGeometryFromText(text, opt_options);\n        return new Feature(geometry);\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n   
   */\n    Polyline.prototype.readFeaturesFromText = function (text, opt_options) {\n        var feature = this.readFeatureFromText(text, opt_options);\n        return [feature];\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    Polyline.prototype.readGeometryFromText = function (text, opt_options) {\n        var stride = getStrideForLayout(this.geometryLayout_);\n        var flatCoordinates = decodeDeltas(text, stride, this.factor_);\n        flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);\n        var coordinates = inflateCoordinates(flatCoordinates, 0, flatCoordinates.length, stride);\n        var lineString = new LineString(coordinates, this.geometryLayout_);\n        return transformGeometryWithOptions(lineString, false, this.adaptOptions(opt_options));\n    };\n    /**
 \n     * @param {import(\"../Feature.js\").default} feature Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    Polyline.prototype.writeFeatureText = function (feature, opt_options) {\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            return this.writeGeometryText(geometry, opt_options);\n        }\n        else {\n            assert(false, 40); // Expected `feature` to have a geometry\n            return '';\n        }\n    };\n    /**\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    Polyline.prototype.writeFeaturesText = function (features, opt_options) {\n        return this.writeFeatureText(features[0], opt_options);\n    };\n    /**\n     * @param {LineString} geometry 
 Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    Polyline.prototype.writeGeometryText = function (geometry, opt_options) {\n        geometry =\n            /** @type {LineString} */\n            (transformGeometryWithOptions(geometry, true, this.adaptOptions(opt_options)));\n        var flatCoordinates = geometry.getFlatCoordinates();\n        var stride = geometry.getStride();\n        flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);\n        return encodeDeltas(flatCoordinates, stride, this.factor_);\n    };\n    return Polyline;\n}(TextFeature));\n/**\n * Encode a list of n-dimensional points and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of n-dimensional points.\n * @param {number} stride The number of dimension of the points in the list.\n * @param {numbe
 r=} opt_factor The factor by which the numbers will be\n *     multiplied. The remaining decimal places will get rounded away.\n *     Default is `1e5`.\n * @return {string} The encoded string.\n * @api\n */\nexport function encodeDeltas(numbers, stride, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    var d;\n    var lastNumbers = new Array(stride);\n    for (d = 0; d < stride; ++d) {\n        lastNumbers[d] = 0;\n    }\n    for (var i = 0, ii = numbers.length; i < ii;) {\n        for (d = 0; d < stride; ++d, ++i) {\n            var num = numbers[i];\n            var delta = num - lastNumbers[d];\n            lastNumbers[d] = num;\n            numbers[i] = delta;\n        }\n    }\n    return encodeFloats(numbers, factor);\n}\n/**\n * Decode a list of n-dimensional points from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @param {number} stride The number of dimension of the points in the\n *     encoded string.\n * @param {number=} opt
 _factor The factor by which the resulting numbers will\n *     be divided. Default is `1e5`.\n * @return {Array<number>} A list of n-dimensional points.\n * @api\n */\nexport function decodeDeltas(encoded, stride, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    var d;\n    /** @type {Array<number>} */\n    var lastNumbers = new Array(stride);\n    for (d = 0; d < stride; ++d) {\n        lastNumbers[d] = 0;\n    }\n    var numbers = decodeFloats(encoded, factor);\n    for (var i = 0, ii = numbers.length; i < ii;) {\n        for (d = 0; d < stride; ++d, ++i) {\n            lastNumbers[d] += numbers[i];\n            numbers[i] = lastNumbers[d];\n        }\n    }\n    return numbers;\n}\n/**\n * Encode a list of floating point numbers and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of floating point numbers.\n * @param {number=} opt_factor The factor by which the numbers will be
 \n *     multiplied. The remaining decimal places will get rounded away.\n *     Default is `1e5`.\n * @return {string} The encoded string.\n * @api\n */\nexport function encodeFloats(numbers, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        numbers[i] = Math.round(numbers[i] * factor);\n    }\n    return encodeSignedIntegers(numbers);\n}\n/**\n * Decode a list of floating point numbers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @param {number=} opt_factor The factor by which the result will be divided.\n *     Default is `1e5`.\n * @return {Array<number>} A list of floating point numbers.\n * @api\n */\nexport function decodeFloats(encoded, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    var numbers = decodeSignedIntegers(encoded);\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        numbers[i] /= factor;\n    }\n    return numbers;\n}\
 n/**\n * Encode a list of signed integers and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of signed integers.\n * @return {string} The encoded string.\n */\nexport function encodeSignedIntegers(numbers) {\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        var num = numbers[i];\n        numbers[i] = num < 0 ? ~(num << 1) : num << 1;\n    }\n    return encodeUnsignedIntegers(numbers);\n}\n/**\n * Decode a list of signed integers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @return {Array<number>} A list of signed integers.\n */\nexport function decodeSignedIntegers(encoded) {\n    var numbers = decodeUnsignedIntegers(encoded);\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        var num = numbers[i];\n        numbers[i] = num & 1 ? ~(num >> 1) : num >> 1;\n    }\n    return numbers;\n}\n/**\n * Encode a list of unsigned integers and ret
 urn an encoded string\n *\n * @param {Array<number>} numbers A list of unsigned integers.\n * @return {string} The encoded string.\n */\nexport function encodeUnsignedIntegers(numbers) {\n    var encoded = '';\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        encoded += encodeUnsignedInteger(numbers[i]);\n    }\n    return encoded;\n}\n/**\n * Decode a list of unsigned integers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @return {Array<number>} A list of unsigned integers.\n */\nexport function decodeUnsignedIntegers(encoded) {\n    var numbers = [];\n    var current = 0;\n    var shift = 0;\n    for (var i = 0, ii = encoded.length; i < ii; ++i) {\n        var b = encoded.charCodeAt(i) - 63;\n        current |= (b & 0x1f) << shift;\n        if (b < 0x20) {\n            numbers.push(current);\n            current = 0;\n            shift = 0;\n        }\n        else {\n            shift += 5;\n        }\n    }\n    return numbers;\n}\
 n/**\n * Encode one single unsigned integer and return an encoded string\n *\n * @param {number} num Unsigned integer that should be encoded.\n * @return {string} The encoded string.\n */\nexport function encodeUnsignedInteger(num) {\n    var value, encoded = '';\n    while (num >= 0x20) {\n        value = (0x20 | (num & 0x1f)) + 63;\n        encoded += String.fromCharCode(value);\n        num >>= 5;\n    }\n    value = num + 63;\n    encoded += String.fromCharCode(value);\n    return encoded;\n}\nexport default Polyline;\n//# sourceMappingURL=Polyline.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStati
 cs(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/TopoJSON\n */\nimport Feature from '../Feature.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {import(\"topojson-specification\").Topology} TopoJSONTopology\n * @typedef {import(\"topojson-specification\").GeometryCollection} TopoJSONGeometryCollection\n * @typedef {import(\"topojson-specification\").GeometryObject} TopoJSONGeometry\n * @typedef {import(\"topojson-specifi
 cation\").Point} TopoJSONPoint\n * @typedef {import(\"topojson-specification\").MultiPoint} TopoJSONMultiPoint\n * @typedef {import(\"topojson-specification\").LineString} TopoJSONLineString\n * @typedef {import(\"topojson-specification\").MultiLineString} TopoJSONMultiLineString\n * @typedef {import(\"topojson-specification\").Polygon} TopoJSONPolygon\n * @typedef {import(\"topojson-specification\").MultiPolygon} TopoJSONMultiPolygon\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {string} [layerName] Set the name of the TopoJSON topology\n * `objects`'s children as feature property with the specified name. This means\n * that when set to `'layer'`, a topology like\n * ```\n * {\n *   \"type\": \"Topology\",\n *   \"objects\": {\n *     \"example\": {\n *       \"type\": \"GeometryCollection\",\n *       \"geometries\": []\n *     }\n *   }\n * }\n * ```\n * will result
  in features that have a property `'layer'` set to `'example'`.\n * When not set, no property will be added to features.\n * @property {Array<string>} [layers] Names of the TopoJSON topology's\n * `objects`'s children to read features from.  If not provided, features will\n * be read from all children.\n */\n/**\n * @classdesc\n * Feature format for reading data in the TopoJSON format.\n *\n * @api\n */\nvar TopoJSON = /** @class */ (function (_super) {\n    __extends(TopoJSON, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function TopoJSON(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.layerName_ = options.layerName;\n        /**\n         * @private\n         * @type {?Array<string>}\n         */\n        _this.layers_ = options.layers ? options.layers : null;\n        /**\n       
   * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection(options.dataProjection ? options.dataProjection : 'EPSG:4326');\n        return _this;\n    }\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    TopoJSON.prototype.readFeaturesFromObject = function (object, opt_options) {\n        if (object.type == 'Topology') {\n            var topoJSONTopology = /** @type {TopoJSONTopology} */ (object);\n            var transform = void 0, scale = null, translate = null;\n            if (topoJSONTopology['transform']) {\n                transform = topoJSONTopology['transform'];\n                scale = transform['scale'];\n                translate = transform['translate'];\n            }\n            var arcs = topoJSONTopology['arcs'];\n            if (transform) {\n               
  transformArcs(arcs, scale, translate);\n            }\n            /** @type {Array<Feature>} */\n            var features = [];\n            var topoJSONFeatures = topoJSONTopology['objects'];\n            var property = this.layerName_;\n            var feature = void 0;\n            for (var objectName in topoJSONFeatures) {\n                if (this.layers_ && this.layers_.indexOf(objectName) == -1) {\n                    continue;\n                }\n                if (topoJSONFeatures[objectName].type === 'GeometryCollection') {\n                    feature = /** @type {TopoJSONGeometryCollection} */ (topoJSONFeatures[objectName]);\n                    features.push.apply(features, readFeaturesFromGeometryCollection(feature, arcs, scale, translate, property, objectName, opt_options));\n                }\n                else {\n                    feature = /** @type {TopoJSONGeometry} */ (topoJSONFeatures[objectName]);\n                    features.push(readFeatureFromGeome
 try(feature, arcs, scale, translate, property, objectName, opt_options));\n                }\n            }\n            return features;\n        }\n        else {\n            return [];\n        }\n    };\n    /**\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    TopoJSON.prototype.readProjectionFromObject = function (object) {\n        return this.dataProjection;\n    };\n    return TopoJSON;\n}(JSONFeature));\n/**\n * @const\n * @type {Object<string, function(TopoJSONGeometry, Array, ...Array=): import(\"../geom/Geometry.js\").default>}\n */\nvar GEOMETRY_READERS = {\n    'Point': readPointGeometry,\n    'LineString': readLineStringGeometry,\n    'Polygon': readPolygonGeometry,\n    'MultiPoint': readMultiPointGeometry,\n    'MultiLineString': readMultiLineStringGeometry,\n    'MultiPolygon': readMultiPolygonGeometry,\n};\n/**\n * Concatenate arcs into a coordinate array.\n * @param {A
 rray<number>} indices Indices of arcs to concatenate.  Negative\n *     values indicate arcs need to be reversed.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs (already\n *     transformed).\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates array.\n */\nfunction concatenateArcs(indices, arcs) {\n    /** @type {Array<import(\"../coordinate.js\").Coordinate>} */\n    var coordinates = [];\n    var index, arc;\n    for (var i = 0, ii = indices.length; i < ii; ++i) {\n        index = indices[i];\n        if (i > 0) {\n            // splicing together arcs, discard last point\n            coordinates.pop();\n        }\n        if (index >= 0) {\n            // forward arc\n            arc = arcs[index];\n        }\n        else {\n            // reverse arc\n            arc = arcs[~index].slice().reverse();\n        }\n        coordinates.push.apply(coordinates, arc);\n    }\n    // provide fresh copies of coordinate arrays\n
     for (var j = 0, jj = coordinates.length; j < jj; ++j) {\n        coordinates[j] = coordinates[j].slice();\n    }\n    return coordinates;\n}\n/**\n * Create a point from a TopoJSON geometry object.\n *\n * @param {TopoJSONPoint} object TopoJSON object.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @return {Point} Geometry.\n */\nfunction readPointGeometry(object, scale, translate) {\n    var coordinates = object['coordinates'];\n    if (scale && translate) {\n        transformVertex(coordinates, scale, translate);\n    }\n    return new Point(coordinates);\n}\n/**\n * Create a multi-point from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiPoint} object TopoJSON object.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @return {MultiPoint} Geometry.\n */\nfunction readMultiPointGeometry(object, scale, tr
 anslate) {\n    var coordinates = object['coordinates'];\n    if (scale && translate) {\n        for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n            transformVertex(coordinates[i], scale, translate);\n        }\n    }\n    return new MultiPoint(coordinates);\n}\n/**\n * Create a linestring from a TopoJSON geometry object.\n *\n * @param {TopoJSONLineString} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {LineString} Geometry.\n */\nfunction readLineStringGeometry(object, arcs) {\n    var coordinates = concatenateArcs(object['arcs'], arcs);\n    return new LineString(coordinates);\n}\n/**\n * Create a multi-linestring from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiLineString} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {MultiLineString} Geometry.\n */\nfunction readMultiLineStringGeometry(object, arc
 s) {\n    var coordinates = [];\n    for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n        coordinates[i] = concatenateArcs(object['arcs'][i], arcs);\n    }\n    return new MultiLineString(coordinates);\n}\n/**\n * Create a polygon from a TopoJSON geometry object.\n *\n * @param {TopoJSONPolygon} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {Polygon} Geometry.\n */\nfunction readPolygonGeometry(object, arcs) {\n    var coordinates = [];\n    for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n        coordinates[i] = concatenateArcs(object['arcs'][i], arcs);\n    }\n    return new Polygon(coordinates);\n}\n/**\n * Create a multi-polygon from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiPolygon} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {MultiPolygon} Geometry.\n */\nfunction readMultiPolygonGe
 ometry(object, arcs) {\n    var coordinates = [];\n    for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n        // for each polygon\n        var polyArray = object['arcs'][i];\n        var ringCoords = [];\n        for (var j = 0, jj = polyArray.length; j < jj; ++j) {\n            // for each ring\n            ringCoords[j] = concatenateArcs(polyArray[j], arcs);\n        }\n        coordinates[i] = ringCoords;\n    }\n    return new MultiPolygon(coordinates);\n}\n/**\n * Create features from a TopoJSON GeometryCollection object.\n *\n * @param {TopoJSONGeometryCollection} collection TopoJSON Geometry\n *     object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @param {string|undefined} property Property to set the `GeometryCollection`'s parent\n *     object to.\n * @param {string} name Name of the `T
 opology`'s child object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {Array<Feature>} Array of features.\n */\nfunction readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {\n    var geometries = collection['geometries'];\n    var features = [];\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n        features[i] = readFeatureFromGeometry(geometries[i], arcs, scale, translate, property, name, opt_options);\n    }\n    return features;\n}\n/**\n * Create a feature from a TopoJSON geometry object.\n *\n * @param {TopoJSONGeometry} object TopoJSON geometry object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @param {string|undefined} property Property to set the `GeometryCollection`'s parent\n *     object to.\n
  * @param {string} name Name of the `Topology`'s child object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {Feature} Feature.\n */\nfunction readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {\n    var geometry;\n    var type = object.type;\n    var geometryReader = GEOMETRY_READERS[type];\n    if (type === 'Point' || type === 'MultiPoint') {\n        geometry = geometryReader(object, scale, translate);\n    }\n    else {\n        geometry = geometryReader(object, arcs);\n    }\n    var feature = new Feature();\n    feature.setGeometry(transformGeometryWithOptions(geometry, false, opt_options));\n    if (object.id !== undefined) {\n        feature.setId(object.id);\n    }\n    var properties = object.properties;\n    if (property) {\n        if (!properties) {\n            properties = {};\n        }\n        properties[property] = name;\n    }\n    if (properties) {\n        feature.setProperties(proper
 ties, true);\n    }\n    return feature;\n}\n/**\n * Apply a linear transform to array of arcs.  The provided array of arcs is\n * modified in place.\n *\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n */\nfunction transformArcs(arcs, scale, translate) {\n    for (var i = 0, ii = arcs.length; i < ii; ++i) {\n        transformArc(arcs[i], scale, translate);\n    }\n}\n/**\n * Apply a linear transform to an arc.  The provided arc is modified in place.\n *\n * @param {Array<import(\"../coordinate.js\").Coordinate>} arc Arc.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n */\nfunction transformArc(arc, scale, translate) {\n    var x = 0;\n    var y = 0;\n    for (var i = 0, ii = arc.length; i < ii; ++i) {\n        var vertex = arc[i];\n    
     x += vertex[0];\n        y += vertex[1];\n        vertex[0] = x;\n        vertex[1] = y;\n        transformVertex(vertex, scale, translate);\n    }\n}\n/**\n * Apply a linear transform to a vertex.  The provided vertex is modified in\n * place.\n *\n * @param {import(\"../coordinate.js\").Coordinate} vertex Vertex.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n */\nfunction transformVertex(vertex, scale, translate) {\n    vertex[0] = vertex[0] * scale[0] + translate[0];\n    vertex[1] = vertex[1] * scale[1] + translate[1];\n}\nexport default TopoJSON;\n//# sourceMappingURL=TopoJSON.js.map","/**\n * @module ol/format/filter/Filter\n */\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature filters.\n *\n * @abstract\n */\nvar Filter = /** @class */ (function () {\n    /**\n     * @param {!string} tagName The
  XML tag name for this filter.\n     */\n    function Filter(tagName) {\n        /**\n         * @private\n         * @type {!string}\n         */\n        this.tagName_ = tagName;\n    }\n    /**\n     * The XML tag name for a filter.\n     * @returns {!string} Name.\n     */\n    Filter.prototype.getTagName = function () {\n        return this.tagName_;\n    };\n    return Filter;\n}());\nexport default Filter;\n//# sourceMappingURL=Filter.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) :
  (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/LogicalNary\n */\nimport Filter from './Filter.js';\nimport { assert } from '../../asserts.js';\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature n-ary logical filters.\n *\n * @abstract\n */\nvar LogicalNary = /** @class */ (function (_super) {\n    __extends(LogicalNary, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {Array<import(\"./Filter.js\").default>} conditions Conditions.\n     */\n    function LogicalNary(tagName, conditions) {\n        var _this = _super.call(this, tagName) || this;\n        /**\n         * @type {Array<import(\"./Filter.js\").default>}\n         */\n        _this.conditions = conditions;\n        assert(_this.conditions.length >= 2, 57); // At least 2 conditions are required.\n        return _this;\n    }\n    return 
 LogicalNary;\n}(Filter));\nexport default LogicalNary;\n//# sourceMappingURL=LogicalNary.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/And\n */\nimport LogicalNary from './LogicalNary.js';\n/**\n * @classdesc\n * Represents a logical `<And>` operator between two or more filter conditions.\n *\n * @abstract\n */\nvar And = /** @class */ (function (_super) {\n    __extends(And, _super);\n    /**\n    
  * @param {...import(\"./Filter.js\").default} conditions Conditions.\n     */\n    function And(conditions) {\n        return _super.call(this, 'And', Array.prototype.slice.call(arguments)) || this;\n    }\n    return And;\n}(LogicalNary));\nexport default And;\n//# sourceMappingURL=And.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Bbox\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n 
 * Represents a `<BBOX>` operator to test whether a geometry-valued property\n * intersects a fixed bounding box\n *\n * @api\n */\nvar Bbox = /** @class */ (function (_super) {\n    __extends(Bbox, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../extent.js\").Extent} extent Extent.\n     * @param {string=} opt_srsName SRS name. No srsName attribute will be set\n     * on geometries when this is not provided.\n     */\n    function Bbox(geometryName, extent, opt_srsName) {\n        var _this = _super.call(this, 'BBOX') || this;\n        /**\n         * @type {!string}\n         */\n        _this.geometryName = geometryName;\n        /**\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.extent = extent;\n        if (extent.length !== 4) {\n            throw new Error('Expected an extent with four values ([minX, minY, maxX, maxY])');\n        }\n        /**\n         * @type {string|undefined}
 \n         */\n        _this.srsName = opt_srsName;\n        return _this;\n    }\n    return Bbox;\n}(Filter));\nexport default Bbox;\n//# sourceMappingURL=Bbox.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Spatial\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Represents a spatial operator
  to test whether a geometry-valued property\n * relates to a given geometry.\n *\n * @abstract\n */\nvar Spatial = /** @class */ (function (_super) {\n    __extends(Spatial, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string=} opt_srsName SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Spatial(tagName, geometryName, geometry, opt_srsName) {\n        var _this = _super.call(this, tagName) || this;\n        /**\n         * @type {!string}\n         */\n        _this.geometryName = geometryName || 'the_geom';\n        /**\n         * @type {import(\"../../geom/Geometry.js\").default}\n         */\n        _this.geometry = geometry;\n        /**\n         * @type {string|undefined}\n         */\n        _this.srsName = opt_s
 rsName;\n        return _this;\n    }\n    return Spatial;\n}(Filter));\nexport default Spatial;\n//# sourceMappingURL=Spatial.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Contains\n */\nimport Spatial from './Spatial.js';\n/**\n * @classdesc\n * Represents a `<Contains>` operator to test whether a geometry-valued property\n * contains a given geometry.\n * @api\n */\nvar Contains = /** @class */ (
 function (_super) {\n    __extends(Contains, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string=} opt_srsName SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Contains(geometryName, geometry, opt_srsName) {\n        return _super.call(this, 'Contains', geometryName, geometry, opt_srsName) || this;\n    }\n    return Contains;\n}(Spatial));\nexport default Contains;\n//# sourceMappingURL=Contains.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return
  function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Comparison\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature property comparison filters.\n *\n * @abstract\n */\nvar Comparison = /** @class */ (function (_super) {\n    __extends(Comparison, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {!string} propertyName Name of the context property to compare.\n     */\n    function Comparison(tagName, propertyName) {\n        var _this = _super.call(this, tagName) || this;\n        /**\n         * @type {!string}\n         */\n        _this.propertyName = propertyName;\n        return _this;\n    }\n    return Compa
 rison;\n}(Filter));\nexport default Comparison;\n//# sourceMappingURL=Comparison.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/During\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represents a `<During>` comparison operator.\n * @api\n */\nvar During = /** @class */ (function (_super) {\n    __extends(During, _super);\n    /**\n     * @param {!string} propertyName Name of t
 he context property to compare.\n     * @param {!string} begin The begin date in ISO-8601 format.\n     * @param {!string} end The end date in ISO-8601 format.\n     */\n    function During(propertyName, begin, end) {\n        var _this = _super.call(this, 'During', propertyName) || this;\n        /**\n         * @type {!string}\n         */\n        _this.begin = begin;\n        /**\n         * @type {!string}\n         */\n        _this.end = end;\n        return _this;\n    }\n    return During;\n}(Comparison));\nexport default During;\n//# sourceMappingURL=During.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n    
     extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/ComparisonBinary\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature property binary comparison filters.\n *\n * @abstract\n */\nvar ComparisonBinary = /** @class */ (function (_super) {\n    __extends(ComparisonBinary, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!(string|number)} expression The value to compare.\n     * @param {boolean=} opt_matchCase Case-sensitive?\n     */\n    function ComparisonBinary(tagName, propertyName, expression, opt_matchCase) {\n        var _this = _super.call(this
 , tagName, propertyName) || this;\n        /**\n         * @type {!(string|number)}\n         */\n        _this.expression = expression;\n        /**\n         * @type {boolean|undefined}\n         */\n        _this.matchCase = opt_matchCase;\n        return _this;\n    }\n    return ComparisonBinary;\n}(Comparison));\nexport default ComparisonBinary;\n//# sourceMappingURL=ComparisonBinary.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})(
 );\n/**\n * @module ol/format/filter/EqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsEqualTo>` comparison operator.\n * @api\n */\nvar EqualTo = /** @class */ (function (_super) {\n    __extends(EqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!(string|number)} expression The value to compare.\n     * @param {boolean=} opt_matchCase Case-sensitive?\n     */\n    function EqualTo(propertyName, expression, opt_matchCase) {\n        return _super.call(this, 'PropertyIsEqualTo', propertyName, expression, opt_matchCase) || this;\n    }\n    return EqualTo;\n}(ComparisonBinary));\nexport default EqualTo;\n//# sourceMappingURL=EqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && functi
 on (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/GreaterThan\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsGreaterThan>` comparison operator.\n * @api\n */\nvar GreaterThan = /** @class */ (function (_super) {\n    __extends(GreaterThan, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function GreaterThan(propertyName, expression) {\n        return _super.call(this, 'PropertyIsGreaterThan', propertyName, expression) || this;\n    }\n   
  return GreaterThan;\n}(ComparisonBinary));\nexport default GreaterThan;\n//# sourceMappingURL=GreaterThan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/GreaterThanOrEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.\n * @api\n */\nvar GreaterThanOrEqualTo = /** @class */ (function (_super) 
 {\n    __extends(GreaterThanOrEqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function GreaterThanOrEqualTo(propertyName, expression) {\n        return _super.call(this, 'PropertyIsGreaterThanOrEqualTo', propertyName, expression) || this;\n    }\n    return GreaterThanOrEqualTo;\n}(ComparisonBinary));\nexport default GreaterThanOrEqualTo;\n//# sourceMappingURL=GreaterThanOrEqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.const
 ructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Intersects\n */\nimport Spatial from './Spatial.js';\n/**\n * @classdesc\n * Represents a `<Intersects>` operator to test whether a geometry-valued property\n * intersects a given geometry.\n * @api\n */\nvar Intersects = /** @class */ (function (_super) {\n    __extends(Intersects, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string=} opt_srsName SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Intersects(geometryName, geometry, opt_srsName) {\n        return _super.call(this, 'Intersects', geometryName, geometry, opt_srsName) || this;\n    }\n    return Intersects;\n}(Spatial));\nexport default Intersects;\n//# sourceMappingURL=Int
 ersects.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/IsBetween\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsBetween>` comparison operator.\n * @api\n */\nvar IsBetween = /** @class */ (function (_super) {\n    __extends(IsBetween, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!numb
 er} lowerBoundary The lower bound of the range.\n     * @param {!number} upperBoundary The upper bound of the range.\n     */\n    function IsBetween(propertyName, lowerBoundary, upperBoundary) {\n        var _this = _super.call(this, 'PropertyIsBetween', propertyName) || this;\n        /**\n         * @type {!number}\n         */\n        _this.lowerBoundary = lowerBoundary;\n        /**\n         * @type {!number}\n         */\n        _this.upperBoundary = upperBoundary;\n        return _this;\n    }\n    return IsBetween;\n}(Comparison));\nexport default IsBetween;\n//# sourceMappingURL=IsBetween.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n
     return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/IsLike\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsLike>` comparison operator.\n * @api\n */\nvar IsLike = /** @class */ (function (_super) {\n    __extends(IsLike, _super);\n    /**\n     * [constructor description]\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!string} pattern Text pattern.\n     * @param {string=} opt_wildCard Pattern character which matches any sequence of\n     *    zero or more string characters. Default is '*'.\n     * @param {string=} opt_singleChar pattern character which matches any single\n     *    string character. Default is '.'.\n     * @param {string=} opt_escapeChar Escape character which can be used t
 o escape\n     *    the pattern characters. Default is '!'.\n     * @param {boolean=} opt_matchCase Case-sensitive?\n     */\n    function IsLike(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {\n        var _this = _super.call(this, 'PropertyIsLike', propertyName) || this;\n        /**\n         * @type {!string}\n         */\n        _this.pattern = pattern;\n        /**\n         * @type {!string}\n         */\n        _this.wildCard = opt_wildCard !== undefined ? opt_wildCard : '*';\n        /**\n         * @type {!string}\n         */\n        _this.singleChar = opt_singleChar !== undefined ? opt_singleChar : '.';\n        /**\n         * @type {!string}\n         */\n        _this.escapeChar = opt_escapeChar !== undefined ? opt_escapeChar : '!';\n        /**\n         * @type {boolean|undefined}\n         */\n        _this.matchCase = opt_matchCase;\n        return _this;\n    }\n    return IsLike;\n}(Comparison));\nexport default IsLike;\n
 //# sourceMappingURL=IsLike.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/IsNull\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsNull>` comparison operator.\n * @api\n */\nvar IsNull = /** @class */ (function (_super) {\n    __extends(IsNull, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     */\n   
  function IsNull(propertyName) {\n        return _super.call(this, 'PropertyIsNull', propertyName) || this;\n    }\n    return IsNull;\n}(Comparison));\nexport default IsNull;\n//# sourceMappingURL=IsNull.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/LessThan\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsLessThan>` comparison operator.\n
  * @api\n */\nvar LessThan = /** @class */ (function (_super) {\n    __extends(LessThan, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function LessThan(propertyName, expression) {\n        return _super.call(this, 'PropertyIsLessThan', propertyName, expression) || this;\n    }\n    return LessThan;\n}(ComparisonBinary));\nexport default LessThan;\n//# sourceMappingURL=LessThan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d
 ; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/LessThanOrEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsLessThanOrEqualTo>` comparison operator.\n * @api\n */\nvar LessThanOrEqualTo = /** @class */ (function (_super) {\n    __extends(LessThanOrEqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function LessThanOrEqualTo(propertyName, expression) {\n        return _super.call(this, 'PropertyIsLessThanOrEqualTo', propertyName, expression) || this;\n    }\n    return LessThanOrEqualTo;\n}(ComparisonBinary));\nexport default LessThanOrEqualTo;\n//# sourceMappingURL=LessThanOrEqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n 
        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Not\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n * Represents a logical `<Not>` operator for a filter condition.\n * @api\n */\nvar Not = /** @class */ (function (_super) {\n    __extends(Not, _super);\n    /**\n     * @param {!import(\"./Filter.js\").default} condition Filter condition.\n     */\n    function Not(condition) {\n        var _this = _super.call(this, 'Not') || this;\n        /**\n         * @type {!import(\"./Filter.js\").default}\n 
         */\n        _this.condition = condition;\n        return _this;\n    }\n    return Not;\n}(Filter));\nexport default Not;\n//# sourceMappingURL=Not.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/NotEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsNotEqualTo>` comparison operator.\n * @api\n */\nvar NotEqualTo = /** @class */ 
 (function (_super) {\n    __extends(NotEqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!(string|number)} expression The value to compare.\n     * @param {boolean=} opt_matchCase Case-sensitive?\n     */\n    function NotEqualTo(propertyName, expression, opt_matchCase) {\n        return _super.call(this, 'PropertyIsNotEqualTo', propertyName, expression, opt_matchCase) || this;\n    }\n    return NotEqualTo;\n}(ComparisonBinary));\nexport default NotEqualTo;\n//# sourceMappingURL=NotEqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        ex
 tendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Or\n */\nimport LogicalNary from './LogicalNary.js';\n/**\n * @classdesc\n * Represents a logical `<Or>` operator between two ore more filter conditions.\n * @api\n */\nvar Or = /** @class */ (function (_super) {\n    __extends(Or, _super);\n    /**\n     * @param {...import(\"./Filter.js\").default} conditions Conditions.\n     */\n    function Or(conditions) {\n        return _super.call(this, 'Or', Array.prototype.slice.call(arguments)) || this;\n    }\n    return Or;\n}(LogicalNary));\nexport default Or;\n//# sourceMappingURL=Or.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b
 ; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Within\n */\nimport Spatial from './Spatial.js';\n/**\n * @classdesc\n * Represents a `<Within>` operator to test whether a geometry-valued property\n * is within a given geometry.\n * @api\n */\nvar Within = /** @class */ (function (_super) {\n    __extends(Within, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string=} opt_srsName SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Within(geometryName, g
 eometry, opt_srsName) {\n        return _super.call(this, 'Within', geometryName, geometry, opt_srsName) || this;\n    }\n    return Within;\n}(Spatial));\nexport default Within;\n//# sourceMappingURL=Within.js.map","/**\n * @module ol/format/filter\n */\nimport And from './filter/And.js';\nimport Bbox from './filter/Bbox.js';\nimport Contains from './filter/Contains.js';\nimport During from './filter/During.js';\nimport EqualTo from './filter/EqualTo.js';\nimport GreaterThan from './filter/GreaterThan.js';\nimport GreaterThanOrEqualTo from './filter/GreaterThanOrEqualTo.js';\nimport Intersects from './filter/Intersects.js';\nimport IsBetween from './filter/IsBetween.js';\nimport IsLike from './filter/IsLike.js';\nimport IsNull from './filter/IsNull.js';\nimport LessThan from './filter/LessThan.js';\nimport LessThanOrEqualTo from './filter/LessThanOrEqualTo.js';\nimport Not from './filter/Not.js';\nimport NotEqualTo from './filter/NotEqualTo.js';\nimport Or from './filter/Or.js';\ni
 mport Within from './filter/Within.js';\n/**\n * Create a logical `<And>` operator between two or more filter conditions.\n *\n * @param {...import(\"./filter/Filter.js\").default} conditions Filter conditions.\n * @returns {!And} `<And>` operator.\n * @api\n */\nexport function and(conditions) {\n    var params = [null].concat(Array.prototype.slice.call(arguments));\n    return new (Function.prototype.bind.apply(And, params))();\n}\n/**\n * Create a logical `<Or>` operator between two or more filter conditions.\n *\n * @param {...import(\"./filter/Filter.js\").default} conditions Filter conditions.\n * @returns {!Or} `<Or>` operator.\n * @api\n */\nexport function or(conditions) {\n    var params = [null].concat(Array.prototype.slice.call(arguments));\n    return new (Function.prototype.bind.apply(Or, params))();\n}\n/**\n * Represents a logical `<Not>` operator for a filter condition.\n *\n * @param {!import(\"./filter/Filter.js\").default} condition Filter condition.\n * @returns
  {!Not} `<Not>` operator.\n * @api\n */\nexport function not(condition) {\n    return new Not(condition);\n}\n/**\n * Create a `<BBOX>` operator to test whether a geometry-valued property\n * intersects a fixed bounding box\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../extent.js\").Extent} extent Extent.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @returns {!Bbox} `<BBOX>` operator.\n * @api\n */\nexport function bbox(geometryName, extent, opt_srsName) {\n    return new Bbox(geometryName, extent, opt_srsName);\n}\n/**\n * Create a `<Contains>` operator to test whether a geometry-valued property\n * contains a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this i
 s not provided.\n * @returns {!Contains} `<Contains>` operator.\n * @api\n */\nexport function contains(geometryName, geometry, opt_srsName) {\n    return new Contains(geometryName, geometry, opt_srsName);\n}\n/**\n * Create a `<Intersects>` operator to test whether a geometry-valued property\n * intersects a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @returns {!Intersects} `<Intersects>` operator.\n * @api\n */\nexport function intersects(geometryName, geometry, opt_srsName) {\n    return new Intersects(geometryName, geometry, opt_srsName);\n}\n/**\n * Create a `<Within>` operator to test whether a geometry-valued property\n * is within a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.
 js\").default} geometry Geometry.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @returns {!Within} `<Within>` operator.\n * @api\n */\nexport function within(geometryName, geometry, opt_srsName) {\n    return new Within(geometryName, geometry, opt_srsName);\n}\n/**\n * Creates a `<PropertyIsEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!(string|number)} expression The value to compare.\n * @param {boolean=} opt_matchCase Case-sensitive?\n * @returns {!EqualTo} `<PropertyIsEqualTo>` operator.\n * @api\n */\nexport function equalTo(propertyName, expression, opt_matchCase) {\n    return new EqualTo(propertyName, expression, opt_matchCase);\n}\n/**\n * Creates a `<PropertyIsNotEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!(string|number)} expression The va
 lue to compare.\n * @param {boolean=} opt_matchCase Case-sensitive?\n * @returns {!NotEqualTo} `<PropertyIsNotEqualTo>` operator.\n * @api\n */\nexport function notEqualTo(propertyName, expression, opt_matchCase) {\n    return new NotEqualTo(propertyName, expression, opt_matchCase);\n}\n/**\n * Creates a `<PropertyIsLessThan>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!LessThan} `<PropertyIsLessThan>` operator.\n * @api\n */\nexport function lessThan(propertyName, expression) {\n    return new LessThan(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsLessThanOrEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.\n * @api\n */\nexport function lessThanOrEqualTo(pro
 pertyName, expression) {\n    return new LessThanOrEqualTo(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsGreaterThan>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!GreaterThan} `<PropertyIsGreaterThan>` operator.\n * @api\n */\nexport function greaterThan(propertyName, expression) {\n    return new GreaterThan(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.\n * @api\n */\nexport function greaterThanOrEqualTo(propertyName, expression) {\n    return new GreaterThanOrEqualTo(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsNull>` comparison operator to test whether a pro
 perty value\n * is null.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @returns {!IsNull} `<PropertyIsNull>` operator.\n * @api\n */\nexport function isNull(propertyName) {\n    return new IsNull(propertyName);\n}\n/**\n * Creates a `<PropertyIsBetween>` comparison operator to test whether an expression\n * value lies within a range given by a lower and upper bound (inclusive).\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} lowerBoundary The lower bound of the range.\n * @param {!number} upperBoundary The upper bound of the range.\n * @returns {!IsBetween} `<PropertyIsBetween>` operator.\n * @api\n */\nexport function between(propertyName, lowerBoundary, upperBoundary) {\n    return new IsBetween(propertyName, lowerBoundary, upperBoundary);\n}\n/**\n * Represents a `<PropertyIsLike>` comparison operator that matches a string property\n * value against a text pattern.\n *\n * @param {!string} pr
 opertyName Name of the context property to compare.\n * @param {!string} pattern Text pattern.\n * @param {string=} opt_wildCard Pattern character which matches any sequence of\n *    zero or more string characters. Default is '*'.\n * @param {string=} opt_singleChar pattern character which matches any single\n *    string character. Default is '.'.\n * @param {string=} opt_escapeChar Escape character which can be used to escape\n *    the pattern characters. Default is '!'.\n * @param {boolean=} opt_matchCase Case-sensitive?\n * @returns {!IsLike} `<PropertyIsLike>` operator.\n * @api\n */\nexport function like(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {\n    return new IsLike(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase);\n}\n/**\n * Create a `<During>` temporal operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!string} begin The begin date in ISO-8601
  format.\n * @param {!string} end The end date in ISO-8601 format.\n * @returns {!During} `<During>` operator.\n * @api\n */\nexport function during(propertyName, begin, end) {\n    return new During(propertyName, begin, end);\n}\n//# sourceMappingURL=filter.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WFS\n */\nimport GML2 from './GML2.js';\nimport GML3 from './GML3.js';\nimport GMLBase, { GMLNS } from '
 ./GMLBase.js';\nimport XMLFeature from './XMLFeature.js';\nimport { XML_SCHEMA_INSTANCE_URI, createElementNS, isDocument, makeArrayPusher, makeChildAppender, makeObjectPropertySetter, makeSimpleNodeFactory, parse, parseNode, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { and as andFilter, bbox as bboxFilter } from './filter.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { get as getProjection } from '../proj.js';\nimport { readNonNegativeInteger, readNonNegativeIntegerString, writeStringTextNode, } from './xsd.js';\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar FEATURE_COLLECTION_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'boundedBy': makeObjectPropertySetter(GMLBase.prototype.readGeometryElement, 'bounds'),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TRANSACTION_SUMMARY_PARSERS = {\n   
  'http://www.opengis.net/wfs': {\n        'totalInserted': makeObjectPropertySetter(readNonNegativeInteger),\n        'totalUpdated': makeObjectPropertySetter(readNonNegativeInteger),\n        'totalDeleted': makeObjectPropertySetter(readNonNegativeInteger),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TRANSACTION_RESPONSE_PARSERS = {\n    'http://www.opengis.net/wfs': {\n        'TransactionSummary': makeObjectPropertySetter(readTransactionSummary, 'transactionSummary'),\n        'InsertResults': makeObjectPropertySetter(readInsertResults, 'insertIds'),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar QUERY_SERIALIZERS = {\n    'http://www.opengis.net/wfs': {\n        'PropertyName': makeChildAppender(writeStringTextNode),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar TRANSACTION_SERIALIZERS = {\n    'http
 ://www.opengis.net/wfs': {\n        'Insert': makeChildAppender(writeFeature),\n        'Update': makeChildAppender(writeUpdate),\n        'Delete': makeChildAppender(writeDelete),\n        'Property': makeChildAppender(writeProperty),\n        'Native': makeChildAppender(writeNative),\n    },\n};\n/**\n * @typedef {Object} Options\n * @property {Object<string, string>|string} [featureNS] The namespace URI used for features.\n * @property {Array<string>|string} [featureType] The feature type to parse. Only used for read operations.\n * @property {GMLBase} [gmlFormat] The GML format to use to parse the response. Default is `ol/format/GML3`.\n * @property {string} [schemaLocation] Optional schemaLocation to use for serialization, this will override the default.\n */\n/**\n * @typedef {Object} WriteGetFeatureOptions\n * @property {string} featureNS The namespace URI used for features.\n * @property {string} featurePrefix The prefix for the feature namespace.\n * @property {Array<string
 >} featureTypes The feature type names.\n * @property {string} [srsName] SRS name. No srsName attribute will be set on\n * geometries when this is not provided.\n * @property {string} [handle] Handle.\n * @property {string} [outputFormat] Output format.\n * @property {number} [maxFeatures] Maximum number of features to fetch.\n * @property {string} [geometryName] Geometry name to use in a BBOX filter.\n * @property {Array<string>} [propertyNames] Optional list of property names to serialize.\n * @property {string} [viewParams] viewParams GeoServer vendor parameter.\n * @property {number} [startIndex] Start index to use for WFS paging. This is a\n * WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services.\n * @property {number} [count] Number of features to retrieve when paging. This is a\n * WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services. Please note that some\n * Web Feature Services have repurposed `maxfeatures` instead.\n * @property {import(\".
 ./extent.js\").Extent} [bbox] Extent to use for the BBOX filter.\n * @property {import(\"./filter/Filter.js\").default} [filter] Filter condition. See\n * {@link module:ol/format/Filter} for more information.\n * @property {string} [resultType] Indicates what response should be returned,\n * E.g. `hits` only includes the `numberOfFeatures` attribute in the response and no features.\n */\n/**\n * @typedef {Object} WriteTransactionOptions\n * @property {string} featureNS The namespace URI used for features.\n * @property {string} featurePrefix The prefix for the feature namespace.\n * @property {string} featureType The feature type name.\n * @property {string} [srsName] SRS name. No srsName attribute will be set on\n * geometries when this is not provided.\n * @property {string} [handle] Handle.\n * @property {boolean} [hasZ] Must be set to true if the transaction is for\n * a 3D layer. This will allow the Z coordinate to be included in the transaction.\n * @property {Array<Object>} n
 ativeElements Native elements. Currently not supported.\n * @property {import(\"./GMLBase.js\").Options} [gmlOptions] GML options for the WFS transaction writer.\n * @property {string} [version='1.1.0'] WFS version to use for the transaction. Can be either `1.0.0` or `1.1.0`.\n */\n/**\n * Number of features; bounds/extent.\n * @typedef {Object} FeatureCollectionMetadata\n * @property {number} numberOfFeatures\n * @property {import(\"../extent.js\").Extent} bounds\n */\n/**\n * Total deleted; total inserted; total updated; array of insert ids.\n * @typedef {Object} TransactionResponse\n * @property {number} totalDeleted\n * @property {number} totalInserted\n * @property {number} totalUpdated\n * @property {Array<string>} insertIds\n */\n/**\n * @type {string}\n */\nvar FEATURE_PREFIX = 'feature';\n/**\n * @type {string}\n */\nvar XMLNS = 'http://www.w3.org/2000/xmlns/';\n/**\n * @type {string}\n */\nvar OGCNS = 'http://www.opengis.net/ogc';\n/**\n * @type {string}\n */\nvar WFSNS = 
 'http://www.opengis.net/wfs';\n/**\n * @type {string}\n */\nvar FESNS = 'http://www.opengis.net/fes';\n/**\n * @type {Object<string, string>}\n */\nvar SCHEMA_LOCATIONS = {\n    '1.1.0': 'http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd',\n    '1.0.0': 'http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd',\n};\n/**\n * @const\n * @type {string}\n */\nvar DEFAULT_VERSION = '1.1.0';\n/**\n * @classdesc\n * Feature format for reading and writing data in the WFS format.\n * By default, supports WFS version 1.1.0. You can pass a GML format\n * as option if you want to read a WFS that contains GML2 (WFS 1.0.0).\n * Also see {@link module:ol/format/GMLBase~GMLBase} which is used by this format.\n *\n * @api\n */\nvar WFS = /** @class */ (function (_super) {\n    __extends(WFS, _super);\n    /**\n     * @param {Options=} opt_options Optional configuration object.\n     */\n    function WFS(opt_options) {\n        var _this = _super.call(this) || th
 is;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {Array<string>|string|undefined}\n         */\n        _this.featureType_ = options.featureType;\n        /**\n         * @private\n         * @type {Object<string, string>|string|undefined}\n         */\n        _this.featureNS_ = options.featureNS;\n        /**\n         * @private\n         * @type {GMLBase}\n         */\n        _this.gmlFormat_ = options.gmlFormat ? options.gmlFormat : new GML3();\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.schemaLocation_ = options.schemaLocation\n            ? options.schemaLocation\n            : SCHEMA_LOCATIONS[DEFAULT_VERSION];\n        return _this;\n    }\n    /**\n     * @return {Array<string>|string|undefined} featureType\n     */\n    WFS.prototype.getFeatureType = function () {\n        return this.featureType_;\n    };\n    /**\n     * @param {Array<string>|string|undefined} fea
 tureType Feature type(s) to parse.\n     */\n    WFS.prototype.setFeatureType = function (featureType) {\n        this.featureType_ = featureType;\n    };\n    /**\n     * @protected\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    WFS.prototype.readFeaturesFromNode = function (node, opt_options) {\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        var context = {\n            node: node,\n        };\n        assign(context, {\n            'featureType': this.featureType_,\n            'featureNS': this.featureNS_,\n        });\n        assign(context, this.getReadOptions(node, opt_options ? opt_options : {}));\n        var objectStack = [context];\n        this.gmlFormat_.FEATURE_COLLECTION_PARSERS[GMLNS]['featureMember'] = makeArrayPusher(GMLBase.prototype.readFeaturesInternal);\n        var features = pushParseAndPop([
 ], this.gmlFormat_.FEATURE_COLLECTION_PARSERS, node, objectStack, this.gmlFormat_);\n        if (!features) {\n            features = [];\n        }\n        return features;\n    };\n    /**\n     * Read transaction response of the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {TransactionResponse|undefined} Transaction response.\n     * @api\n     */\n    WFS.prototype.readTransactionResponse = function (source) {\n        if (!source) {\n            return undefined;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readTransactionResponseFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readTransactionResponseFromDocument(\n            /** @type {Document} */ (source));\n        }\n        else {\n            return this.readTransactionResponseFromNode(\n            /** @type {Element} */ (source));\n        }\n    
 };\n    /**\n     * Read feature collection metadata of the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {FeatureCollectionMetadata|undefined}\n     *     FeatureCollection metadata.\n     * @api\n     */\n    WFS.prototype.readFeatureCollectionMetadata = function (source) {\n        if (!source) {\n            return undefined;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFeatureCollectionMetadataFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readFeatureCollectionMetadataFromDocument(\n            /** @type {Document} */ (source));\n        }\n        else {\n            return this.readFeatureCollectionMetadataFromNode(\n            /** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {FeatureCollectionMetadata|undefined}\n     *     Feature
 Collection metadata.\n     */\n    WFS.prototype.readFeatureCollectionMetadataFromDocument = function (doc) {\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                return this.readFeatureCollectionMetadataFromNode(\n                /** @type {Element} */ (n));\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {FeatureCollectionMetadata|undefined}\n     *     FeatureCollection metadata.\n     */\n    WFS.prototype.readFeatureCollectionMetadataFromNode = function (node) {\n        var result = {};\n        var value = readNonNegativeIntegerString(node.getAttribute('numberOfFeatures'));\n        result['numberOfFeatures'] = value;\n        return pushParseAndPop(\n        /** @type {FeatureCollectionMetadata} */ (result), FEATURE_COLLECTION_PARSERS, node, [], this.gmlFormat_);\n    };\n    /**\n     * @param {Document
 } doc Document.\n     * @return {TransactionResponse|undefined} Transaction response.\n     */\n    WFS.prototype.readTransactionResponseFromDocument = function (doc) {\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                return this.readTransactionResponseFromNode(/** @type {Element} */ (n));\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {TransactionResponse|undefined} Transaction response.\n     */\n    WFS.prototype.readTransactionResponseFromNode = function (node) {\n        return pushParseAndPop(\n        /** @type {TransactionResponse} */ ({}), TRANSACTION_RESPONSE_PARSERS, node, []);\n    };\n    /**\n     * Encode format as WFS `GetFeature` and return the Node.\n     *\n     * @param {WriteGetFeatureOptions} options Options.\n     * @return {Node} Result.\n     * @api\n     */\n    WFS.prototype.write
 GetFeature = function (options) {\n        var node = createElementNS(WFSNS, 'GetFeature');\n        node.setAttribute('service', 'WFS');\n        node.setAttribute('version', '1.1.0');\n        var filter;\n        if (options) {\n            if (options.handle) {\n                node.setAttribute('handle', options.handle);\n            }\n            if (options.outputFormat) {\n                node.setAttribute('outputFormat', options.outputFormat);\n            }\n            if (options.maxFeatures !== undefined) {\n                node.setAttribute('maxFeatures', String(options.maxFeatures));\n            }\n            if (options.resultType) {\n                node.setAttribute('resultType', options.resultType);\n            }\n            if (options.startIndex !== undefined) {\n                node.setAttribute('startIndex', String(options.startIndex));\n            }\n            if (options.count !== undefined) {\n                node.setAttribute('count', String(option
 s.count));\n            }\n            if (options.viewParams !== undefined) {\n                node.setAttribute('viewParams', options.viewParams);\n            }\n            filter = options.filter;\n            if (options.bbox) {\n                assert(options.geometryName, 12); // `options.geometryName` must also be provided when `options.bbox` is set\n                var bbox = bboxFilter(\n                /** @type {string} */ (options.geometryName), options.bbox, options.srsName);\n                if (filter) {\n                    // if bbox and filter are both set, combine the two into a single filter\n                    filter = andFilter(filter, bbox);\n                }\n                else {\n                    filter = bbox;\n                }\n            }\n        }\n        node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', this.schemaLocation_);\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        var context = {\n            
 node: node,\n        };\n        assign(context, {\n            'srsName': options.srsName,\n            'featureNS': options.featureNS ? options.featureNS : this.featureNS_,\n            'featurePrefix': options.featurePrefix,\n            'geometryName': options.geometryName,\n            'filter': filter,\n            'propertyNames': options.propertyNames ? options.propertyNames : [],\n        });\n        assert(Array.isArray(options.featureTypes), 11); // `options.featureTypes` should be an Array\n        writeGetFeature(node, \n        /** @type {!Array<string>} */ (options.featureTypes), [context]);\n        return node;\n    };\n    /**\n     * Encode format as WFS `Transaction` and return the Node.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} inserts The features to insert.\n     * @param {Array<import(\"../Feature.js\").default>} updates The features to update.\n     * @param {Array<import(\"../Feature.js\").default>} deletes The features to delete.\n
      * @param {WriteTransactionOptions} options Write options.\n     * @return {Node} Result.\n     * @api\n     */\n    WFS.prototype.writeTransaction = function (inserts, updates, deletes, options) {\n        var objectStack = [];\n        var node = createElementNS(WFSNS, 'Transaction');\n        var version = options.version ? options.version : DEFAULT_VERSION;\n        var gmlVersion = version === '1.0.0' ? 2 : 3;\n        node.setAttribute('service', 'WFS');\n        node.setAttribute('version', version);\n        var baseObj;\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        var obj;\n        if (options) {\n            baseObj = options.gmlOptions ? options.gmlOptions : {};\n            if (options.handle) {\n                node.setAttribute('handle', options.handle);\n            }\n        }\n        var schemaLocation = SCHEMA_LOCATIONS[version];\n        node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', schemaLocation);\n        var f
 eaturePrefix = options.featurePrefix\n            ? options.featurePrefix\n            : FEATURE_PREFIX;\n        if (inserts) {\n            obj = assign({ node: node }, {\n                'featureNS': options.featureNS,\n                'featureType': options.featureType,\n                'featurePrefix': featurePrefix,\n                'gmlVersion': gmlVersion,\n                'hasZ': options.hasZ,\n                'srsName': options.srsName,\n            });\n            assign(obj, baseObj);\n            pushSerializeAndPop(obj, TRANSACTION_SERIALIZERS, makeSimpleNodeFactory('Insert'), inserts, objectStack);\n        }\n        if (updates) {\n            obj = assign({ node: node }, {\n                'featureNS': options.featureNS,\n                'featureType': options.featureType,\n                'featurePrefix': featurePrefix,\n                'gmlVersion': gmlVersion,\n                'hasZ': options.hasZ,\n                'srsName': options.srsName,\n            });\n
             assign(obj, baseObj);\n            pushSerializeAndPop(obj, TRANSACTION_SERIALIZERS, makeSimpleNodeFactory('Update'), updates, objectStack);\n        }\n        if (deletes) {\n            pushSerializeAndPop({\n                node: node,\n                'featureNS': options.featureNS,\n                'featureType': options.featureType,\n                'featurePrefix': featurePrefix,\n                'gmlVersion': gmlVersion,\n                'srsName': options.srsName,\n            }, TRANSACTION_SERIALIZERS, makeSimpleNodeFactory('Delete'), deletes, objectStack);\n        }\n        if (options.nativeElements) {\n            pushSerializeAndPop({\n                node: node,\n                'featureNS': options.featureNS,\n                'featureType': options.featureType,\n                'featurePrefix': featurePrefix,\n                'gmlVersion': gmlVersion,\n                'srsName': options.srsName,\n            }, TRANSACTION_SERIALIZERS, makeSimpleNodeF
 actory('Native'), options.nativeElements, objectStack);\n        }\n        return node;\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    WFS.prototype.readProjectionFromDocument = function (doc) {\n        for (var n = doc.firstChild; n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                return this.readProjectionFromNode(/** @type {Element} */ (n));\n            }\n        }\n        return null;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    WFS.prototype.readProjectionFromNode = function (node) {\n        if (node.firstElementChild && node.firstElementChild.firstElementChild) {\n            node = node.firstElementChild.firstElementChild;\n            for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n                if (!(n.childNodes.leng
 th === 0 ||\n                    (n.childNodes.length === 1 && n.firstChild.nodeType === 3))) {\n                    var objectStack = [{}];\n                    this.gmlFormat_.readGeometryElement(n, objectStack);\n                    return getProjection(objectStack.pop().srsName);\n                }\n            }\n        }\n        return null;\n    };\n    return WFS;\n}(XMLFeature));\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Transaction Summary.\n */\nfunction readTransactionSummary(node, objectStack) {\n    return pushParseAndPop({}, TRANSACTION_SUMMARY_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar OGC_FID_PARSERS = {\n    'http://www.opengis.net/ogc': {\n        'FeatureId': makeArrayPusher(function (node, objectStack) {\n            return node.getAttribute('fid');\n        }),\n    },\n};\n/**\n * @param {Element} n
 ode Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction fidParser(node, objectStack) {\n    parseNode(OGC_FID_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar INSERT_RESULTS_PARSERS = {\n    'http://www.opengis.net/wfs': {\n        'Feature': fidParser,\n    },\n};\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Insert results.\n */\nfunction readInsertResults(node, objectStack) {\n    return pushParseAndPop([], INSERT_RESULTS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeFeature(node, feature, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var featureType = context['featureType'];\n    var featureNS = context['featureNS'];\n    var 
 gmlVersion = context['gmlVersion'];\n    var child = createElementNS(featureNS, featureType);\n    node.appendChild(child);\n    if (gmlVersion === 2) {\n        GML2.prototype.writeFeatureElement(child, feature, objectStack);\n    }\n    else {\n        GML3.prototype.writeFeatureElement(child, feature, objectStack);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {number|string} fid Feature identifier.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeOgcFidFilter(node, fid, objectStack) {\n    var filter = createElementNS(OGCNS, 'Filter');\n    var child = createElementNS(OGCNS, 'FeatureId');\n    filter.appendChild(child);\n    child.setAttribute('fid', /** @type {string} */ (fid));\n    node.appendChild(filter);\n}\n/**\n * @param {string|undefined} featurePrefix The prefix of the feature.\n * @param {string} featureType The type of the feature.\n * @returns {string} The value of the typeName property.\n */\nfunction getTypeName(featurePrefix, featureType
 ) {\n    featurePrefix = featurePrefix ? featurePrefix : FEATURE_PREFIX;\n    var prefix = featurePrefix + ':';\n    // The featureType already contains the prefix.\n    if (featureType.indexOf(prefix) === 0) {\n        return featureType;\n    }\n    else {\n        return prefix + featureType;\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeDelete(node, feature, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    assert(feature.getId() !== undefined, 26); // Features must have an id set\n    var featureType = context['featureType'];\n    var featurePrefix = context['featurePrefix'];\n    var featureNS = context['featureNS'];\n    var typeName = getTypeName(featurePrefix, featureType);\n    node.setAttribute('typeName', typeName);\n    node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n    var fid = feature.getId();\
 n    if (fid !== undefined) {\n        writeOgcFidFilter(node, fid, objectStack);\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeUpdate(node, feature, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    assert(feature.getId() !== undefined, 27); // Features must have an id set\n    var featureType = context['featureType'];\n    var featurePrefix = context['featurePrefix'];\n    var featureNS = context['featureNS'];\n    var typeName = getTypeName(featurePrefix, featureType);\n    var geometryName = feature.getGeometryName();\n    node.setAttribute('typeName', typeName);\n    node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n    var fid = feature.getId();\n    if (fid !== undefined) {\n        var keys = feature.getKeys();\n        var values = [];\n        for (var i = 0, ii = keys.length; i < ii; i++) {\n          
   var value = feature.get(keys[i]);\n            if (value !== undefined) {\n                var name_1 = keys[i];\n                if (value &&\n                    typeof ( /** @type {?} */(value).getSimplifiedGeometry) === 'function') {\n                    name_1 = geometryName;\n                }\n                values.push({ name: name_1, value: value });\n            }\n        }\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */ ({\n            'gmlVersion': context['gmlVersion'],\n            node: node,\n            'hasZ': context['hasZ'],\n            'srsName': context['srsName'],\n        }), TRANSACTION_SERIALIZERS, makeSimpleNodeFactory('Property'), values, objectStack);\n        writeOgcFidFilter(node, fid, objectStack);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {Object} pair Property name and value.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeProperty(node, pair, objectStack) {\n    var name
  = createElementNS(WFSNS, 'Name');\n    var context = objectStack[objectStack.length - 1];\n    var gmlVersion = context['gmlVersion'];\n    node.appendChild(name);\n    writeStringTextNode(name, pair.name);\n    if (pair.value !== undefined && pair.value !== null) {\n        var value = createElementNS(WFSNS, 'Value');\n        node.appendChild(value);\n        if (pair.value &&\n            typeof ( /** @type {?} */(pair.value).getSimplifiedGeometry) ===\n                'function') {\n            if (gmlVersion === 2) {\n                GML2.prototype.writeGeometryElement(value, pair.value, objectStack);\n            }\n            else {\n                GML3.prototype.writeGeometryElement(value, pair.value, objectStack);\n            }\n        }\n        else {\n            writeStringTextNode(value, pair.value);\n        }\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {{vendorId: string, safeToIgnore: boolean, value: string}} nativeElement The native element.\n * 
 @param {Array<*>} objectStack Node stack.\n */\nfunction writeNative(node, nativeElement, objectStack) {\n    if (nativeElement.vendorId) {\n        node.setAttribute('vendorId', nativeElement.vendorId);\n    }\n    if (nativeElement.safeToIgnore !== undefined) {\n        node.setAttribute('safeToIgnore', String(nativeElement.safeToIgnore));\n    }\n    if (nativeElement.value !== undefined) {\n        writeStringTextNode(node, nativeElement.value);\n    }\n}\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar GETFEATURE_SERIALIZERS = {\n    'http://www.opengis.net/wfs': {\n        'Query': makeChildAppender(writeQuery),\n    },\n    'http://www.opengis.net/ogc': {\n        'During': makeChildAppender(writeDuringFilter),\n        'And': makeChildAppender(writeLogicalFilter),\n        'Or': makeChildAppender(writeLogicalFilter),\n        'Not': makeChildAppender(writeNotFilter),\n        'BBOX': makeChildAppender(writeBboxFilter),\n        'Con
 tains': makeChildAppender(writeContainsFilter),\n        'Intersects': makeChildAppender(writeIntersectsFilter),\n        'Within': makeChildAppender(writeWithinFilter),\n        'PropertyIsEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsNotEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsLessThan': makeChildAppender(writeComparisonFilter),\n        'PropertyIsLessThanOrEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsGreaterThan': makeChildAppender(writeComparisonFilter),\n        'PropertyIsGreaterThanOrEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsNull': makeChildAppender(writeIsNullFilter),\n        'PropertyIsBetween': makeChildAppender(writeIsBetweenFilter),\n        'PropertyIsLike': makeChildAppender(writeIsLikeFilter),\n    },\n};\n/**\n * @param {Element} node Node.\n * @param {string} featureType Feature type.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeQu
 ery(node, featureType, objectStack) {\n    var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var featurePrefix = context['featurePrefix'];\n    var featureNS = context['featureNS'];\n    var propertyNames = context['propertyNames'];\n    var srsName = context['srsName'];\n    var typeName;\n    // If feature prefix is not defined, we must not use the default prefix.\n    if (featurePrefix) {\n        typeName = getTypeName(featurePrefix, featureType);\n    }\n    else {\n        typeName = featureType;\n    }\n    node.setAttribute('typeName', typeName);\n    if (srsName) {\n        node.setAttribute('srsName', srsName);\n    }\n    if (featureNS) {\n        node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n    }\n    var item = /** @type {import(\"../xml.js\").NodeStackItem} */ (assign({}, context));\n    item.node = node;\n    pushSerializeAndPop(item, QUERY_SERIALIZERS, makeSimpleNodeFactory('PropertyName'), propertyNames, objectStack
 );\n    var filter = context['filter'];\n    if (filter) {\n        var child = createElementNS(OGCNS, 'Filter');\n        node.appendChild(child);\n        writeFilterCondition(child, filter, objectStack);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Filter.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeFilterCondition(node, filter, objectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var item = { node: node };\n    pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory(filter.getTagName()), [filter], objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Bbox.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeBboxFilter(node, filter, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    context['srsName'] = filter.srsName;\n    writeOgcPropertyName(node, filter.geometryName
 );\n    GML3.prototype.writeGeometryElement(node, filter.extent, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Contains.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeContainsFilter(node, filter, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    context['srsName'] = filter.srsName;\n    writeOgcPropertyName(node, filter.geometryName);\n    GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Intersects.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIntersectsFilter(node, filter, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    context['srsName'] = filter.srsName;\n    writeOgcPropertyName(node, filter.geometryName);\n    GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);\n}\n/**\n * @param {No
 de} node Node.\n * @param {import(\"./filter/Within.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeWithinFilter(node, filter, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    context['srsName'] = filter.srsName;\n    writeOgcPropertyName(node, filter.geometryName);\n    GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/During.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeDuringFilter(node, filter, objectStack) {\n    var valueReference = createElementNS(FESNS, 'ValueReference');\n    writeStringTextNode(valueReference, filter.propertyName);\n    node.appendChild(valueReference);\n    var timePeriod = createElementNS(GMLNS, 'TimePeriod');\n    node.appendChild(timePeriod);\n    var begin = createElementNS(GMLNS, 'begin');\n    timePeriod.appendChild(begin);\n    writeTime
 Instant(begin, filter.begin);\n    var end = createElementNS(GMLNS, 'end');\n    timePeriod.appendChild(end);\n    writeTimeInstant(end, filter.end);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/LogicalNary.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeLogicalFilter(node, filter, objectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var item = { node: node };\n    var conditions = filter.conditions;\n    for (var i = 0, ii = conditions.length; i < ii; ++i) {\n        var condition = conditions[i];\n        pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory(condition.getTagName()), [condition], objectStack);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Not.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeNotFilter(node, filter, objectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} *
 /\n    var item = { node: node };\n    var condition = filter.condition;\n    pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory(condition.getTagName()), [condition], objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"./filter/ComparisonBinary.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeComparisonFilter(node, filter, objectStack) {\n    if (filter.matchCase !== undefined) {\n        node.setAttribute('matchCase', filter.matchCase.toString());\n    }\n    writeOgcPropertyName(node, filter.propertyName);\n    writeOgcLiteral(node, '' + filter.expression);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/IsNull.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsNullFilter(node, filter, objectStack) {\n    writeOgcPropertyName(node, filter.propertyName);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/IsBetwe
 en.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsBetweenFilter(node, filter, objectStack) {\n    writeOgcPropertyName(node, filter.propertyName);\n    var lowerBoundary = createElementNS(OGCNS, 'LowerBoundary');\n    node.appendChild(lowerBoundary);\n    writeOgcLiteral(lowerBoundary, '' + filter.lowerBoundary);\n    var upperBoundary = createElementNS(OGCNS, 'UpperBoundary');\n    node.appendChild(upperBoundary);\n    writeOgcLiteral(upperBoundary, '' + filter.upperBoundary);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"./filter/IsLike.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsLikeFilter(node, filter, objectStack) {\n    node.setAttribute('wildCard', filter.wildCard);\n    node.setAttribute('singleChar', filter.singleChar);\n    node.setAttribute('escapeChar', filter.escapeChar);\n    if (filter.matchCase !== undefined) {\n        node.setAttribute('matchCase'
 , filter.matchCase.toString());\n    }\n    writeOgcPropertyName(node, filter.propertyName);\n    writeOgcLiteral(node, '' + filter.pattern);\n}\n/**\n * @param {string} tagName Tag name.\n * @param {Node} node Node.\n * @param {string} value Value.\n */\nfunction writeOgcExpression(tagName, node, value) {\n    var property = createElementNS(OGCNS, tagName);\n    writeStringTextNode(property, value);\n    node.appendChild(property);\n}\n/**\n * @param {Node} node Node.\n * @param {string} value PropertyName value.\n */\nfunction writeOgcPropertyName(node, value) {\n    writeOgcExpression('PropertyName', node, value);\n}\n/**\n * @param {Node} node Node.\n * @param {string} value PropertyName value.\n */\nfunction writeOgcLiteral(node, value) {\n    writeOgcExpression('Literal', node, value);\n}\n/**\n * @param {Node} node Node.\n * @param {string} time PropertyName value.\n */\nfunction writeTimeInstant(node, time) {\n    var timeInstant = createElementNS(GMLNS, 'TimeInstant');\n   
  node.appendChild(timeInstant);\n    var timePosition = createElementNS(GMLNS, 'timePosition');\n    timeInstant.appendChild(timePosition);\n    writeStringTextNode(timePosition, time);\n}\n/**\n * Encode filter as WFS `Filter` and return the Node.\n *\n * @param {import(\"./filter/Filter.js\").default} filter Filter.\n * @return {Node} Result.\n * @api\n */\nexport function writeFilter(filter) {\n    var child = createElementNS(OGCNS, 'Filter');\n    writeFilterCondition(child, filter, []);\n    return child;\n}\n/**\n * @param {Node} node Node.\n * @param {Array<string>} featureTypes Feature types.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeGetFeature(node, featureTypes, objectStack) {\n    var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var item = /** @type {import(\"../xml.js\").NodeStackItem} */ (assign({}, context));\n    item.node = node;\n    pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory('Query'
 ), featureTypes, objectStack);\n}\nexport default WFS;\n//# sourceMappingURL=WFS.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WKT\n */\nimport Feature from '../Feature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport Mul
 tiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport TextFeature from './TextFeature.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * Geometry constructors\n * @enum {function (new:import(\"../geom/Geometry.js\").default, Array, import(\"../geom/GeometryLayout.js\").default)}\n */\nvar GeometryConstructor = {\n    'POINT': Point,\n    'LINESTRING': LineString,\n    'POLYGON': Polygon,\n    'MULTIPOINT': MultiPoint,\n    'MULTILINESTRING': MultiLineString,\n    'MULTIPOLYGON': MultiPolygon,\n};\n/**\n * @typedef {Object} Options\n * @property {boolean} [splitCollection=false] Whether to split GeometryCollections into\n * multiple features on reading.\n */\n/**\n * @typedef {Object} Token\n * @property {number} type\n * @property {number|string} [value]\n * @property {number
 } position\n */\n/**\n * @const\n * @type {string}\n */\nvar EMPTY = 'EMPTY';\n/**\n * @const\n * @type {string}\n */\nvar Z = 'Z';\n/**\n * @const\n * @type {string}\n */\nvar M = 'M';\n/**\n * @const\n * @type {string}\n */\nvar ZM = 'ZM';\n/**\n * @const\n * @enum {number}\n */\nvar TokenType = {\n    TEXT: 1,\n    LEFT_PAREN: 2,\n    RIGHT_PAREN: 3,\n    NUMBER: 4,\n    COMMA: 5,\n    EOF: 6,\n};\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar WKTGeometryType = {};\nfor (var type in GeometryType) {\n    WKTGeometryType[type] = GeometryType[type].toUpperCase();\n}\n/**\n * Class to tokenize a WKT string.\n */\nvar Lexer = /** @class */ (function () {\n    /**\n     * @param {string} wkt WKT string.\n     */\n    function Lexer(wkt) {\n        /**\n         * @type {string}\n         */\n        this.wkt = wkt;\n        /**\n         * @type {number}\n         * @private\n         */\n        this.index_ = -1;\n    }\n    /**\n     * @param {string} c Character.\n    
  * @return {boolean} Whether the character is alphabetic.\n     * @private\n     */\n    Lexer.prototype.isAlpha_ = function (c) {\n        return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');\n    };\n    /**\n     * @param {string} c Character.\n     * @param {boolean=} opt_decimal Whether the string number\n     *     contains a dot, i.e. is a decimal number.\n     * @return {boolean} Whether the character is numeric.\n     * @private\n     */\n    Lexer.prototype.isNumeric_ = function (c, opt_decimal) {\n        var decimal = opt_decimal !== undefined ? opt_decimal : false;\n        return (c >= '0' && c <= '9') || (c == '.' && !decimal);\n    };\n    /**\n     * @param {string} c Character.\n     * @return {boolean} Whether the character is whitespace.\n     * @private\n     */\n    Lexer.prototype.isWhiteSpace_ = function (c) {\n        return c == ' ' || c == '\\t' || c == '\\r' || c == '\\n';\n    };\n    /**\n     * @return {string} Next string character.\n     * @priva
 te\n     */\n    Lexer.prototype.nextChar_ = function () {\n        return this.wkt.charAt(++this.index_);\n    };\n    /**\n     * Fetch and return the next token.\n     * @return {!Token} Next string token.\n     */\n    Lexer.prototype.nextToken = function () {\n        var c = this.nextChar_();\n        var position = this.index_;\n        /** @type {number|string} */\n        var value = c;\n        var type;\n        if (c == '(') {\n            type = TokenType.LEFT_PAREN;\n        }\n        else if (c == ',') {\n            type = TokenType.COMMA;\n        }\n        else if (c == ')') {\n            type = TokenType.RIGHT_PAREN;\n        }\n        else if (this.isNumeric_(c) || c == '-') {\n            type = TokenType.NUMBER;\n            value = this.readNumber_();\n        }\n        else if (this.isAlpha_(c)) {\n            type = TokenType.TEXT;\n            value = this.readText_();\n        }\n        else if (this.isWhiteSpace_(c)) {\n            return this.nextT
 oken();\n        }\n        else if (c === '') {\n            type = TokenType.EOF;\n        }\n        else {\n            throw new Error('Unexpected character: ' + c);\n        }\n        return { position: position, value: value, type: type };\n    };\n    /**\n     * @return {number} Numeric token value.\n     * @private\n     */\n    Lexer.prototype.readNumber_ = function () {\n        var c;\n        var index = this.index_;\n        var decimal = false;\n        var scientificNotation = false;\n        do {\n            if (c == '.') {\n                decimal = true;\n            }\n            else if (c == 'e' || c == 'E') {\n                scientificNotation = true;\n            }\n            c = this.nextChar_();\n        } while (this.isNumeric_(c, decimal) ||\n            // if we haven't detected a scientific number before, 'e' or 'E'\n            // hint that we should continue to read\n            (!scientificNotation && (c == 'e' || c == 'E')) ||\n            //
  once we know that we have a scientific number, both '-' and '+'\n            // are allowed\n            (scientificNotation && (c == '-' || c == '+')));\n        return parseFloat(this.wkt.substring(index, this.index_--));\n    };\n    /**\n     * @return {string} String token value.\n     * @private\n     */\n    Lexer.prototype.readText_ = function () {\n        var c;\n        var index = this.index_;\n        do {\n            c = this.nextChar_();\n        } while (this.isAlpha_(c));\n        return this.wkt.substring(index, this.index_--).toUpperCase();\n    };\n    return Lexer;\n}());\n/**\n * Class to parse the tokens from the WKT string.\n */\nvar Parser = /** @class */ (function () {\n    /**\n     * @param {Lexer} lexer The lexer.\n     */\n    function Parser(lexer) {\n        /**\n         * @type {Lexer}\n         * @private\n         */\n        this.lexer_ = lexer;\n        /**\n         * @type {Token}\n         * @private\n         */\n        this.token_;\n    
     /**\n         * @type {import(\"../geom/GeometryLayout.js\").default}\n         * @private\n         */\n        this.layout_ = GeometryLayout.XY;\n    }\n    /**\n     * Fetch the next token form the lexer and replace the active token.\n     * @private\n     */\n    Parser.prototype.consume_ = function () {\n        this.token_ = this.lexer_.nextToken();\n    };\n    /**\n     * Tests if the given type matches the type of the current token.\n     * @param {TokenType} type Token type.\n     * @return {boolean} Whether the token matches the given type.\n     */\n    Parser.prototype.isTokenType = function (type) {\n        var isMatch = this.token_.type == type;\n        return isMatch;\n    };\n    /**\n     * If the given type matches the current token, consume it.\n     * @param {TokenType} type Token type.\n     * @return {boolean} Whether the token matches the given type.\n     */\n    Parser.prototype.match = function (type) {\n        var isMatch = this.isTokenType(type);\
 n        if (isMatch) {\n            this.consume_();\n        }\n        return isMatch;\n    };\n    /**\n     * Try to parse the tokens provided by the lexer.\n     * @return {import(\"../geom/Geometry.js\").default} The geometry.\n     */\n    Parser.prototype.parse = function () {\n        this.consume_();\n        var geometry = this.parseGeometry_();\n        return geometry;\n    };\n    /**\n     * Try to parse the dimensional info.\n     * @return {import(\"../geom/GeometryLayout.js\").default} The layout.\n     * @private\n     */\n    Parser.prototype.parseGeometryLayout_ = function () {\n        var layout = GeometryLayout.XY;\n        var dimToken = this.token_;\n        if (this.isTokenType(TokenType.TEXT)) {\n            var dimInfo = dimToken.value;\n            if (dimInfo === Z) {\n                layout = GeometryLayout.XYZ;\n            }\n            else if (dimInfo === M) {\n                layout = GeometryLayout.XYM;\n            }\n            else if (dim
 Info === ZM) {\n                layout = GeometryLayout.XYZM;\n            }\n            if (layout !== GeometryLayout.XY) {\n                this.consume_();\n            }\n        }\n        return layout;\n    };\n    /**\n     * @return {!Array<import(\"../geom/Geometry.js\").default>} A collection of geometries.\n     * @private\n     */\n    Parser.prototype.parseGeometryCollectionText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var geometries = [];\n            do {\n                geometries.push(this.parseGeometry_());\n            } while (this.match(TokenType.COMMA));\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return geometries;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {Array<number>} All values in a point.\n     * @private\n     */\n    Parser.prototype.par
 sePointText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parsePoint_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return null;\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<number>>} All points in a linestring.\n     * @private\n     */\n    Parser.prototype.parseLineStringText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parsePointList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<!Array<number>>>} All points in a polygon
 .\n     * @private\n     */\n    Parser.prototype.parsePolygonText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parseLineStringTextList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<number>>} All points in a multipoint.\n     * @private\n     */\n    Parser.prototype.parseMultiPointText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = void 0;\n            if (this.token_.type == TokenType.LEFT_PAREN) {\n                coordinates = this.parsePointTextList_();\n            }\n            else {\n                coordinates = this.parsePointList_();\n            }\n            if (this.match(TokenType.RIGHT_PAREN)) {\n          
       return coordinates;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<!Array<number>>>} All linestring points\n     *                                          in a multilinestring.\n     * @private\n     */\n    Parser.prototype.parseMultiLineStringText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parseLineStringTextList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<!Array<!Array<number>>>>} All polygon points in a multipolygon.\n     * @private\n     */\n    Parser.prototype.parseMultiPolygonText_ = function () {
 \n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parsePolygonTextList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<number>} A point.\n     * @private\n     */\n    Parser.prototype.parsePoint_ = function () {\n        var coordinates = [];\n        var dimensions = this.layout_.length;\n        for (var i = 0; i < dimensions; ++i) {\n            var token = this.token_;\n            if (this.match(TokenType.NUMBER)) {\n                coordinates.push(/** @type {number} */ (token.value));\n            }\n            else {\n                break;\n            }\n        }\n        if (coordinates.length == dimensions) {\n            return coordinates;\n        }\n        throw new Error(this.formatE
 rrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<number>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parsePointList_ = function () {\n        var coordinates = [this.parsePoint_()];\n        while (this.match(TokenType.COMMA)) {\n            coordinates.push(this.parsePoint_());\n        }\n        return coordinates;\n    };\n    /**\n     * @return {!Array<!Array<number>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parsePointTextList_ = function () {\n        var coordinates = [this.parsePointText_()];\n        while (this.match(TokenType.COMMA)) {\n            coordinates.push(this.parsePointText_());\n        }\n        return coordinates;\n    };\n    /**\n     * @return {!Array<!Array<!Array<number>>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parseLineStringTextList_ = function () {\n        var coordinates = [this.parseLineStringText_()];\n        while (this.match(TokenType.COMMA)) 
 {\n            coordinates.push(this.parseLineStringText_());\n        }\n        return coordinates;\n    };\n    /**\n     * @return {!Array<!Array<!Array<!Array<number>>>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parsePolygonTextList_ = function () {\n        var coordinates = [this.parsePolygonText_()];\n        while (this.match(TokenType.COMMA)) {\n            coordinates.push(this.parsePolygonText_());\n        }\n        return coordinates;\n    };\n    /**\n     * @return {boolean} Whether the token implies an empty geometry.\n     * @private\n     */\n    Parser.prototype.isEmptyGeometry_ = function () {\n        var isEmpty = this.isTokenType(TokenType.TEXT) && this.token_.value == EMPTY;\n        if (isEmpty) {\n            this.consume_();\n        }\n        return isEmpty;\n    };\n    /**\n     * Create an error message for an unexpected token error.\n     * @return {string} Error message.\n     * @private\n     */\n    Parser.prototype.fo
 rmatErrorMessage_ = function () {\n        return ('Unexpected `' +\n            this.token_.value +\n            '` at position ' +\n            this.token_.position +\n            ' in `' +\n            this.lexer_.wkt +\n            '`');\n    };\n    /**\n     * @return {!import(\"../geom/Geometry.js\").default} The geometry.\n     * @private\n     */\n    Parser.prototype.parseGeometry_ = function () {\n        var token = this.token_;\n        if (this.match(TokenType.TEXT)) {\n            var geomType = token.value;\n            this.layout_ = this.parseGeometryLayout_();\n            if (geomType == 'GEOMETRYCOLLECTION') {\n                var geometries = this.parseGeometryCollectionText_();\n                return new GeometryCollection(geometries);\n            }\n            else {\n                var ctor = GeometryConstructor[geomType];\n                if (!ctor) {\n                    throw new Error('Invalid geometry type: ' + geomType);\n                }\n       
          var coordinates = void 0;\n                switch (geomType) {\n                    case 'POINT': {\n                        coordinates = this.parsePointText_();\n                        break;\n                    }\n                    case 'LINESTRING': {\n                        coordinates = this.parseLineStringText_();\n                        break;\n                    }\n                    case 'POLYGON': {\n                        coordinates = this.parsePolygonText_();\n                        break;\n                    }\n                    case 'MULTIPOINT': {\n                        coordinates = this.parseMultiPointText_();\n                        break;\n                    }\n                    case 'MULTILINESTRING': {\n                        coordinates = this.parseMultiLineStringText_();\n                        break;\n                    }\n                    case 'MULTIPOLYGON': {\n                        coordinates = this.parseMultiPolygonT
 ext_();\n                        break;\n                    }\n                    default: {\n                        throw new Error('Invalid geometry type: ' + geomType);\n                    }\n                }\n                if (!coordinates) {\n                    if (ctor === GeometryConstructor['POINT']) {\n                        coordinates = [NaN, NaN];\n                    }\n                    else {\n                        coordinates = [];\n                    }\n                }\n                return new ctor(coordinates, this.layout_);\n            }\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    return Parser;\n}());\n/**\n * @classdesc\n * Geometry format for reading and writing data in the `WellKnownText` (WKT)\n * format.\n *\n * @api\n */\nvar WKT = /** @class */ (function (_super) {\n    __extends(WKT, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function WKT(opt_options) {\n        var 
 _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * Split GeometryCollection into multiple features.\n         * @type {boolean}\n         * @private\n         */\n        _this.splitCollection_ =\n            options.splitCollection !== undefined ? options.splitCollection : false;\n        return _this;\n    }\n    /**\n     * Parse a WKT string.\n     * @param {string} wkt WKT string.\n     * @return {import(\"../geom/Geometry.js\").default|undefined}\n     *     The geometry created.\n     * @private\n     */\n    WKT.prototype.parse_ = function (wkt) {\n        var lexer = new Lexer(wkt);\n        var parser = new Parser(lexer);\n        return parser.parse();\n    };\n    /**\n     * @protected\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    WKT.prototype.readFeatureFromText 
 = function (text, opt_options) {\n        var geom = this.readGeometryFromText(text, opt_options);\n        if (geom) {\n            var feature = new Feature();\n            feature.setGeometry(geom);\n            return feature;\n        }\n        return null;\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    WKT.prototype.readFeaturesFromText = function (text, opt_options) {\n        var geometries = [];\n        var geometry = this.readGeometryFromText(text, opt_options);\n        if (this.splitCollection_ &&\n            geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {\n            geometries = /** @type {GeometryCollection} */ (geometry).getGeometriesArray();\n        }\n        else {\n            geometries = [geometry];\n        }\n        var features = [];\n        for (var i = 0, ii = geometries.length; i
  < ii; ++i) {\n            var feature = new Feature();\n            feature.setGeometry(geometries[i]);\n            features.push(feature);\n        }\n        return features;\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    WKT.prototype.readGeometryFromText = function (text, opt_options) {\n        var geometry = this.parse_(text);\n        if (geometry) {\n            return transformGeometryWithOptions(geometry, false, opt_options);\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    WKT.prototype.writeFeatureText = function (feature, opt_options) {\n   
      var geometry = feature.getGeometry();\n        if (geometry) {\n            return this.writeGeometryText(geometry, opt_options);\n        }\n        return '';\n    };\n    /**\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    WKT.prototype.writeFeaturesText = function (features, opt_options) {\n        if (features.length == 1) {\n            return this.writeFeatureText(features[0], opt_options);\n        }\n        var geometries = [];\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            geometries.push(features[i].getGeometry());\n        }\n        var collection = new GeometryCollection(geometries);\n        return this.writeGeometryText(collection, opt_options);\n    };\n    /**\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\
 "./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    WKT.prototype.writeGeometryText = function (geometry, opt_options) {\n        return encode(transformGeometryWithOptions(geometry, true, opt_options));\n    };\n    return WKT;\n}(TextFeature));\n/**\n * @param {Point} geom Point geometry.\n * @return {string} Coordinates part of Point as WKT.\n */\nfunction encodePointGeometry(geom) {\n    var coordinates = geom.getCoordinates();\n    if (coordinates.length === 0) {\n        return '';\n    }\n    return coordinates.join(' ');\n}\n/**\n * @param {MultiPoint} geom MultiPoint geometry.\n * @return {string} Coordinates part of MultiPoint as WKT.\n */\nfunction encodeMultiPointGeometry(geom) {\n    var array = [];\n    var components = geom.getPoints();\n    for (var i = 0, ii = components.length; i < ii; ++i) {\n        array.push('(' + encodePointGeometry(components[i]) + ')');\n    }\n    return array.join(',');
 \n}\n/**\n * @param {GeometryCollection} geom GeometryCollection geometry.\n * @return {string} Coordinates part of GeometryCollection as WKT.\n */\nfunction encodeGeometryCollectionGeometry(geom) {\n    var array = [];\n    var geoms = geom.getGeometries();\n    for (var i = 0, ii = geoms.length; i < ii; ++i) {\n        array.push(encode(geoms[i]));\n    }\n    return array.join(',');\n}\n/**\n * @param {LineString|import(\"../geom/LinearRing.js\").default} geom LineString geometry.\n * @return {string} Coordinates part of LineString as WKT.\n */\nfunction encodeLineStringGeometry(geom) {\n    var coordinates = geom.getCoordinates();\n    var array = [];\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        array.push(coordinates[i].join(' '));\n    }\n    return array.join(',');\n}\n/**\n * @param {MultiLineString} geom MultiLineString geometry.\n * @return {string} Coordinates part of MultiLineString as WKT.\n */\nfunction encodeMultiLineStringGeometry(geom) {\n  
   var array = [];\n    var components = geom.getLineStrings();\n    for (var i = 0, ii = components.length; i < ii; ++i) {\n        array.push('(' + encodeLineStringGeometry(components[i]) + ')');\n    }\n    return array.join(',');\n}\n/**\n * @param {Polygon} geom Polygon geometry.\n * @return {string} Coordinates part of Polygon as WKT.\n */\nfunction encodePolygonGeometry(geom) {\n    var array = [];\n    var rings = geom.getLinearRings();\n    for (var i = 0, ii = rings.length; i < ii; ++i) {\n        array.push('(' + encodeLineStringGeometry(rings[i]) + ')');\n    }\n    return array.join(',');\n}\n/**\n * @param {MultiPolygon} geom MultiPolygon geometry.\n * @return {string} Coordinates part of MultiPolygon as WKT.\n */\nfunction encodeMultiPolygonGeometry(geom) {\n    var array = [];\n    var components = geom.getPolygons();\n    for (var i = 0, ii = components.length; i < ii; ++i) {\n        array.push('(' + encodePolygonGeometry(components[i]) + ')');\n    }\n    return ar
 ray.join(',');\n}\n/**\n * @param {import(\"../geom/SimpleGeometry.js\").default} geom SimpleGeometry geometry.\n * @return {string} Potential dimensional information for WKT type.\n */\nfunction encodeGeometryLayout(geom) {\n    var layout = geom.getLayout();\n    var dimInfo = '';\n    if (layout === GeometryLayout.XYZ || layout === GeometryLayout.XYZM) {\n        dimInfo += Z;\n    }\n    if (layout === GeometryLayout.XYM || layout === GeometryLayout.XYZM) {\n        dimInfo += M;\n    }\n    return dimInfo;\n}\n/**\n * @const\n * @type {Object<string, function(import(\"../geom/Geometry.js\").default): string>}\n */\nvar GeometryEncoder = {\n    'Point': encodePointGeometry,\n    'LineString': encodeLineStringGeometry,\n    'Polygon': encodePolygonGeometry,\n    'MultiPoint': encodeMultiPointGeometry,\n    'MultiLineString': encodeMultiLineStringGeometry,\n    'MultiPolygon': encodeMultiPolygonGeometry,\n    'GeometryCollection': encodeGeometryCollectionGeometry,\n};\n/**\n * Enc
 ode a geometry as WKT.\n * @param {!import(\"../geom/Geometry.js\").default} geom The geometry to encode.\n * @return {string} WKT string for the geometry.\n */\nfunction encode(geom) {\n    var type = geom.getType();\n    var geometryEncoder = GeometryEncoder[type];\n    var enc = geometryEncoder(geom);\n    type = type.toUpperCase();\n    if (typeof ( /** @type {?} */(geom).getFlatCoordinates) === 'function') {\n        var dimInfo = encodeGeometryLayout(\n        /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geom));\n        if (dimInfo.length > 0) {\n            type += ' ' + dimInfo;\n        }\n    }\n    if (enc.length === 0) {\n        return type + ' ' + EMPTY;\n    }\n    return type + '(' + enc + ')';\n}\nexport default WKT;\n//# sourceMappingURL=WKT.js.map","/**\n * @module ol/format/XML\n */\nimport { isDocument, parse } from '../xml.js';\n/**\n * @classdesc\n * Generic format for reading non-feature XML data\n *\n * @abstract\n */\nvar XML = /** @class 
 */ (function () {\n    function XML() {\n    }\n    /**\n     * Read the source document.\n     *\n     * @param {Document|Element|string} source The XML source.\n     * @return {Object} An object representing the source.\n     * @api\n     */\n    XML.prototype.read = function (source) {\n        if (!source) {\n            return null;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readFromDocument(/** @type {Document} */ (source));\n        }\n        else {\n            return this.readFromNode(/** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {Object} Object\n     */\n    XML.prototype.readFromDocument = function (doc) {\n        for (var n = doc.firstChild; n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n      
           return this.readFromNode(/** @type {Element} */ (n));\n            }\n        }\n        return null;\n    };\n    /**\n     * @abstract\n     * @param {Element} node Node.\n     * @return {Object} Object\n     */\n    XML.prototype.readFromNode = function (node) { };\n    return XML;\n}());\nexport default XML;\n//# sourceMappingURL=XML.js.map","/**\n * @module ol/format/XLink\n */\n/**\n * @const\n * @type {string}\n */\nvar NAMESPACE_URI = 'http://www.w3.org/1999/xlink';\n/**\n * @param {Element} node Node.\n * @return {string|undefined} href.\n */\nexport function readHref(node) {\n    return node.getAttributeNS(NAMESPACE_URI, 'href');\n}\n//# sourceMappingURL=XLink.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.
 hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WMSCapabilities\n */\nimport XML from './XML.js';\nimport { makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop, } from '../xml.js';\nimport { readBooleanString, readDecimal, readDecimalString, readNonNegativeInteger, readNonNegativeIntegerString, readString, } from './xsd.js';\nimport { readHref } from './XLink.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [null, 'http://www.opengis.net/wms'];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Service': makeObjectProper
 tySetter(readService),\n    'Capability': makeObjectPropertySetter(readCapability),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CAPABILITY_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Request': makeObjectPropertySetter(readRequest),\n    'Exception': makeObjectPropertySetter(readException),\n    'Layer': makeObjectPropertySetter(readCapabilityLayer),\n});\n/**\n * @classdesc\n * Format for reading WMS capabilities data\n *\n * @api\n */\nvar WMSCapabilities = /** @class */ (function (_super) {\n    __extends(WMSCapabilities, _super);\n    function WMSCapabilities() {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {string|undefined}\n         */\n        _this.version = undefined;\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @return {Object} Object\n     */\n    WMSCapabilities.prototype.readFromNode = function (node) {\n        this.ve
 rsion = node.getAttribute('version').trim();\n        var wmsCapabilityObject = pushParseAndPop({\n            'version': this.version,\n        }, PARSERS, node, []);\n        return wmsCapabilityObject ? wmsCapabilityObject : null;\n    };\n    return WMSCapabilities;\n}(XML));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'KeywordList': makeObjectPropertySetter(readKeywordList),\n    'OnlineResource': makeObjectPropertySetter(readHref),\n    'ContactInformation': makeObjectPropertySetter(readContactInformation),\n    'Fees': makeObjectPropertySetter(readString),\n    'AccessConstraints': makeObjectPropertySetter(readString),\n    'LayerLimit': makeObjectPropertySetter(readNonNegativeInteger),\n    'Max
 Width': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxHeight': makeObjectPropertySetter(readNonNegativeInteger),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_INFORMATION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ContactPersonPrimary': makeObjectPropertySetter(readContactPersonPrimary),\n    'ContactPosition': makeObjectPropertySetter(readString),\n    'ContactAddress': makeObjectPropertySetter(readContactAddress),\n    'ContactVoiceTelephone': makeObjectPropertySetter(readString),\n    'ContactFacsimileTelephone': makeObjectPropertySetter(readString),\n    'ContactElectronicMailAddress': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_PERSON_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ContactPerson': makeObjectPropertySetter(readString),\n    'ContactOrganizati
 on': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_ADDRESS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'AddressType': makeObjectPropertySetter(readString),\n    'Address': makeObjectPropertySetter(readString),\n    'City': makeObjectPropertySetter(readString),\n    'StateOrProvince': makeObjectPropertySetter(readString),\n    'PostCode': makeObjectPropertySetter(readString),\n    'Country': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EXCEPTION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Format': makeArrayPusher(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LAYER_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n   
  'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'KeywordList': makeObjectPropertySetter(readKeywordList),\n    'CRS': makeObjectPropertyPusher(readString),\n    'EX_GeographicBoundingBox': makeObjectPropertySetter(readEXGeographicBoundingBox),\n    'BoundingBox': makeObjectPropertyPusher(readBoundingBox),\n    'Dimension': makeObjectPropertyPusher(readDimension),\n    'Attribution': makeObjectPropertySetter(readAttribution),\n    'AuthorityURL': makeObjectPropertyPusher(readAuthorityURL),\n    'Identifier': makeObjectPropertyPusher(readString),\n    'MetadataURL': makeObjectPropertyPusher(readMetadataURL),\n    'DataURL': makeObjectPropertyPusher(readFormatOnlineresource),\n    'FeatureListURL': makeObjectPropertyPusher(readFormatOnlineresource),\n    'Style': makeObjectPropertyPusher(readStyle),\n    'MinScaleDenominator': makeObjectPropertySetter(readDecimal),\n    'MaxScaleDenominator': makeObjectPropertySetter(readDecim
 al),\n    'Layer': makeObjectPropertyPusher(readLayer),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ATTRIBUTION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'OnlineResource': makeObjectPropertySetter(readHref),\n    'LogoURL': makeObjectPropertySetter(readSizedFormatOnlineresource),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'westBoundLongitude': makeObjectPropertySetter(readDecimal),\n    'eastBoundLongitude': makeObjectPropertySetter(readDecimal),\n    'southBoundLatitude': makeObjectPropertySetter(readDecimal),\n    'northBoundLatitude': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar REQUEST_P
 ARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'GetCapabilities': makeObjectPropertySetter(readOperationType),\n    'GetMap': makeObjectPropertySetter(readOperationType),\n    'GetFeatureInfo': makeObjectPropertySetter(readOperationType),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar OPERATIONTYPE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Format': makeObjectPropertyPusher(readString),\n    'DCPType': makeObjectPropertyPusher(readDCPType),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar DCPTYPE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'HTTP': makeObjectPropertySetter(readHTTP),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar HTTP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Get': makeObjectPropertySetter(readFormatOnlineresource),\n    'Post': makeObj
 ectPropertySetter(readFormatOnlineresource),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'LegendURL': makeObjectPropertyPusher(readSizedFormatOnlineresource),\n    'StyleSheetURL': makeObjectPropertySetter(readFormatOnlineresource),\n    'StyleURL': makeObjectPropertySetter(readFormatOnlineresource),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar FORMAT_ONLINERESOURCE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Format': makeObjectPropertySetter(readString),\n    'OnlineResource': makeObjectPropertySetter(readHref),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ign
 ore\nvar KEYWORDLIST_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Keyword': makeArrayPusher(readString),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Attribution object.\n */\nfunction readAttribution(node, objectStack) {\n    return pushParseAndPop({}, ATTRIBUTION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Bounding box object.\n */\nfunction readBoundingBox(node, objectStack) {\n    var extent = [\n        readDecimalString(node.getAttribute('minx')),\n        readDecimalString(node.getAttribute('miny')),\n        readDecimalString(node.getAttribute('maxx')),\n        readDecimalString(node.getAttribute('maxy')),\n    ];\n    var resolutions = [\n        readDecimalString(node.getAttribute('resx')),\n        readDecimalString(node.getAttribute('resy')),\n    ];\n    return {\n        'crs': node.getAttribute(
 'CRS'),\n        'extent': extent,\n        'res': resolutions,\n    };\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {import(\"../extent.js\").Extent|undefined} Bounding box object.\n */\nfunction readEXGeographicBoundingBox(node, objectStack) {\n    var geographicBoundingBox = pushParseAndPop({}, EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS, node, objectStack);\n    if (!geographicBoundingBox) {\n        return undefined;\n    }\n    var westBoundLongitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['westBoundLongitude']);\n    var southBoundLatitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['southBoundLatitude']);\n    var eastBoundLongitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['eastBoundLongitude']);\n    var northBoundLatitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['northBoundLatitude']);\n    if (westBoundLongitude === undefi
 ned ||\n        southBoundLatitude === undefined ||\n        eastBoundLongitude === undefined ||\n        northBoundLatitude === undefined) {\n        return undefined;\n    }\n    return [\n        westBoundLongitude,\n        southBoundLatitude,\n        eastBoundLongitude,\n        northBoundLatitude,\n    ];\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Capability object.\n */\nfunction readCapability(node, objectStack) {\n    return pushParseAndPop({}, CAPABILITY_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Service object.\n */\nfunction readService(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact information object.\n */\nfunction readCont
 actInformation(node, objectStack) {\n    return pushParseAndPop({}, CONTACT_INFORMATION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact person object.\n */\nfunction readContactPersonPrimary(node, objectStack) {\n    return pushParseAndPop({}, CONTACT_PERSON_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact address object.\n */\nfunction readContactAddress(node, objectStack) {\n    return pushParseAndPop({}, CONTACT_ADDRESS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Format array.\n */\nfunction readException(node, objectStack) {\n    return pushParseAndPop([], EXCEPTION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} obj
 ectStack Object stack.\n * @return {Object|undefined} Layer object.\n */\nfunction readCapabilityLayer(node, objectStack) {\n    return pushParseAndPop({}, LAYER_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Layer object.\n */\nfunction readLayer(node, objectStack) {\n    var parentLayerObject = /**  @type {!Object<string,*>} */ (objectStack[objectStack.length - 1]);\n    var layerObject = pushParseAndPop({}, LAYER_PARSERS, node, objectStack);\n    if (!layerObject) {\n        return undefined;\n    }\n    var queryable = readBooleanString(node.getAttribute('queryable'));\n    if (queryable === undefined) {\n        queryable = parentLayerObject['queryable'];\n    }\n    layerObject['queryable'] = queryable !== undefined ? queryable : false;\n    var cascaded = readNonNegativeIntegerString(node.getAttribute('cascaded'));\n    if (cascaded === undefined) {\n        cascaded = parentL
 ayerObject['cascaded'];\n    }\n    layerObject['cascaded'] = cascaded;\n    var opaque = readBooleanString(node.getAttribute('opaque'));\n    if (opaque === undefined) {\n        opaque = parentLayerObject['opaque'];\n    }\n    layerObject['opaque'] = opaque !== undefined ? opaque : false;\n    var noSubsets = readBooleanString(node.getAttribute('noSubsets'));\n    if (noSubsets === undefined) {\n        noSubsets = parentLayerObject['noSubsets'];\n    }\n    layerObject['noSubsets'] = noSubsets !== undefined ? noSubsets : false;\n    var fixedWidth = readDecimalString(node.getAttribute('fixedWidth'));\n    if (!fixedWidth) {\n        fixedWidth = parentLayerObject['fixedWidth'];\n    }\n    layerObject['fixedWidth'] = fixedWidth;\n    var fixedHeight = readDecimalString(node.getAttribute('fixedHeight'));\n    if (!fixedHeight) {\n        fixedHeight = parentLayerObject['fixedHeight'];\n    }\n    layerObject['fixedHeight'] = fixedHeight;\n    // See 7.2.4.8\n    var addKeys = ['S
 tyle', 'CRS', 'AuthorityURL'];\n    addKeys.forEach(function (key) {\n        if (key in parentLayerObject) {\n            var childValue = layerObject[key] || [];\n            layerObject[key] = childValue.concat(parentLayerObject[key]);\n        }\n    });\n    var replaceKeys = [\n        'EX_GeographicBoundingBox',\n        'BoundingBox',\n        'Dimension',\n        'Attribution',\n        'MinScaleDenominator',\n        'MaxScaleDenominator',\n    ];\n    replaceKeys.forEach(function (key) {\n        if (!(key in layerObject)) {\n            var parentValue = parentLayerObject[key];\n            layerObject[key] = parentValue;\n        }\n    });\n    return layerObject;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Dimension object.\n */\nfunction readDimension(node, objectStack) {\n    var dimensionObject = {\n        'name': node.getAttribute('name'),\n        'units': node.getAttribute('units'),\n        'uni
 tSymbol': node.getAttribute('unitSymbol'),\n        'default': node.getAttribute('default'),\n        'multipleValues': readBooleanString(node.getAttribute('multipleValues')),\n        'nearestValue': readBooleanString(node.getAttribute('nearestValue')),\n        'current': readBooleanString(node.getAttribute('current')),\n        'values': readString(node),\n    };\n    return dimensionObject;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Online resource object.\n */\nfunction readFormatOnlineresource(node, objectStack) {\n    return pushParseAndPop({}, FORMAT_ONLINERESOURCE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Request object.\n */\nfunction readRequest(node, objectStack) {\n    return pushParseAndPop({}, REQUEST_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>
 } objectStack Object stack.\n * @return {Object|undefined} DCP type object.\n */\nfunction readDCPType(node, objectStack) {\n    return pushParseAndPop({}, DCPTYPE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} HTTP object.\n */\nfunction readHTTP(node, objectStack) {\n    return pushParseAndPop({}, HTTP_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Operation type object.\n */\nfunction readOperationType(node, objectStack) {\n    return pushParseAndPop({}, OPERATIONTYPE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Online resource object.\n */\nfunction readSizedFormatOnlineresource(node, objectStack) {\n    var formatOnlineresource = readFormatOnlineresource(node, objectStack);\n   
  if (formatOnlineresource) {\n        var size = [\n            readNonNegativeIntegerString(node.getAttribute('width')),\n            readNonNegativeIntegerString(node.getAttribute('height')),\n        ];\n        formatOnlineresource['size'] = size;\n        return formatOnlineresource;\n    }\n    return undefined;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Authority URL object.\n */\nfunction readAuthorityURL(node, objectStack) {\n    var authorityObject = readFormatOnlineresource(node, objectStack);\n    if (authorityObject) {\n        authorityObject['name'] = node.getAttribute('name');\n        return authorityObject;\n    }\n    return undefined;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Metadata URL object.\n */\nfunction readMetadataURL(node, objectStack) {\n    var metadataObject = readFormatOnlineresource(node, objectSta
 ck);\n    if (metadataObject) {\n        metadataObject['type'] = node.getAttribute('type');\n        return metadataObject;\n    }\n    return undefined;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Style object.\n */\nfunction readStyle(node, objectStack) {\n    return pushParseAndPop({}, STYLE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Keyword list.\n */\nfunction readKeywordList(node, objectStack) {\n    return pushParseAndPop([], KEYWORDLIST_PARSERS, node, objectStack);\n}\nexport default WMSCapabilities;\n//# sourceMappingURL=WMSCapabilities.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n  
           function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WMSGetFeatureInfo\n */\nimport GML2 from './GML2.js';\nimport XMLFeature from './XMLFeature.js';\nimport { assign } from '../obj.js';\nimport { extend, includes } from '../array.js';\nimport { makeArrayPusher, makeStructureNS, pushParseAndPop } from '../xml.js';\n/**\n * @typedef {Object} Options\n * @property {Array<string>} [layers] If set, only features of the given layers will be returned by the format when read.\n */\n/**\n * @const\n * @type {string}\n */\nvar featureIdentifier = '_feature';\n/**\n * @const\n * @type {string}\n */\nvar layerIdentifier = '_layer';\n/**\n * @classdesc\n * Format for reading W
 MSGetFeatureInfo format. It uses\n * {@link module:ol/format/GML2~GML2} to read features.\n *\n * @api\n */\nvar WMSGetFeatureInfo = /** @class */ (function (_super) {\n    __extends(WMSGetFeatureInfo, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function WMSGetFeatureInfo(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.featureNS_ = 'http://mapserver.gis.umn.edu/mapserver';\n        /**\n         * @private\n         * @type {GML2}\n         */\n        _this.gmlFormat_ = new GML2();\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.layers_ = options.layers ? options.layers : null;\n        return _this;\n    }\n    /**\n     * @return {Array<string>} layers\n     */\n    WMSGetFeatureInfo.prototype.getLayers = function () {\n        return this.la
 yers_;\n    };\n    /**\n     * @param {Array<string>} layers Layers to parse.\n     */\n    WMSGetFeatureInfo.prototype.setLayers = function (layers) {\n        this.layers_ = layers;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     * @private\n     */\n    WMSGetFeatureInfo.prototype.readFeatures_ = function (node, objectStack) {\n        node.setAttribute('namespaceURI', this.featureNS_);\n        var localName = node.localName;\n        /** @type {Array<import(\"../Feature.js\").default>} */\n        var features = [];\n        if (node.childNodes.length === 0) {\n            return features;\n        }\n        if (localName == 'msGMLOutput') {\n            for (var i = 0, ii = node.childNodes.length; i < ii; i++) {\n                var layer = node.childNodes[i];\n                if (layer.nodeType !== Node.ELEMENT_NODE) {\n                    cont
 inue;\n                }\n                var layerElement = /** @type {Element} */ (layer);\n                var context = objectStack[0];\n                var toRemove = layerIdentifier;\n                var layerName = layerElement.localName.replace(toRemove, '');\n                if (this.layers_ && !includes(this.layers_, layerName)) {\n                    continue;\n                }\n                var featureType = layerName + featureIdentifier;\n                context['featureType'] = featureType;\n                context['featureNS'] = this.featureNS_;\n                /** @type {Object<string, import(\"../xml.js\").Parser>} */\n                var parsers = {};\n                parsers[featureType] = makeArrayPusher(this.gmlFormat_.readFeatureElement, this.gmlFormat_);\n                var parsersNS = makeStructureNS([context['featureNS'], null], parsers);\n                layerElement.setAttribute('namespaceURI', this.featureNS_);\n                var layerFeatures = p
 ushParseAndPop([], \n                // @ts-ignore\n                parsersNS, layerElement, objectStack, this.gmlFormat_);\n                if (layerFeatures) {\n                    extend(features, layerFeatures);\n                }\n            }\n        }\n        if (localName == 'FeatureCollection') {\n            var gmlFeatures = pushParseAndPop([], this.gmlFormat_.FEATURE_COLLECTION_PARSERS, node, [{}], this.gmlFormat_);\n            if (gmlFeatures) {\n                features = gmlFeatures;\n            }\n        }\n        return features;\n    };\n    /**\n     * @protected\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    WMSGetFeatureInfo.prototype.readFeaturesFromNode = function (node, opt_options) {\n        var options = {};\n        if (opt_options) {\n            assign(options, this.getReadOptions(node, opt_options));
 \n        }\n        return this.readFeatures_(node, [options]);\n    };\n    return WMSGetFeatureInfo;\n}(XMLFeature));\nexport default WMSGetFeatureInfo;\n//# sourceMappingURL=WMSGetFeatureInfo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/OWS\n */\nimport XML from './XML.js';\nimport { makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop, } from '../xml.js';\nimport { rea
 dHref } from './XLink.js';\nimport { readString } from './xsd.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [null, 'http://www.opengis.net/ows/1.1'];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ServiceIdentification': makeObjectPropertySetter(readServiceIdentification),\n    'ServiceProvider': makeObjectPropertySetter(readServiceProvider),\n    'OperationsMetadata': makeObjectPropertySetter(readOperationsMetadata),\n});\nvar OWS = /** @class */ (function (_super) {\n    __extends(OWS, _super);\n    function OWS() {\n        return _super.call(this) || this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @return {Object} Object\n     */\n    OWS.prototype.readFromNode = function (node) {\n        var owsObject = pushParseAndPop({}, PARSERS, node, []);\n        return owsObject ? owsObject : null;\n    };\n    return OWS;
 \n}(XML));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ADDRESS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'DeliveryPoint': makeObjectPropertySetter(readString),\n    'City': makeObjectPropertySetter(readString),\n    'AdministrativeArea': makeObjectPropertySetter(readString),\n    'PostalCode': makeObjectPropertySetter(readString),\n    'Country': makeObjectPropertySetter(readString),\n    'ElectronicMailAddress': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ALLOWED_VALUES_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Value': makeObjectPropertyPusher(readValue),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONSTRAINT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'AllowedValues': makeObjectPropertySetter(readAllowedValu
 es),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_INFO_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Phone': makeObjectPropertySetter(readPhone),\n    'Address': makeObjectPropertySetter(readAddress),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar DCP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'HTTP': makeObjectPropertySetter(readHttp),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar HTTP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Get': makeObjectPropertyPusher(readGet),\n    'Post': undefined,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar OPERATION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'DCP': makeObjectPropertySetter(readDcp),\n});\n/**\n * @const\n * @type {Obj
 ect<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar OPERATIONS_METADATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Operation': readOperation,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PHONE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Voice': makeObjectPropertySetter(readString),\n    'Facsimile': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar REQUEST_METHOD_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Constraint': makeObjectPropertyPusher(readConstraint),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_CONTACT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'IndividualName': makeObjectPropertySetter(readString),\n    'PositionName': makeObjectPropertySetter(readString),\n
     'ContactInfo': makeObjectPropertySetter(readContactInfo),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_IDENTIFICATION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Abstract': makeObjectPropertySetter(readString),\n    'AccessConstraints': makeObjectPropertySetter(readString),\n    'Fees': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'ServiceTypeVersion': makeObjectPropertySetter(readString),\n    'ServiceType': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_PROVIDER_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ProviderName': makeObjectPropertySetter(readString),\n    'ProviderSite': makeObjectPropertySetter(readHref),\n    'ServiceContact': makeObjectPropertySetter(readServiceContact),\n});\n/**\n * @param {Element} node Nod
 e.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The address.\n */\nfunction readAddress(node, objectStack) {\n    return pushParseAndPop({}, ADDRESS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The values.\n */\nfunction readAllowedValues(node, objectStack) {\n    return pushParseAndPop({}, ALLOWED_VALUES_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The constraint.\n */\nfunction readConstraint(node, objectStack) {\n    var name = node.getAttribute('name');\n    if (!name) {\n        return undefined;\n    }\n    return pushParseAndPop({ 'name': name }, CONSTRAINT_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The contact info.\n */\nfunction readC
 ontactInfo(node, objectStack) {\n    return pushParseAndPop({}, CONTACT_INFO_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The DCP.\n */\nfunction readDcp(node, objectStack) {\n    return pushParseAndPop({}, DCP_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The GET object.\n */\nfunction readGet(node, objectStack) {\n    var href = readHref(node);\n    if (!href) {\n        return undefined;\n    }\n    return pushParseAndPop({ 'href': href }, REQUEST_METHOD_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The HTTP object.\n */\nfunction readHttp(node, objectStack) {\n    return pushParseAndPop({}, HTTP_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Ar
 ray<*>} objectStack Object stack.\n * @return {Object|undefined} The operation.\n */\nfunction readOperation(node, objectStack) {\n    var name = node.getAttribute('name');\n    var value = pushParseAndPop({}, OPERATION_PARSERS, node, objectStack);\n    if (!value) {\n        return undefined;\n    }\n    var object = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    object[name] = value;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The operations metadata.\n */\nfunction readOperationsMetadata(node, objectStack) {\n    return pushParseAndPop({}, OPERATIONS_METADATA_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The phone.\n */\nfunction readPhone(node, objectStack) {\n    return pushParseAndPop({}, PHONE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} 
 objectStack Object stack.\n * @return {Object|undefined} The service identification.\n */\nfunction readServiceIdentification(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_IDENTIFICATION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The service contact.\n */\nfunction readServiceContact(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_CONTACT_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The service provider.\n */\nfunction readServiceProvider(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_PROVIDER_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {string|undefined} The value.\n */\nfunction readValue(node, objectStack) {\n    return readString(node);\n}\nexport defau
 lt OWS;\n//# sourceMappingURL=OWS.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WMTSCapabilities\n */\nimport OWS from './OWS.js';\nimport XML from './XML.js';\nimport { boundingExtent } from '../extent.js';\nimport { makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop, } from '../xml.js';\nimport { readDecimal, readNonNegativeInteger, readString } from './
 xsd.js';\nimport { readHref } from './XLink.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [null, 'http://www.opengis.net/wmts/1.0'];\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar OWS_NAMESPACE_URIS = [null, 'http://www.opengis.net/ows/1.1'];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Contents': makeObjectPropertySetter(readContents),\n});\n/**\n * @classdesc\n * Format for reading WMTS capabilities data.\n *\n * @api\n */\nvar WMTSCapabilities = /** @class */ (function (_super) {\n    __extends(WMTSCapabilities, _super);\n    function WMTSCapabilities() {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {OWS}\n         * @private\n         */\n        _this.owsParser_ = new OWS();\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @return {Object} Object\n    
  */\n    WMTSCapabilities.prototype.readFromNode = function (node) {\n        var version = node.getAttribute('version');\n        if (version) {\n            version = version.trim();\n        }\n        var WMTSCapabilityObject = this.owsParser_.readFromNode(node);\n        if (!WMTSCapabilityObject) {\n            return null;\n        }\n        WMTSCapabilityObject['version'] = version;\n        WMTSCapabilityObject = pushParseAndPop(WMTSCapabilityObject, PARSERS, node, []);\n        return WMTSCapabilityObject ? WMTSCapabilityObject : null;\n    };\n    return WMTSCapabilities;\n}(XML));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTENTS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Layer': makeObjectPropertyPusher(readLayer),\n    'TileMatrixSet': makeObjectPropertyPusher(readTileMatrixSet),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-igno
 re\nvar LAYER_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Style': makeObjectPropertyPusher(readStyle),\n    'Format': makeObjectPropertyPusher(readString),\n    'TileMatrixSetLink': makeObjectPropertyPusher(readTileMatrixSetLink),\n    'Dimension': makeObjectPropertyPusher(readDimensions),\n    'ResourceURL': makeObjectPropertyPusher(readResourceUrl),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'WGS84BoundingBox': makeObjectPropertySetter(readWgs84BoundingBox),\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LegendURL': makeObjectPropertyPusher(readLegendUrl),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'Identifier': makeObjectProper
 tySetter(readString),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_LINKS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'TileMatrixSet': makeObjectPropertySetter(readString),\n    'TileMatrixSetLimits': makeObjectPropertySetter(readTileMatrixLimitsList),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_LIMITS_LIST_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'TileMatrixLimits': makeArrayPusher(readTileMatrixLimits),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_LIMITS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'TileMatrix': makeObjectPropertySetter(readString),\n    'MinTileRow': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxTileRow': makeObjectPropertySetter(readNonNegativeInteger),\n    'MinTileCol': makeObjectPropertySetter(readN
 onNegativeInteger),\n    'MaxTileCol': makeObjectPropertySetter(readNonNegativeInteger),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar DIMENSION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Default': makeObjectPropertySetter(readString),\n    'Value': makeObjectPropertyPusher(readString),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar WGS84_BBOX_READERS = makeStructureNS(OWS_NAMESPACE_URIS, {\n    'LowerCorner': makeArrayPusher(readCoordinates),\n    'UpperCorner': makeArrayPusher(readCoordinates),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'WellKnownScaleSet': makeObjectPropertySetter(readString),\n    'TileMa
 trix': makeObjectPropertyPusher(readTileMatrix),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'SupportedCRS': makeObjectPropertySetter(readString),\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TM_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'TopLeftCorner': makeObjectPropertySetter(readCoordinates),\n    'ScaleDenominator': makeObjectPropertySetter(readDecimal),\n    'TileWidth': makeObjectPropertySetter(readNonNegativeInteger),\n    'TileHeight': makeObjectPropertySetter(readNonNegativeInteger),\n    'MatrixWidth': makeObjectPropertySetter(readNonNegativeInteger),\n    'MatrixHeight': makeObjectPropertySetter(readNonNegativeInteger),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefi
 ned} Attribution object.\n */\nfunction readContents(node, objectStack) {\n    return pushParseAndPop({}, CONTENTS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Layers object.\n */\nfunction readLayer(node, objectStack) {\n    return pushParseAndPop({}, LAYER_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Tile Matrix Set object.\n */\nfunction readTileMatrixSet(node, objectStack) {\n    return pushParseAndPop({}, TMS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Style object.\n */\nfunction readStyle(node, objectStack) {\n    var style = pushParseAndPop({}, STYLE_PARSERS, node, objectStack);\n    if (!style) {\n        return undefined;\n    }\n    var isDefault = node.getAttribute('
 isDefault') === 'true';\n    style['isDefault'] = isDefault;\n    return style;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Tile Matrix Set Link object.\n */\nfunction readTileMatrixSetLink(node, objectStack) {\n    return pushParseAndPop({}, TMS_LINKS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Dimension object.\n */\nfunction readDimensions(node, objectStack) {\n    return pushParseAndPop({}, DIMENSION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Resource URL object.\n */\nfunction readResourceUrl(node, objectStack) {\n    var format = node.getAttribute('format');\n    var template = node.getAttribute('template');\n    var resourceType = node.getAttribute('resourceType');\n    var resource = {};\n    if 
 (format) {\n        resource['format'] = format;\n    }\n    if (template) {\n        resource['template'] = template;\n    }\n    if (resourceType) {\n        resource['resourceType'] = resourceType;\n    }\n    return resource;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} WGS84 BBox object.\n */\nfunction readWgs84BoundingBox(node, objectStack) {\n    var coordinates = pushParseAndPop([], WGS84_BBOX_READERS, node, objectStack);\n    if (coordinates.length != 2) {\n        return undefined;\n    }\n    return boundingExtent(coordinates);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Legend object.\n */\nfunction readLegendUrl(node, objectStack) {\n    var legend = {};\n    legend['format'] = node.getAttribute('format');\n    legend['href'] = readHref(node);\n    return legend;\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} ob
 jectStack Object stack.\n * @return {Object|undefined} Coordinates object.\n */\nfunction readCoordinates(node, objectStack) {\n    var coordinates = readString(node).split(/\\s+/);\n    if (!coordinates || coordinates.length != 2) {\n        return undefined;\n    }\n    var x = +coordinates[0];\n    var y = +coordinates[1];\n    if (isNaN(x) || isNaN(y)) {\n        return undefined;\n    }\n    return [x, y];\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrix object.\n */\nfunction readTileMatrix(node, objectStack) {\n    return pushParseAndPop({}, TM_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrixSetLimits Object.\n */\nfunction readTileMatrixLimitsList(node, objectStack) {\n    return pushParseAndPop([], TMS_LIMITS_LIST_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * 
 @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrixLimits Array.\n */\nfunction readTileMatrixLimits(node, objectStack) {\n    return pushParseAndPop({}, TMS_LIMITS_PARSERS, node, objectStack);\n}\nexport default WMTSCapabilities;\n//# sourceMappingURL=WMTSCapabilities.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/FullScreen\n */\nimport Control from './Control.js';\nimpo
 rt EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_UNSUPPORTED } from '../css.js';\nimport { listen } from '../events.js';\nimport { replaceNode } from '../dom.js';\nvar events = [\n    'fullscreenchange',\n    'webkitfullscreenchange',\n    'MSFullscreenChange',\n];\n/**\n * @enum {string}\n */\nvar FullScreenEventType = {\n    /**\n     * Triggered after the map entered fullscreen.\n     * @event FullScreenEventType#enterfullscreen\n     * @api\n     */\n    ENTERFULLSCREEN: 'enterfullscreen',\n    /**\n     * Triggered after the map leave fullscreen.\n     * @event FullScreenEventType#leavefullscreen\n     * @api\n     */\n    LEAVEFULLSCREEN: 'leavefullscreen',\n};\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-full-screen'] CSS class name.\n * @property {string|Text} [label='\\u2922'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {str
 ing|Text} [labelActive='\\u00d7'] Text label to use for the\n * button when full-screen is active.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip.\n * @property {boolean} [keys=false] Full keyboard access.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {HTMLElement|string} [source] The element to be displayed\n * fullscreen. When not provided, the element containing the map viewport will\n * be displayed fullscreen.\n */\n/**\n * @classdesc\n * Provides a button that when clicked fills up the full screen with the map.\n * The full screen source element is by default the element containing the map viewport unless\n * overridden by providing the `source` option. In which case, the dom\n * element introduced using this parameter will be displayed in full screen.\n *\n 
 * When in full screen mode, a close button is shown to exit full screen mode.\n * The [Fullscreen API](http://www.w3.org/TR/fullscreen/) is used to\n * toggle the map in full screen mode.\n *\n * @fires FullScreenEventType#enterfullscreen\n * @fires FullScreenEventType#leavefullscreen\n * @api\n */\nvar FullScreen = /** @class */ (function (_super) {\n    __extends(FullScreen, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function FullScreen(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            target: options.target,\n        }) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.cssClassName_ =\n            options.className !== undefined ? options.className : 'ol-full-screen';\n        var label = options.label !== undefined ? options.label : '\\u2922';\n    
     /**\n         * @private\n         * @type {Text}\n         */\n        _this.labelNode_ =\n            typeof label === 'string' ? document.createTextNode(label) : label;\n        var labelActive = options.labelActive !== undefined ? options.labelActive : '\\u00d7';\n        /**\n         * @private\n         * @type {Text}\n         */\n        _this.labelActiveNode_ =\n            typeof labelActive === 'string'\n                ? document.createTextNode(labelActive)\n                : labelActive;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.button_ = document.createElement('button');\n        var tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';\n        _this.setClassName_(_this.button_, isFullScreen());\n        _this.button_.setAttribute('type', 'button');\n        _this.button_.title = tipLabel;\n        _this.button_.appendChild(_this.labelNode_);\n        _this.button_.addEventListener(EventType.CLI
 CK, _this.handleClick_.bind(_this), false);\n        var cssClasses = _this.cssClassName_ +\n            ' ' +\n            CLASS_UNSELECTABLE +\n            ' ' +\n            CLASS_CONTROL +\n            ' ' +\n            (!isFullScreenSupported() ? CLASS_UNSUPPORTED : '');\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(_this.button_);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.keys_ = options.keys !== undefined ? options.keys : false;\n        /**\n         * @private\n         * @type {HTMLElement|string|undefined}\n         */\n        _this.source_ = options.source;\n        return _this;\n    }\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    FullScreen.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        this.handleFullScreen_();\n    };\n    /**\n     * @private\n     */\n    FullScreen.pro
 totype.handleFullScreen_ = function () {\n        if (!isFullScreenSupported()) {\n            return;\n        }\n        var map = this.getMap();\n        if (!map) {\n            return;\n        }\n        if (isFullScreen()) {\n            exitFullScreen();\n        }\n        else {\n            var element = void 0;\n            if (this.source_) {\n                element =\n                    typeof this.source_ === 'string'\n                        ? document.getElementById(this.source_)\n                        : this.source_;\n            }\n            else {\n                element = map.getTargetElement();\n            }\n            if (this.keys_) {\n                requestFullScreenWithKeys(element);\n            }\n            else {\n                requestFullScreen(element);\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    FullScreen.prototype.handleFullScreenChange_ = function () {\n        var map = this.getMap();\n        if (isFul
 lScreen()) {\n            this.setClassName_(this.button_, true);\n            replaceNode(this.labelActiveNode_, this.labelNode_);\n            this.dispatchEvent(FullScreenEventType.ENTERFULLSCREEN);\n        }\n        else {\n            this.setClassName_(this.button_, false);\n            replaceNode(this.labelNode_, this.labelActiveNode_);\n            this.dispatchEvent(FullScreenEventType.LEAVEFULLSCREEN);\n        }\n        if (map) {\n            map.updateSize();\n        }\n    };\n    /**\n     * @param {HTMLElement} element Target element\n     * @param {boolean} fullscreen True if fullscreen class name should be active\n     * @private\n     */\n    FullScreen.prototype.setClassName_ = function (element, fullscreen) {\n        var activeClassName = this.cssClassName_ + '-true';\n        var inactiveClassName = this.cssClassName_ + '-false';\n        var nextClassName = fullscreen ? activeClassName : inactiveClassName;\n        element.classList.remove(activeClassNam
 e);\n        element.classList.remove(inactiveClassName);\n        element.classList.add(nextClassName);\n    };\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    FullScreen.prototype.setMap = function (map) {\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            for (var i = 0, ii = events.length; i < ii; ++i) {\n                this.listenerKeys.push(listen(document, events[i], this.handleFullScreenChange_, this));\n            }\n        }\n    };\n    return FullScreen;\n}(Control));\n/**\n * @return {boolean} Fullscreen is supported by the current platform.\n */\nfunction isFullScreenSupported() {\n    var body = document.body;\n    return !!(body['webkitRequestFullscreen'] ||\n        (body['msRequestFullscreen'] && documen
 t['msFullscreenEnabled']) ||\n        (body.requestFullscreen && document.fullscreenEnabled));\n}\n/**\n * @return {boolean} Element is currently in fullscreen.\n */\nfunction isFullScreen() {\n    return !!(document['webkitIsFullScreen'] ||\n        document['msFullscreenElement'] ||\n        document.fullscreenElement);\n}\n/**\n * Request to fullscreen an element.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreen(element) {\n    if (element.requestFullscreen) {\n        element.requestFullscreen();\n    }\n    else if (element['msRequestFullscreen']) {\n        element['msRequestFullscreen']();\n    }\n    else if (element['webkitRequestFullscreen']) {\n        element['webkitRequestFullscreen']();\n    }\n}\n/**\n * Request to fullscreen an element with keyboard input.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreenWithKeys(element) {\n    if (element['webkitRequestFullscreen']) {\n    
     element['webkitRequestFullscreen']();\n    }\n    else {\n        requestFullScreen(element);\n    }\n}\n/**\n * Exit fullscreen.\n */\nfunction exitFullScreen() {\n    if (document.exitFullscreen) {\n        document.exitFullscreen();\n    }\n    else if (document['msExitFullscreen']) {\n        document['msExitFullscreen']();\n    }\n    else if (document['webkitExitFullscreen']) {\n        document['webkitExitFullscreen']();\n    }\n}\nexport default FullScreen;\n//# sourceMappingURL=FullScreen.js.map","/**\n * @module ol/control/MousePosition\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d,
  b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Control from './Control.js';\nimport EventType from '../pointer/EventType.js';\nimport { getChangeEventType } from '../Object.js';\nimport { get as getProjection, getTransformFromProjections, getUserProjection, identityTransform, } from '../proj.js';\nimport { listen } from '../events.js';\n/**\n * @type {string}\n */\nvar PROJECTION = 'projection';\n/**\n * @type {string}\n */\nvar COORDINATE_FORMAT = 'coordinateFormat';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-mouse-position'] CSS class name.\n * @property {import(\"../coordinate.js\").CoordinateFormat} [coordinateFormat] Coordinate format.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Functio
 n called when the\n * control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {string} [undefinedHTML=' '] Markup to show when coordinates are not\n * available (e.g. when the pointer leaves the map viewport).  By default, the last position\n * will be replaced with `' '` (` `) when the pointer leaves the viewport.  To\n * retain the last rendered position, set this option to something falsey (like an empty\n * string `''`).\n */\n/**\n * @classdesc\n * A control to show the 2D coordinates of the mouse cursor. By default, these\n * are in the view projection, but can be in any supported projection.\n * By default the control is shown in the top right corner of the map, but this\n * can be changed by using the css selector `.ol-mouse-position`.\n *\n * On touch devices, which usually do not
  have a mouse cursor, the coordinates\n * of the currently touched position are shown.\n *\n * @api\n */\nvar MousePosition = /** @class */ (function (_super) {\n    __extends(MousePosition, _super);\n    /**\n     * @param {Options=} opt_options Mouse position options.\n     */\n    function MousePosition(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var element = document.createElement('div');\n        element.className =\n            options.className !== undefined ? options.className : 'ol-mouse-position';\n        _this = _super.call(this, {\n            element: element,\n            render: options.render,\n            target: options.target,\n        }) || this;\n        _this.addEventListener(getChangeEventType(PROJECTION), _this.handleProjectionChanged_);\n        if (options.coordinateFormat) {\n            _this.setCoordinateFormat(options.coordinateFormat);\n        }\n        if (options.projection) {\n       
      _this.setProjection(options.projection);\n        }\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.undefinedHTML_ =\n            options.undefinedHTML !== undefined ? options.undefinedHTML : ' ';\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderOnMouseOut_ = !!_this.undefinedHTML_;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.renderedHTML_ = element.innerHTML;\n        /**\n         * @private\n         * @type {?import(\"../proj/Projection.js\").default}\n         */\n        _this.mapProjection_ = null;\n        /**\n         * @private\n         * @type {?import(\"../proj.js\").TransformFunction}\n         */\n        _this.transform_ = null;\n        return _this;\n    }\n    /**\n     * @private\n     */\n    MousePosition.prototype.handleProjectionChanged_ = function () {\n        this.transform_ = null;\n    };\n    /**\n     * Return 
 the coordinate format type used to render the current position or\n     * undefined.\n     * @return {import(\"../coordinate.js\").CoordinateFormat|undefined} The format to render the current\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.getCoordinateFormat = function () {\n        return /** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */ (this.get(COORDINATE_FORMAT));\n    };\n    /**\n     * Return the projection that is used to report the mouse position.\n     * @return {import(\"../proj/Projection.js\").default|undefined} The projection to report mouse\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.getProjection = function () {\n        return /** @type {import(\"../proj/Projection.js\").default|undefined} */ (this.get(PROJECTION));\n    };\n    /**\n     * @param {MouseEvent} event Browser event.\n     * @protected\n     */\n    MousePosition.prototype.handleMo
 useMove = function (event) {\n        var map = this.getMap();\n        this.updateHTML_(map.getEventPixel(event));\n    };\n    /**\n     * @param {Event} event Browser event.\n     * @protected\n     */\n    MousePosition.prototype.handleMouseOut = function (event) {\n        this.updateHTML_(null);\n    };\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    MousePosition.prototype.setMap = function (map) {\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            var viewport = map.getViewport();\n            this.listenerKeys.push(listen(viewport, EventType.POINTERMOVE, this.handleMouseMove, this));\n            if (this.renderOnMouseOut_) {\n                this.listenerKeys.push(listen(viewport, EventType.POINTEROUT, this.handleM
 ouseOut, this));\n            }\n        }\n    };\n    /**\n     * Set the coordinate format type used to render the current position.\n     * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.setCoordinateFormat = function (format) {\n        this.set(COORDINATE_FORMAT, format);\n    };\n    /**\n     * Set the projection that is used to report the mouse position.\n     * @param {import(\"../proj.js\").ProjectionLike} projection The projection to report mouse\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.setProjection = function (projection) {\n        this.set(PROJECTION, getProjection(projection));\n    };\n    /**\n     * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @private\n     */\n    MousePosition.prototype.updateHTML_ = function (pixel) {\n        var html = this.undef
 inedHTML_;\n        if (pixel && this.mapProjection_) {\n            if (!this.transform_) {\n                var projection = this.getProjection();\n                if (projection) {\n                    this.transform_ = getTransformFromProjections(this.mapProjection_, projection);\n                }\n                else {\n                    this.transform_ = identityTransform;\n                }\n            }\n            var map = this.getMap();\n            var coordinate = map.getCoordinateFromPixelInternal(pixel);\n            if (coordinate) {\n                var userProjection = getUserProjection();\n                if (userProjection) {\n                    this.transform_ = getTransformFromProjections(this.mapProjection_, userProjection);\n                }\n                this.transform_(coordinate, coordinate);\n                var coordinateFormat = this.getCoordinateFormat();\n                if (coordinateFormat) {\n                    html = coordinateFormat(c
 oordinate);\n                }\n                else {\n                    html = coordinate.toString();\n                }\n            }\n        }\n        if (!this.renderedHTML_ || html !== this.renderedHTML_) {\n            this.element.innerHTML = html;\n            this.renderedHTML_ = html;\n        }\n    };\n    /**\n     * Update the projection. Rendering of the coordinates is done in\n     * `handleMouseMove` and `handleMouseUp`.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    MousePosition.prototype.render = function (mapEvent) {\n        var frameState = mapEvent.frameState;\n        if (!frameState) {\n            this.mapProjection_ = null;\n        }\n        else {\n            if (this.mapProjection_ != frameState.viewState.projection) {\n                this.mapProjection_ = frameState.viewState.projection;\n                this.transform_ = null;\n            }\n        }\n    };\n    return MousePosition
 ;\n}(Control));\nexport default MousePosition;\n//# sourceMappingURL=MousePosition.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/OverviewMap\n */\nimport CompositeMapRenderer from '../renderer/Composite.js';\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport MapEventType from '../MapEventType.js';\nimport MapProperty from '../MapProperty.js';\nimport ObjectEventT
 ype from '../ObjectEventType.js';\nimport Overlay from '../Overlay.js';\nimport OverlayPositioning from '../OverlayPositioning.js';\nimport PluggableMap from '../PluggableMap.js';\nimport View from '../View.js';\nimport ViewProperty from '../ViewProperty.js';\nimport { CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { containsExtent, equals as equalsExtent, getBottomRight, getTopLeft, scaleFromCenter, } from '../extent.js';\nimport { getChangeEventType } from '../Object.js';\nimport { listen, listenOnce } from '../events.js';\nimport { fromExtent as polygonFromExtent } from '../geom/Polygon.js';\nimport { replaceNode } from '../dom.js';\n/**\n * Maximum width and/or height extent ratio that determines when the overview\n * map should be zoomed out.\n * @type {number}\n */\nvar MAX_RATIO = 0.75;\n/**\n * Minimum width and/or height extent ratio that determines when the overview\n * map should be zoomed in.\n * @type {number}\n */\nvar MIN_RATIO = 0.1;\n
 var ControlledMap = /** @class */ (function (_super) {\n    __extends(ControlledMap, _super);\n    function ControlledMap() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    ControlledMap.prototype.createRenderer = function () {\n        return new CompositeMapRenderer(this);\n    };\n    return ControlledMap;\n}(PluggableMap));\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-overviewmap'] CSS class name.\n * @property {boolean} [collapsed=true] Whether the control should start collapsed or not (expanded).\n * @property {string|HTMLElement} [collapseLabel='«'] Text label to use for the\n * expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {boolean} [collapsible=true] Whether the control can be collapsed or not.\n * @property {string|HTMLElement} [label='»'] Text label to use for the collapsed\n * overviewmap button. Instead of text, also an element (e.g. a 
 `span` element) can be used.\n * @property {Array<import(\"../layer/Layer.js\").default>|import(\"../Collection.js\").default<import(\"../layer/Layer.js\").default>} [layers]\n * Layers for the overview map.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {boolean} [rotateWithView=false] Whether the control view should rotate with the main map view.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string} [tipLabel='Overview map'] Text label to use for the button tip.\n * @property {View} [view] Custom view for the overview map (should use same projection as main map). If not provided,\n * a default view with the same projection as the main map will be used.\n */\n/**\n * Create a new control with a map acting as an overview map fo
 r another\n * defined map.\n *\n * @api\n */\nvar OverviewMap = /** @class */ (function (_super) {\n    __extends(OverviewMap, _super);\n    /**\n     * @param {Options=} opt_options OverviewMap options.\n     */\n    function OverviewMap(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target,\n        }) || this;\n        /**\n         * @private\n         */\n        _this.boundHandleRotationChanged_ = _this.handleRotationChanged_.bind(_this);\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.collapsed_ =\n            options.collapsed !== undefined ? options.collapsed : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.collapsible_ =\n            options.collapsible !== undefined ? options.coll
 apsible : true;\n        if (!_this.collapsible_) {\n            _this.collapsed_ = false;\n        }\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.rotateWithView_ =\n            options.rotateWithView !== undefined ? options.rotateWithView : false;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent|undefined}\n         */\n        _this.viewExtent_ = undefined;\n        var className = options.className !== undefined ? options.className : 'ol-overviewmap';\n        var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Overview map';\n        var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u00AB';\n        if (typeof collapseLabel === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.collapseLabel_ = document.createElement('span');\n            _this.collapseLabel_.textContent = co
 llapseLabel;\n        }\n        else {\n            _this.collapseLabel_ = collapseLabel;\n        }\n        var label = options.label !== undefined ? options.label : '\\u00BB';\n        if (typeof label === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.label_ = document.createElement('span');\n            _this.label_.textContent = label;\n        }\n        else {\n            _this.label_ = label;\n        }\n        var activeLabel = _this.collapsible_ && !_this.collapsed_ ? _this.collapseLabel_ : _this.label_;\n        var button = document.createElement('button');\n        button.setAttribute('type', 'button');\n        button.title = tipLabel;\n        button.appendChild(activeLabel);\n        button.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        /**\n         * @type {HTMLElement}\n         * @private\n         */\n        _this.ovmapDiv_ = document.createEle
 ment('div');\n        _this.ovmapDiv_.className = 'ol-overviewmap-map';\n        /**\n         * Explicitly given view to be used instead of a view derived from the main map.\n         * @type {View}\n         * @private\n         */\n        _this.view_ = options.view;\n        /**\n         * @type {ControlledMap}\n         * @private\n         */\n        _this.ovmap_ = new ControlledMap({\n            view: options.view,\n        });\n        var ovmap = _this.ovmap_;\n        if (options.layers) {\n            options.layers.forEach(function (layer) {\n                ovmap.addLayer(layer);\n            });\n        }\n        var box = document.createElement('div');\n        box.className = 'ol-overviewmap-box';\n        box.style.boxSizing = 'border-box';\n        /**\n         * @type {import(\"../Overlay.js\").default}\n         * @private\n         */\n        _this.boxOverlay_ = new Overlay({\n            position: [0, 0],\n            positioning: OverlayPositioning.CENT
 ER_CENTER,\n            element: box,\n        });\n        _this.ovmap_.addOverlay(_this.boxOverlay_);\n        var cssClasses = className +\n            ' ' +\n            CLASS_UNSELECTABLE +\n            ' ' +\n            CLASS_CONTROL +\n            (_this.collapsed_ && _this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n            (_this.collapsible_ ? '' : ' ol-uncollapsible');\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(_this.ovmapDiv_);\n        element.appendChild(button);\n        /* Interactive map */\n        var scope = _this;\n        var overlay = _this.boxOverlay_;\n        var overlayBox = _this.boxOverlay_.getElement();\n        /* Functions definition */\n        var computeDesiredMousePosition = function (mousePosition) {\n            return {\n                clientX: mousePosition.clientX,\n                clientY: mousePosition.clientY,\n            };\n        };\n        var move = function (
 event) {\n            var position = /** @type {?} */ (computeDesiredMousePosition(event));\n            var coordinates = ovmap.getEventCoordinateInternal(\n            /** @type {MouseEvent} */ (position));\n            overlay.setPosition(coordinates);\n        };\n        var endMoving = function (event) {\n            var coordinates = ovmap.getEventCoordinateInternal(event);\n            scope.getMap().getView().setCenterInternal(coordinates);\n            window.removeEventListener('mousemove', move);\n            window.removeEventListener('mouseup', endMoving);\n        };\n        /* Binding */\n        overlayBox.addEventListener('mousedown', function () {\n            window.addEventListener('mousemove', move);\n            window.addEventListener('mouseup', endMoving);\n        });\n        return _this;\n    }\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes
  to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    OverviewMap.prototype.setMap = function (map) {\n        var oldMap = this.getMap();\n        if (map === oldMap) {\n            return;\n        }\n        if (oldMap) {\n            var oldView = oldMap.getView();\n            if (oldView) {\n                this.unbindView_(oldView);\n            }\n            this.ovmap_.setTarget(null);\n        }\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            this.ovmap_.setTarget(this.ovmapDiv_);\n            this.listenerKeys.push(listen(map, ObjectEventType.PROPERTYCHANGE, this.handleMapPropertyChange_, this));\n            var view = map.getView();\n            if (view) {\n                this.bindView_(view);\n                if (view.isDef()) {\n                    this.ovmap_.updateSize();\n                    this.resetExtent_();\n                }\n            }\n        }\n    };\
 n    /**\n     * Handle map property changes.  This only deals with changes to the map's view.\n     * @param {import(\"../Object.js\").ObjectEvent} event The propertychange event.\n     * @private\n     */\n    OverviewMap.prototype.handleMapPropertyChange_ = function (event) {\n        if (event.key === MapProperty.VIEW) {\n            var oldView = /** @type {import(\"../View.js\").default} */ (event.oldValue);\n            if (oldView) {\n                this.unbindView_(oldView);\n            }\n            var newView = this.getMap().getView();\n            this.bindView_(newView);\n        }\n    };\n    /**\n     * Register listeners for view property changes.\n     * @param {import(\"../View.js\").default} view The view.\n     * @private\n     */\n    OverviewMap.prototype.bindView_ = function (view) {\n        if (!this.view_) {\n            // Unless an explicit view definition was given, derive default from whatever main map uses.\n            var newView = new View({\n 
                projection: view.getProjection(),\n            });\n            this.ovmap_.setView(newView);\n        }\n        view.addEventListener(getChangeEventType(ViewProperty.ROTATION), this.boundHandleRotationChanged_);\n        // Sync once with the new view\n        this.handleRotationChanged_();\n    };\n    /**\n     * Unregister listeners for view property changes.\n     * @param {import(\"../View.js\").default} view The view.\n     * @private\n     */\n    OverviewMap.prototype.unbindView_ = function (view) {\n        view.removeEventListener(getChangeEventType(ViewProperty.ROTATION), this.boundHandleRotationChanged_);\n    };\n    /**\n     * Handle rotation changes to the main map.\n     * @private\n     */\n    OverviewMap.prototype.handleRotationChanged_ = function () {\n        if (this.rotateWithView_) {\n            this.ovmap_.getView().setRotation(this.getMap().getView().getRotation());\n        }\n    };\n    /**\n     * Reset the overview map extent if the 
 box size (width or\n     * height) is less than the size of the overview map size times minRatio\n     * or is greater than the size of the overview size times maxRatio.\n     *\n     * If the map extent was not reset, the box size can fits in the defined\n     * ratio sizes. This method then checks if is contained inside the overview\n     * map current extent. If not, recenter the overview map to the current\n     * main map center location.\n     * @private\n     */\n    OverviewMap.prototype.validateExtent_ = function () {\n        var map = this.getMap();\n        var ovmap = this.ovmap_;\n        if (!map.isRendered() || !ovmap.isRendered()) {\n            return;\n        }\n        var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n        var view = map.getView();\n        var extent = view.calculateExtentInternal(mapSize);\n        if (this.viewExtent_ && equalsExtent(extent, this.viewExtent_)) {\n            // repeats of the same extent may indica
 te constraint conflicts leading to an endless cycle\n            return;\n        }\n        this.viewExtent_ = extent;\n        var ovmapSize = /** @type {import(\"../size.js\").Size} */ (ovmap.getSize());\n        var ovview = ovmap.getView();\n        var ovextent = ovview.calculateExtentInternal(ovmapSize);\n        var topLeftPixel = ovmap.getPixelFromCoordinateInternal(getTopLeft(extent));\n        var bottomRightPixel = ovmap.getPixelFromCoordinateInternal(getBottomRight(extent));\n        var boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);\n        var boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);\n        var ovmapWidth = ovmapSize[0];\n        var ovmapHeight = ovmapSize[1];\n        if (boxWidth < ovmapWidth * MIN_RATIO ||\n            boxHeight < ovmapHeight * MIN_RATIO ||\n            boxWidth > ovmapWidth * MAX_RATIO ||\n            boxHeight > ovmapHeight * MAX_RATIO) {\n            this.resetExtent_();\n        }\n        else if (!contains
 Extent(ovextent, extent)) {\n            this.recenter_();\n        }\n    };\n    /**\n     * Reset the overview map extent to half calculated min and max ratio times\n     * the extent of the main map.\n     * @private\n     */\n    OverviewMap.prototype.resetExtent_ = function () {\n        if (MAX_RATIO === 0 || MIN_RATIO === 0) {\n            return;\n        }\n        var map = this.getMap();\n        var ovmap = this.ovmap_;\n        var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n        var view = map.getView();\n        var extent = view.calculateExtentInternal(mapSize);\n        var ovview = ovmap.getView();\n        // get how many times the current map overview could hold different\n        // box sizes using the min and max ratio, pick the step in the middle used\n        // to calculate the extent from the main map to set it to the overview map,\n        var steps = Math.log(MAX_RATIO / MIN_RATIO) / Math.LN2;\n        var ratio = 1 / (Math.
 pow(2, steps / 2) * MIN_RATIO);\n        scaleFromCenter(extent, ratio);\n        ovview.fitInternal(polygonFromExtent(extent));\n    };\n    /**\n     * Set the center of the overview map to the map center without changing its\n     * resolution.\n     * @private\n     */\n    OverviewMap.prototype.recenter_ = function () {\n        var map = this.getMap();\n        var ovmap = this.ovmap_;\n        var view = map.getView();\n        var ovview = ovmap.getView();\n        ovview.setCenterInternal(view.getCenterInternal());\n    };\n    /**\n     * Update the box using the main map extent\n     * @private\n     */\n    OverviewMap.prototype.updateBox_ = function () {\n        var map = this.getMap();\n        var ovmap = this.ovmap_;\n        if (!map.isRendered() || !ovmap.isRendered()) {\n            return;\n        }\n        var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n        var view = map.getView();\n        var ovview = ovmap.getView();\n      
   var rotation = this.rotateWithView_ ? 0 : -view.getRotation();\n        var overlay = this.boxOverlay_;\n        var box = this.boxOverlay_.getElement();\n        var center = view.getCenterInternal();\n        var resolution = view.getResolution();\n        var ovresolution = ovview.getResolution();\n        var width = (mapSize[0] * resolution) / ovresolution;\n        var height = (mapSize[1] * resolution) / ovresolution;\n        // set position using center coordinates\n        overlay.setPosition(center);\n        // set box size calculated from map extent size and overview map resolution\n        if (box) {\n            box.style.width = width + 'px';\n            box.style.height = height + 'px';\n            var transform = 'rotate(' + rotation + 'rad)';\n            box.style.transform = transform;\n        }\n    };\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    OverviewMap.prototype.handleClick_ = function (event) {\n     
    event.preventDefault();\n        this.handleToggle_();\n    };\n    /**\n     * @private\n     */\n    OverviewMap.prototype.handleToggle_ = function () {\n        this.element.classList.toggle(CLASS_COLLAPSED);\n        if (this.collapsed_) {\n            replaceNode(this.collapseLabel_, this.label_);\n        }\n        else {\n            replaceNode(this.label_, this.collapseLabel_);\n        }\n        this.collapsed_ = !this.collapsed_;\n        // manage overview map if it had not been rendered before and control\n        // is expanded\n        var ovmap = this.ovmap_;\n        if (!this.collapsed_) {\n            if (ovmap.isRendered()) {\n                this.viewExtent_ = undefined;\n                ovmap.render();\n                return;\n            }\n            ovmap.updateSize();\n            this.resetExtent_();\n            listenOnce(ovmap, MapEventType.POSTRENDER, function (event) {\n                this.updateBox_();\n            }, this);\n        }\n    }
 ;\n    /**\n     * Return `true` if the overview map is collapsible, `false` otherwise.\n     * @return {boolean} True if the widget is collapsible.\n     * @api\n     */\n    OverviewMap.prototype.getCollapsible = function () {\n        return this.collapsible_;\n    };\n    /**\n     * Set whether the overview map should be collapsible.\n     * @param {boolean} collapsible True if the widget is collapsible.\n     * @api\n     */\n    OverviewMap.prototype.setCollapsible = function (collapsible) {\n        if (this.collapsible_ === collapsible) {\n            return;\n        }\n        this.collapsible_ = collapsible;\n        this.element.classList.toggle('ol-uncollapsible');\n        if (!collapsible && this.collapsed_) {\n            this.handleToggle_();\n        }\n    };\n    /**\n     * Collapse or expand the overview map according to the passed parameter. Will\n     * not do anything if the overview map isn't collapsible or if the current\n     * collapsed state is already
  the one requested.\n     * @param {boolean} collapsed True if the widget is collapsed.\n     * @api\n     */\n    OverviewMap.prototype.setCollapsed = function (collapsed) {\n        if (!this.collapsible_ || this.collapsed_ === collapsed) {\n            return;\n        }\n        this.handleToggle_();\n    };\n    /**\n     * Determine if the overview map is collapsed.\n     * @return {boolean} The overview map is collapsed.\n     * @api\n     */\n    OverviewMap.prototype.getCollapsed = function () {\n        return this.collapsed_;\n    };\n    /**\n     * Return `true` if the overview map view can rotate, `false` otherwise.\n     * @return {boolean} True if the control view can rotate.\n     * @api\n     */\n    OverviewMap.prototype.getRotateWithView = function () {\n        return this.rotateWithView_;\n    };\n    /**\n     * Set whether the overview map view should rotate with the main map view.\n     * @param {boolean} rotateWithView True if the control view should rotate
 .\n     * @api\n     */\n    OverviewMap.prototype.setRotateWithView = function (rotateWithView) {\n        if (this.rotateWithView_ === rotateWithView) {\n            return;\n        }\n        this.rotateWithView_ = rotateWithView;\n        if (this.getMap().getView().getRotation() !== 0) {\n            if (this.rotateWithView_) {\n                this.handleRotationChanged_();\n            }\n            else {\n                this.ovmap_.getView().setRotation(0);\n            }\n            this.viewExtent_ = undefined;\n            this.validateExtent_();\n            this.updateBox_();\n        }\n    };\n    /**\n     * Return the overview map.\n     * @return {import(\"../PluggableMap.js\").default} Overview map.\n     * @api\n     */\n    OverviewMap.prototype.getOverviewMap = function () {\n        return this.ovmap_;\n    };\n    /**\n     * Update the overview map element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     *
 /\n    OverviewMap.prototype.render = function (mapEvent) {\n        this.validateExtent_();\n        this.updateBox_();\n    };\n    return OverviewMap;\n}(Control));\nexport default OverviewMap;\n//# sourceMappingURL=OverviewMap.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/ScaleLine\n */\nimport Control from './Control.js';\nimport ProjUnits from '../proj/Units.js';\nimport { CLASS_UNSELECTABLE } from 
 '../css.js';\nimport { METERS_PER_UNIT, getPointResolution } from '../proj.js';\nimport { assert } from '../asserts.js';\nimport { getChangeEventType } from '../Object.js';\n/**\n * @type {string}\n */\nvar UNITS_PROP = 'units';\n/**\n * Units for the scale line. Supported values are `'degrees'`, `'imperial'`,\n * `'nautical'`, `'metric'`, `'us'`.\n * @enum {string}\n */\nexport var Units = {\n    DEGREES: 'degrees',\n    IMPERIAL: 'imperial',\n    NAUTICAL: 'nautical',\n    METRIC: 'metric',\n    US: 'us',\n};\n/**\n * @const\n * @type {Array<number>}\n */\nvar LEADING_DIGITS = [1, 2, 5];\n/**\n * @const\n * @type {number}\n */\nvar DEFAULT_DPI = 25.4 / 0.28;\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-scale-line'] CSS Class name.\n * @property {number} [minWidth=64] Minimum width in pixels at the OGC default dpi. The width will be\n * adjusted to match the dpi used.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function cal
 led when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {import(\"./ScaleLine.js\").Units|string} [units='metric'] Units.\n * @property {boolean} [bar=false] Render scalebars instead of a line.\n * @property {number} [steps=4] Number of steps the scalebar should use. Use even numbers\n * for best results. Only applies when `bar` is `true`.\n * @property {boolean} [text=false] Render the text scale above of the scalebar. Only applies\n * when `bar` is `true`.\n * @property {number|undefined} [dpi=undefined] dpi of output device such as printer. Only applies\n * when `bar` is `true`. If undefined the OGC default screen pixel size of 0.28mm will be assumed.\n */\n/**\n * @classdesc\n * A control displaying rough y-axis distances, calculated for the center of the\n * viewport. For conformal proj
 ections (e.g. EPSG:3857, the default view\n * projection in OpenLayers), the scale is valid for all directions.\n * No scale line will be shown when the y-axis distance of a pixel at the\n * viewport center cannot be calculated in the view projection.\n * By default the scale line will show in the bottom left portion of the map,\n * but this can be changed by using the css selector `.ol-scale-line`.\n * When specifying `bar` as `true`, a scalebar will be rendered instead\n * of a scaleline.\n *\n * @api\n */\nvar ScaleLine = /** @class */ (function (_super) {\n    __extends(ScaleLine, _super);\n    /**\n     * @param {Options=} opt_options Scale line options.\n     */\n    function ScaleLine(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var className = options.className !== undefined\n            ? options.className\n            : options.bar\n                ? 'ol-scale-bar'\n                : 'ol-scale-line';\n        _th
 is = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target,\n        }) || this;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.innerElement_ = document.createElement('div');\n        _this.innerElement_.className = className + '-inner';\n        _this.element.className = className + ' ' + CLASS_UNSELECTABLE;\n        _this.element.appendChild(_this.innerElement_);\n        /**\n         * @private\n         * @type {?import(\"../View.js\").State}\n         */\n        _this.viewState_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.minWidth_ = options.minWidth !== undefined ? options.minWidth : 64;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderedVisible_ = false;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n 
        _this.renderedWidth_ = undefined;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.renderedHTML_ = '';\n        _this.addEventListener(getChangeEventType(UNITS_PROP), _this.handleUnitsChanged_);\n        _this.setUnits(options.units || Units.METRIC);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.scaleBar_ = options.bar || false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.scaleBarSteps_ = options.steps || 4;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.scaleBarText_ = options.text || false;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.dpi_ = options.dpi || undefined;\n        return _this;\n    }\n    /**\n     * Return the units to use in the scale line.\n     * @return {import(\"./ScaleLine.js\").Units} The units\n     * to use in the scale line.\n  
    * @observable\n     * @api\n     */\n    ScaleLine.prototype.getUnits = function () {\n        return this.get(UNITS_PROP);\n    };\n    /**\n     * @private\n     */\n    ScaleLine.prototype.handleUnitsChanged_ = function () {\n        this.updateElement_();\n    };\n    /**\n     * Set the units to use in the scale line.\n     * @param {import(\"./ScaleLine.js\").Units} units The units to use in the scale line.\n     * @observable\n     * @api\n     */\n    ScaleLine.prototype.setUnits = function (units) {\n        this.set(UNITS_PROP, units);\n    };\n    /**\n     * Specify the dpi of output device such as printer.\n     * @param {number|undefined} dpi The dpi of output device.\n     * @api\n     */\n    ScaleLine.prototype.setDpi = function (dpi) {\n        this.dpi_ = dpi;\n    };\n    /**\n     * @private\n     */\n    ScaleLine.prototype.updateElement_ = function () {\n        var viewState = this.viewState_;\n        if (!viewState) {\n            if (this.renderedVisibl
 e_) {\n                this.element.style.display = 'none';\n                this.renderedVisible_ = false;\n            }\n            return;\n        }\n        var center = viewState.center;\n        var projection = viewState.projection;\n        var units = this.getUnits();\n        var pointResolutionUnits = units == Units.DEGREES ? ProjUnits.DEGREES : ProjUnits.METERS;\n        var pointResolution = getPointResolution(projection, viewState.resolution, center, pointResolutionUnits);\n        var minWidth = (this.minWidth_ * (this.dpi_ || DEFAULT_DPI)) / DEFAULT_DPI;\n        var nominalCount = minWidth * pointResolution;\n        var suffix = '';\n        if (units == Units.DEGREES) {\n            var metersPerDegree = METERS_PER_UNIT[ProjUnits.DEGREES];\n            nominalCount *= metersPerDegree;\n            if (nominalCount < metersPerDegree / 60) {\n                suffix = '\\u2033'; // seconds\n                pointResolution *= 3600;\n            }\n            else 
 if (nominalCount < metersPerDegree) {\n                suffix = '\\u2032'; // minutes\n                pointResolution *= 60;\n            }\n            else {\n                suffix = '\\u00b0'; // degrees\n            }\n        }\n        else if (units == Units.IMPERIAL) {\n            if (nominalCount < 0.9144) {\n                suffix = 'in';\n                pointResolution /= 0.0254;\n            }\n            else if (nominalCount < 1609.344) {\n                suffix = 'ft';\n                pointResolution /= 0.3048;\n            }\n            else {\n                suffix = 'mi';\n                pointResolution /= 1609.344;\n            }\n        }\n        else if (units == Units.NAUTICAL) {\n            pointResolution /= 1852;\n            suffix = 'nm';\n        }\n        else if (units == Units.METRIC) {\n            if (nominalCount < 0.001) {\n                suffix = 'μm';\n                pointResolution *= 1000000;\n            }\n            else if 
 (nominalCount < 1) {\n                suffix = 'mm';\n                pointResolution *= 1000;\n            }\n            else if (nominalCount < 1000) {\n                suffix = 'm';\n            }\n            else {\n                suffix = 'km';\n                pointResolution /= 1000;\n            }\n        }\n        else if (units == Units.US) {\n            if (nominalCount < 0.9144) {\n                suffix = 'in';\n                pointResolution *= 39.37;\n            }\n            else if (nominalCount < 1609.344) {\n                suffix = 'ft';\n                pointResolution /= 0.30480061;\n            }\n            else {\n                suffix = 'mi';\n                pointResolution /= 1609.3472;\n            }\n        }\n        else {\n            assert(false, 33); // Invalid units\n        }\n        var i = 3 * Math.floor(Math.log(minWidth * pointResolution) / Math.log(10));\n        var count, width, decimalCount;\n        while (true) {\n        
     decimalCount = Math.floor(i / 3);\n            var decimal = Math.pow(10, decimalCount);\n            count = LEADING_DIGITS[((i % 3) + 3) % 3] * decimal;\n            width = Math.round(count / pointResolution);\n            if (isNaN(width)) {\n                this.element.style.display = 'none';\n                this.renderedVisible_ = false;\n                return;\n            }\n            else if (width >= minWidth) {\n                break;\n            }\n            ++i;\n        }\n        var html;\n        if (this.scaleBar_) {\n            html = this.createScaleBar(width, count, suffix);\n        }\n        else {\n            html = count.toFixed(decimalCount < 0 ? -decimalCount : 0) + ' ' + suffix;\n        }\n        if (this.renderedHTML_ != html) {\n            this.innerElement_.innerHTML = html;\n            this.renderedHTML_ = html;\n        }\n        if (this.renderedWidth_ != width) {\n            this.innerElement_.style.width = width + 'px';\n     
        this.renderedWidth_ = width;\n        }\n        if (!this.renderedVisible_) {\n            this.element.style.display = '';\n            this.renderedVisible_ = true;\n        }\n    };\n    /**\n     * @private\n     * @param {number} width The current width of the scalebar.\n     * @param {number} scale The current scale.\n     * @param {string} suffix The suffix to append to the scale text.\n     * @returns {string} The stringified HTML of the scalebar.\n     */\n    ScaleLine.prototype.createScaleBar = function (width, scale, suffix) {\n        var mapScale = '1 : ' + Math.round(this.getScaleForResolution()).toLocaleString();\n        var scaleSteps = [];\n        var stepWidth = width / this.scaleBarSteps_;\n        var backgroundColor = '#ffffff';\n        for (var i = 0; i < this.scaleBarSteps_; i++) {\n            if (i === 0) {\n                // create the first marker at position 0\n                scaleSteps.push(this.createMarker('absolute', i));\n            }
 \n            scaleSteps.push('<div>' +\n                '<div ' +\n                'class=\"ol-scale-singlebar\" ' +\n                'style=' +\n                '\"width: ' +\n                stepWidth +\n                'px;' +\n                'background-color: ' +\n                backgroundColor +\n                ';\"' +\n                '>' +\n                '</div>' +\n                this.createMarker('relative', i) +\n                /*render text every second step, except when only 2 steps */\n                (i % 2 === 0 || this.scaleBarSteps_ === 2\n                    ? this.createStepText(i, width, false, scale, suffix)\n                    : '') +\n                '</div>');\n            if (i === this.scaleBarSteps_ - 1) {\n                {\n                    /*render text at the end */\n                }\n                scaleSteps.push(this.createStepText(i + 1, width, true, scale, suffix));\n            }\n            // switch colors of steps between black
  and white\n            if (backgroundColor === '#ffffff') {\n                backgroundColor = '#000000';\n            }\n            else {\n                backgroundColor = '#ffffff';\n            }\n        }\n        var scaleBarText;\n        if (this.scaleBarText_) {\n            scaleBarText =\n                '<div ' +\n                    'class=\"ol-scale-text\" ' +\n                    'style=\"width: ' +\n                    width +\n                    'px;\">' +\n                    mapScale +\n                    '</div>';\n        }\n        else {\n            scaleBarText = '';\n        }\n        var container = '<div ' +\n            'style=\"display: flex;\">' +\n            scaleBarText +\n            scaleSteps.join('') +\n            '</div>';\n        return container;\n    };\n    /**\n     * Creates a marker at given position\n     * @param {string} position - The position, absolute or relative\n     * @param {number} i - The iterator\n     * @returns {s
 tring} The stringified div containing the marker\n     */\n    ScaleLine.prototype.createMarker = function (position, i) {\n        var top = position === 'absolute' ? 3 : -10;\n        return ('<div ' +\n            'class=\"ol-scale-step-marker\" ' +\n            'style=\"position: ' +\n            position +\n            ';' +\n            'top: ' +\n            top +\n            'px;\"' +\n            '></div>');\n    };\n    /**\n     * Creates the label for a marker marker at given position\n     * @param {number} i - The iterator\n     * @param {number} width - The width the scalebar will currently use\n     * @param {boolean} isLast - Flag indicating if we add the last step text\n     * @param {number} scale - The current scale for the whole scalebar\n     * @param {string} suffix - The suffix for the scale\n     * @returns {string} The stringified div containing the step text\n     */\n    ScaleLine.prototype.createStepText = function (i, width, isLast, scale, suffix) {\n 
        var length = i === 0 ? 0 : Math.round((scale / this.scaleBarSteps_) * i * 100) / 100;\n        var lengthString = length + (i === 0 ? '' : ' ' + suffix);\n        var margin = i === 0 ? -3 : (width / this.scaleBarSteps_) * -1;\n        var minWidth = i === 0 ? 0 : (width / this.scaleBarSteps_) * 2;\n        return ('<div ' +\n            'class=\"ol-scale-step-text\" ' +\n            'style=\"' +\n            'margin-left: ' +\n            margin +\n            'px;' +\n            'text-align: ' +\n            (i === 0 ? 'left' : 'center') +\n            '; ' +\n            'min-width: ' +\n            minWidth +\n            'px;' +\n            'left: ' +\n            (isLast ? width + 'px' : 'unset') +\n            ';\"' +\n            '>' +\n            lengthString +\n            '</div>');\n    };\n    /**\n     * Returns the appropriate scale for the given resolution and units.\n     * @return {number} The appropriate scale.\n     */\n    ScaleLine.prototype.getScaleF
 orResolution = function () {\n        var resolution = getPointResolution(this.viewState_.projection, this.viewState_.resolution, this.viewState_.center);\n        var dpi = this.dpi_ || DEFAULT_DPI;\n        var mpu = this.viewState_.projection.getMetersPerUnit();\n        var inchesPerMeter = 39.37;\n        return parseFloat(resolution.toString()) * mpu * inchesPerMeter * dpi;\n    };\n    /**\n     * Update the scale line element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    ScaleLine.prototype.render = function (mapEvent) {\n        var frameState = mapEvent.frameState;\n        if (!frameState) {\n            this.viewState_ = null;\n        }\n        else {\n            this.viewState_ = frameState.viewState;\n        }\n        this.updateElement_();\n    };\n    return ScaleLine;\n}(Control));\nexport default ScaleLine;\n//# sourceMappingURL=ScaleLine.js.map","/**\n * @module ol/control/ZoomSlider\n */\nvar __exten
 ds = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport PointerEventType from '../pointer/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { clamp } from '../math.js';\nimport { easeOut } from '../easing.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { stopPropagation } from '../events/Event.js';\n/**\n * The en
 um for available directions.\n *\n * @enum {number}\n */\nvar Direction = {\n    VERTICAL: 0,\n    HORIZONTAL: 1,\n};\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoomslider'] CSS class name.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n */\n/**\n * @classdesc\n * A slider type of control for zooming.\n *\n * Example:\n *\n *     map.addControl(new ZoomSlider());\n *\n * @api\n */\nvar ZoomSlider = /** @class */ (function (_super) {\n    __extends(ZoomSlider, _super);\n    /**\n     * @param {Options=} opt_options Zoom slider options.\n     */\n    function ZoomSlider(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElem
 ent('div'),\n            render: options.render,\n        }) || this;\n        /**\n         * @type {!Array.<import(\"../events.js\").EventsKey>}\n         * @private\n         */\n        _this.dragListenerKeys_ = [];\n        /**\n         * Will hold the current resolution of the view.\n         *\n         * @type {number|undefined}\n         * @private\n         */\n        _this.currentResolution_ = undefined;\n        /**\n         * The direction of the slider. Will be determined from actual display of the\n         * container and defaults to Direction.VERTICAL.\n         *\n         * @type {Direction}\n         * @private\n         */\n        _this.direction_ = Direction.VERTICAL;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.dragging_;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.heightLimit_ = 0;\n        /**\n         * @type {number}\n         * @private\n         */\n        _th
 is.widthLimit_ = 0;\n        /**\n         * @type {number|undefined}\n         * @private\n         */\n        _this.startX_;\n        /**\n         * @type {number|undefined}\n         * @private\n         */\n        _this.startY_;\n        /**\n         * The calculated thumb size (border box plus margins).  Set when initSlider_\n         * is called.\n         * @type {import(\"../size.js\").Size}\n         * @private\n         */\n        _this.thumbSize_ = null;\n        /**\n         * Whether the slider is initialized.\n         * @type {boolean}\n         * @private\n         */\n        _this.sliderInitialized_ = false;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 200;\n        var className = options.className !== undefined ? options.className : 'ol-zoomslider';\n        var thumbElement = document.createElement('button');\n        thumbElement.setAttribute('type'
 , 'button');\n        thumbElement.className = className + '-thumb ' + CLASS_UNSELECTABLE;\n        var containerElement = _this.element;\n        containerElement.className =\n            className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n        containerElement.appendChild(thumbElement);\n        containerElement.addEventListener(PointerEventType.POINTERDOWN, _this.handleDraggerStart_.bind(_this), false);\n        containerElement.addEventListener(PointerEventType.POINTERMOVE, _this.handleDraggerDrag_.bind(_this), false);\n        containerElement.addEventListener(PointerEventType.POINTERUP, _this.handleDraggerEnd_.bind(_this), false);\n        containerElement.addEventListener(EventType.CLICK, _this.handleContainerClick_.bind(_this), false);\n        thumbElement.addEventListener(EventType.CLICK, stopPropagation, false);\n        return _this;\n    }\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up eve
 nt handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    ZoomSlider.prototype.setMap = function (map) {\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            map.render();\n        }\n    };\n    /**\n     * Initializes the slider element. This will determine and set this controls\n     * direction_ and also constrain the dragging of the thumb to always be within\n     * the bounds of the container.\n     *\n     * @return {boolean} Initialization successful\n     * @private\n     */\n    ZoomSlider.prototype.initSlider_ = function () {\n        var container = this.element;\n        var containerWidth = container.offsetWidth;\n        var containerHeight = container.offsetHeight;\n        if (containerWidth === 0 && containerHeight === 0) {\n            return (this.sliderInitialized_ = false);\n        }\n        var thumb = /** @type {HTMLElement} */ 
 (container.firstElementChild);\n        var computedStyle = getComputedStyle(thumb);\n        var thumbWidth = thumb.offsetWidth +\n            parseFloat(computedStyle['marginRight']) +\n            parseFloat(computedStyle['marginLeft']);\n        var thumbHeight = thumb.offsetHeight +\n            parseFloat(computedStyle['marginTop']) +\n            parseFloat(computedStyle['marginBottom']);\n        this.thumbSize_ = [thumbWidth, thumbHeight];\n        if (containerWidth > containerHeight) {\n            this.direction_ = Direction.HORIZONTAL;\n            this.widthLimit_ = containerWidth - thumbWidth;\n        }\n        else {\n            this.direction_ = Direction.VERTICAL;\n            this.heightLimit_ = containerHeight - thumbHeight;\n        }\n        return (this.sliderInitialized_ = true);\n    };\n    /**\n     * @param {PointerEvent} event The browser event to handle.\n     * @private\n     */\n    ZoomSlider.prototype.handleContainerClick_ = function (event) {\n
         var view = this.getMap().getView();\n        var relativePosition = this.getRelativePosition_(event.offsetX - this.thumbSize_[0] / 2, event.offsetY - this.thumbSize_[1] / 2);\n        var resolution = this.getResolutionForPosition_(relativePosition);\n        var zoom = view.getConstrainedZoom(view.getZoomForResolution(resolution));\n        view.animateInternal({\n            zoom: zoom,\n            duration: this.duration_,\n            easing: easeOut,\n        });\n    };\n    /**\n     * Handle dragger start events.\n     * @param {PointerEvent} event The drag event.\n     * @private\n     */\n    ZoomSlider.prototype.handleDraggerStart_ = function (event) {\n        if (!this.dragging_ && event.target === this.element.firstElementChild) {\n            var element = /** @type {HTMLElement} */ (this.element\n                .firstElementChild);\n            this.getMap().getView().beginInteraction();\n            this.startX_ = event.clientX - parseFloat(element.style.l
 eft);\n            this.startY_ = event.clientY - parseFloat(element.style.top);\n            this.dragging_ = true;\n            if (this.dragListenerKeys_.length === 0) {\n                var drag = this.handleDraggerDrag_;\n                var end = this.handleDraggerEnd_;\n                this.dragListenerKeys_.push(listen(document, PointerEventType.POINTERMOVE, drag, this), listen(document, PointerEventType.POINTERUP, end, this));\n            }\n        }\n    };\n    /**\n     * Handle dragger drag events.\n     *\n     * @param {PointerEvent} event The drag event.\n     * @private\n     */\n    ZoomSlider.prototype.handleDraggerDrag_ = function (event) {\n        if (this.dragging_) {\n            var deltaX = event.clientX - this.startX_;\n            var deltaY = event.clientY - this.startY_;\n            var relativePosition = this.getRelativePosition_(deltaX, deltaY);\n            this.currentResolution_ = this.getResolutionForPosition_(relativePosition);\n            th
 is.getMap().getView().setResolution(this.currentResolution_);\n        }\n    };\n    /**\n     * Handle dragger end events.\n     * @param {PointerEvent} event The drag event.\n     * @private\n     */\n    ZoomSlider.prototype.handleDraggerEnd_ = function (event) {\n        if (this.dragging_) {\n            var view = this.getMap().getView();\n            view.endInteraction();\n            this.dragging_ = false;\n            this.startX_ = undefined;\n            this.startY_ = undefined;\n            this.dragListenerKeys_.forEach(unlistenByKey);\n            this.dragListenerKeys_.length = 0;\n        }\n    };\n    /**\n     * Positions the thumb inside its container according to the given resolution.\n     *\n     * @param {number} res The res.\n     * @private\n     */\n    ZoomSlider.prototype.setThumbPosition_ = function (res) {\n        var position = this.getPositionForResolution_(res);\n        var thumb = /** @type {HTMLElement} */ (this.element.firstElementChild);\n
         if (this.direction_ == Direction.HORIZONTAL) {\n            thumb.style.left = this.widthLimit_ * position + 'px';\n        }\n        else {\n            thumb.style.top = this.heightLimit_ * position + 'px';\n        }\n    };\n    /**\n     * Calculates the relative position of the thumb given x and y offsets.  The\n     * relative position scales from 0 to 1.  The x and y offsets are assumed to be\n     * in pixel units within the dragger limits.\n     *\n     * @param {number} x Pixel position relative to the left of the slider.\n     * @param {number} y Pixel position relative to the top of the slider.\n     * @return {number} The relative position of the thumb.\n     * @private\n     */\n    ZoomSlider.prototype.getRelativePosition_ = function (x, y) {\n        var amount;\n        if (this.direction_ === Direction.HORIZONTAL) {\n            amount = x / this.widthLimit_;\n        }\n        else {\n            amount = y / this.heightLimit_;\n        }\n        retur
 n clamp(amount, 0, 1);\n    };\n    /**\n     * Calculates the corresponding resolution of the thumb given its relative\n     * position (where 0 is the minimum and 1 is the maximum).\n     *\n     * @param {number} position The relative position of the thumb.\n     * @return {number} The corresponding resolution.\n     * @private\n     */\n    ZoomSlider.prototype.getResolutionForPosition_ = function (position) {\n        var fn = this.getMap().getView().getResolutionForValueFunction();\n        return fn(1 - position);\n    };\n    /**\n     * Determines the relative position of the slider for the given resolution.  A\n     * relative position of 0 corresponds to the minimum view resolution.  A\n     * relative position of 1 corresponds to the maximum view resolution.\n     *\n     * @param {number} res The resolution.\n     * @return {number} The relative position value (between 0 and 1).\n     * @private\n     */\n    ZoomSlider.prototype.getPositionForResolution_ = function (re
 s) {\n        var fn = this.getMap().getView().getValueForResolutionFunction();\n        return clamp(1 - fn(res), 0, 1);\n    };\n    /**\n     * Update the zoomslider element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    ZoomSlider.prototype.render = function (mapEvent) {\n        if (!mapEvent.frameState) {\n            return;\n        }\n        if (!this.sliderInitialized_ && !this.initSlider_()) {\n            return;\n        }\n        var res = mapEvent.frameState.viewState.resolution;\n        this.currentResolution_ = res;\n        this.setThumbPosition_(res);\n    };\n    return ZoomSlider;\n}(Control));\nexport default ZoomSlider;\n//# sourceMappingURL=ZoomSlider.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) |
 |\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/ZoomToExtent\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { fromExtent as polygonFromExtent } from '../geom/Polygon.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoom-extent'] Class name.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string|HTMLElement} [label='E'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element)
  can be used.\n * @property {string} [tipLabel='Fit to extent'] Text label to use for the button tip.\n * @property {import(\"../extent.js\").Extent} [extent] The extent to zoom to. If undefined the validity\n * extent of the view projection is used.\n */\n/**\n * @classdesc\n * A button control which, when pressed, changes the map view to a specific\n * extent. To style this control use the css selector `.ol-zoom-extent`.\n *\n * @api\n */\nvar ZoomToExtent = /** @class */ (function (_super) {\n    __extends(ZoomToExtent, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function ZoomToExtent(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            target: options.target,\n        }) || this;\n        /**\n         * @type {?import(\"../extent.js\").Extent}\n         * @protected\n         */\n        _this.exten
 t = options.extent ? options.extent : null;\n        var className = options.className !== undefined ? options.className : 'ol-zoom-extent';\n        var label = options.label !== undefined ? options.label : 'E';\n        var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent';\n        var button = document.createElement('button');\n        button.setAttribute('type', 'button');\n        button.title = tipLabel;\n        button.appendChild(typeof label === 'string' ? document.createTextNode(label) : label);\n        button.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(button);\n        return _this;\n    }\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    ZoomToExtent.prototype.handleClick_ = f
 unction (event) {\n        event.preventDefault();\n        this.handleZoomToExtent();\n    };\n    /**\n     * @protected\n     */\n    ZoomToExtent.prototype.handleZoomToExtent = function () {\n        var map = this.getMap();\n        var view = map.getView();\n        var extent = !this.extent\n            ? view.getProjection().getExtent()\n            : this.extent;\n        view.fitInternal(polygonFromExtent(extent));\n    };\n    return ZoomToExtent;\n}(Control));\nexport default ZoomToExtent;\n//# sourceMappingURL=ZoomToExtent.js.map","import $ol$Collection from './ol/Collection';\nimport $ol$Feature from './ol/Feature';\nimport $ol$Geolocation from './ol/Geolocation';\nimport $ol$Kinetic from './ol/Kinetic';\nimport $ol$Map from './ol/Map';\nimport $ol$Object from './ol/Object';\nimport $ol$Observable from './ol/Observable';\nimport {unByKey as _ol_Observable$unByKey} from './ol/Observable';\nimport $ol$Overlay from './ol/Overlay';\nimport $ol$PluggableMap from './ol/Plugg
 ableMap';\nimport $ol$View from './ol/View';\nimport {stableSort as _ol_array$stableSort} from './ol/array';\nimport {asString as _ol_color$asString} from './ol/color';\nimport {asArray as _ol_color$asArray} from './ol/color';\nimport {asColorLike as _ol_colorlike$asColorLike} from './ol/colorlike';\nimport {defaults as _ol_control$defaults} from './ol/control';\nimport {add as _ol_coordinate$add} from './ol/coordinate';\nimport {createStringXY as _ol_coordinate$createStringXY} from './ol/coordinate';\nimport {format as _ol_coordinate$format} from './ol/coordinate';\nimport {rotate as _ol_coordinate$rotate} from './ol/coordinate';\nimport {toStringHDMS as _ol_coordinate$toStringHDMS} from './ol/coordinate';\nimport {toStringXY as _ol_coordinate$toStringXY} from './ol/coordinate';\nimport {easeIn as _ol_easing$easeIn} from './ol/easing';\nimport {easeOut as _ol_easing$easeOut} from './ol/easing';\nimport {inAndOut as _ol_easing$inAndOut} from './ol/easing';\nimport {linear as _ol_eas
 ing$linear} from './ol/easing';\nimport {upAndDown as _ol_easing$upAndDown} from './ol/easing';\nimport {boundingExtent as _ol_extent$boundingExtent} from './ol/extent';\nimport {buffer as _ol_extent$buffer} from './ol/extent';\nimport {containsCoordinate as _ol_extent$containsCoordinate} from './ol/extent';\nimport {containsExtent as _ol_extent$containsExtent} from './ol/extent';\nimport {containsXY as _ol_extent$containsXY} from './ol/extent';\nimport {createEmpty as _ol_extent$createEmpty} from './ol/extent';\nimport {equals as _ol_extent$equals} from './ol/extent';\nimport {extend as _ol_extent$extend} from './ol/extent';\nimport {getArea as _ol_extent$getArea} from './ol/extent';\nimport {getBottomLeft as _ol_extent$getBottomLeft} from './ol/extent';\nimport {getBottomRight as _ol_extent$getBottomRight} from './ol/extent';\nimport {getCenter as _ol_extent$getCenter} from './ol/extent';\nimport {getHeight as _ol_extent$getHeight} from './ol/extent';\nimport {getIntersection as _
 ol_extent$getIntersection} from './ol/extent';\nimport {getSize as _ol_extent$getSize} from './ol/extent';\nimport {getTopLeft as _ol_extent$getTopLeft} from './ol/extent';\nimport {getTopRight as _ol_extent$getTopRight} from './ol/extent';\nimport {getWidth as _ol_extent$getWidth} from './ol/extent';\nimport {intersects as _ol_extent$intersects} from './ol/extent';\nimport {isEmpty as _ol_extent$isEmpty} from './ol/extent';\nimport {applyTransform as _ol_extent$applyTransform} from './ol/extent';\nimport {xhr as _ol_featureloader$xhr} from './ol/featureloader';\nimport {setWithCredentials as _ol_featureloader$setWithCredentials} from './ol/featureloader';\nimport {DEVICE_PIXEL_RATIO as _ol_has$DEVICE_PIXEL_RATIO} from './ol/has';\nimport {defaults as _ol_interaction$defaults} from './ol/interaction';\nimport {all as _ol_loadingstrategy$all} from './ol/loadingstrategy';\nimport {bbox as _ol_loadingstrategy$bbox} from './ol/loadingstrategy';\nimport {tile as _ol_loadingstrategy$tile}
  from './ol/loadingstrategy';\nimport {addProjection as _ol_proj$addProjection} from './ol/proj';\nimport {get as _ol_proj$get} from './ol/proj';\nimport {getPointResolution as _ol_proj$getPointResolution} from './ol/proj';\nimport {addEquivalentProjections as _ol_proj$addEquivalentProjections} from './ol/proj';\nimport {addCoordinateTransforms as _ol_proj$addCoordinateTransforms} from './ol/proj';\nimport {fromLonLat as _ol_proj$fromLonLat} from './ol/proj';\nimport {toLonLat as _ol_proj$toLonLat} from './ol/proj';\nimport {equivalent as _ol_proj$equivalent} from './ol/proj';\nimport {getTransform as _ol_proj$getTransform} from './ol/proj';\nimport {transform as _ol_proj$transform} from './ol/proj';\nimport {transformExtent as _ol_proj$transformExtent} from './ol/proj';\nimport {toContext as _ol_render$toContext} from './ol/render';\nimport {getVectorContext as _ol_render$getVectorContext} from './ol/render';\nimport {getRenderPixel as _ol_render$getRenderPixel} from './ol/render';
 \nimport {toSize as _ol_size$toSize} from './ol/size';\nimport {getDistance as _ol_sphere$getDistance} from './ol/sphere';\nimport {getLength as _ol_sphere$getLength} from './ol/sphere';\nimport {getArea as _ol_sphere$getArea} from './ol/sphere';\nimport {createXYZ as _ol_tilegrid$createXYZ} from './ol/tilegrid';\nimport {composeCssTransform as _ol_transform$composeCssTransform} from './ol/transform';\nimport {getUid as _ol_util$getUid} from './ol/util';\nimport {ARRAY_BUFFER as _ol_webgl$ARRAY_BUFFER} from './ol/webgl';\nimport {ELEMENT_ARRAY_BUFFER as _ol_webgl$ELEMENT_ARRAY_BUFFER} from './ol/webgl';\nimport {STREAM_DRAW as _ol_webgl$STREAM_DRAW} from './ol/webgl';\nimport {STATIC_DRAW as _ol_webgl$STATIC_DRAW} from './ol/webgl';\nimport {DYNAMIC_DRAW as _ol_webgl$DYNAMIC_DRAW} from './ol/webgl';\nimport {getAllTextContent as _ol_xml$getAllTextContent} from './ol/xml';\nimport {parse as _ol_xml$parse} from './ol/xml';\nimport {registerXMLSerializer as _ol_xml$registerXMLSerialize
 r} from './ol/xml';\nimport {registerDocument as _ol_xml$registerDocument} from './ol/xml';\nimport $ol$webgl$Buffer from './ol/webgl/Buffer';\nimport $ol$webgl$Helper from './ol/webgl/Helper';\nimport {computeAttributesStride as _ol_webgl_Helper$computeAttributesStride} from './ol/webgl/Helper';\nimport $ol$webgl$PostProcessingPass from './ol/webgl/PostProcessingPass';\nimport $ol$webgl$RenderTarget from './ol/webgl/RenderTarget';\nimport $ol$tilegrid$TileGrid from './ol/tilegrid/TileGrid';\nimport $ol$tilegrid$WMTS from './ol/tilegrid/WMTS';\nimport {createFromCapabilitiesMatrixSet as _ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet} from './ol/tilegrid/WMTS';\nimport $ol$style$Circle from './ol/style/Circle';\nimport $ol$style$Fill from './ol/style/Fill';\nimport $ol$style$Icon from './ol/style/Icon';\nimport {shared as _ol_style_IconImageCache$shared} from './ol/style/IconImageCache';\nimport $ol$style$Image from './ol/style/Image';\nimport $ol$style$RegularShape from './ol/sty
 le/RegularShape';\nimport $ol$style$Stroke from './ol/style/Stroke';\nimport $ol$style$Style from './ol/style/Style';\nimport $ol$style$Text from './ol/style/Text';\nimport $ol$source$BingMaps from './ol/source/BingMaps';\nimport $ol$source$CartoDB from './ol/source/CartoDB';\nimport $ol$source$Cluster from './ol/source/Cluster';\nimport $ol$source$IIIF from './ol/source/IIIF';\nimport $ol$source$Image from './ol/source/Image';\nimport $ol$source$ImageArcGISRest from './ol/source/ImageArcGISRest';\nimport $ol$source$ImageCanvas from './ol/source/ImageCanvas';\nimport $ol$source$ImageMapGuide from './ol/source/ImageMapGuide';\nimport $ol$source$ImageStatic from './ol/source/ImageStatic';\nimport $ol$source$ImageWMS from './ol/source/ImageWMS';\nimport {ATTRIBUTION as _ol_source_OSM$ATTRIBUTION} from './ol/source/OSM';\nimport $ol$source$OSM from './ol/source/OSM';\nimport $ol$source$Raster from './ol/source/Raster';\nimport $ol$source$Source from './ol/source/Source';\nimport $ol$sou
 rce$Stamen from './ol/source/Stamen';\nimport $ol$source$Tile from './ol/source/Tile';\nimport $ol$source$TileArcGISRest from './ol/source/TileArcGISRest';\nimport $ol$source$TileDebug from './ol/source/TileDebug';\nimport $ol$source$TileImage from './ol/source/TileImage';\nimport $ol$source$TileJSON from './ol/source/TileJSON';\nimport $ol$source$TileWMS from './ol/source/TileWMS';\nimport $ol$source$UTFGrid from './ol/source/UTFGrid';\nimport $ol$source$Vector from './ol/source/Vector';\nimport $ol$source$VectorTile from './ol/source/VectorTile';\nimport $ol$source$WMTS from './ol/source/WMTS';\nimport {optionsFromCapabilities as _ol_source_WMTS$optionsFromCapabilities} from './ol/source/WMTS';\nimport $ol$source$XYZ from './ol/source/XYZ';\nimport $ol$source$Zoomify from './ol/source/Zoomify';\nimport $ol$renderer$Composite from './ol/renderer/Composite';\nimport $ol$renderer$webgl$PointsLayer from './ol/renderer/webgl/PointsLayer';\nimport $ol$renderer$canvas$ImageLayer from './
 ol/renderer/canvas/ImageLayer';\nimport $ol$renderer$canvas$TileLayer from './ol/renderer/canvas/TileLayer';\nimport $ol$renderer$canvas$VectorImageLayer from './ol/renderer/canvas/VectorImageLayer';\nimport $ol$renderer$canvas$VectorLayer from './ol/renderer/canvas/VectorLayer';\nimport $ol$renderer$canvas$VectorTileLayer from './ol/renderer/canvas/VectorTileLayer';\nimport $ol$render$VectorContext from './ol/render/VectorContext';\nimport {labelCache as _ol_render_canvas$labelCache} from './ol/render/canvas';\nimport $ol$proj$Projection from './ol/proj/Projection';\nimport {METERS_PER_UNIT as _ol_proj_Units$METERS_PER_UNIT} from './ol/proj/Units';\nimport {register as _ol_proj_proj4$register} from './ol/proj/proj4';\nimport $ol$layer$Base from './ol/layer/Base';\nimport $ol$layer$BaseImage from './ol/layer/BaseImage';\nimport $ol$layer$BaseTile from './ol/layer/BaseTile';\nimport $ol$layer$BaseVector from './ol/layer/BaseVector';\nimport $ol$layer$Graticule from './ol/layer/Gratic
 ule';\nimport $ol$layer$Group from './ol/layer/Group';\nimport $ol$layer$Heatmap from './ol/layer/Heatmap';\nimport $ol$layer$Image from './ol/layer/Image';\nimport $ol$layer$Layer from './ol/layer/Layer';\nimport $ol$layer$MapboxVector from './ol/layer/MapboxVector';\nimport $ol$layer$Tile from './ol/layer/Tile';\nimport $ol$layer$Vector from './ol/layer/Vector';\nimport $ol$layer$VectorImage from './ol/layer/VectorImage';\nimport $ol$layer$VectorTile from './ol/layer/VectorTile';\nimport $ol$interaction$DoubleClickZoom from './ol/interaction/DoubleClickZoom';\nimport $ol$interaction$DragAndDrop from './ol/interaction/DragAndDrop';\nimport $ol$interaction$DragBox from './ol/interaction/DragBox';\nimport $ol$interaction$DragPan from './ol/interaction/DragPan';\nimport $ol$interaction$DragRotate from './ol/interaction/DragRotate';\nimport $ol$interaction$DragRotateAndZoom from './ol/interaction/DragRotateAndZoom';\nimport $ol$interaction$DragZoom from './ol/interaction/DragZoom';\nim
 port $ol$interaction$Draw from './ol/interaction/Draw';\nimport {createRegularPolygon as _ol_interaction_Draw$createRegularPolygon} from './ol/interaction/Draw';\nimport {createBox as _ol_interaction_Draw$createBox} from './ol/interaction/Draw';\nimport $ol$interaction$Extent from './ol/interaction/Extent';\nimport $ol$interaction$Interaction from './ol/interaction/Interaction';\nimport $ol$interaction$KeyboardPan from './ol/interaction/KeyboardPan';\nimport $ol$interaction$KeyboardZoom from './ol/interaction/KeyboardZoom';\nimport $ol$interaction$Modify from './ol/interaction/Modify';\nimport $ol$interaction$MouseWheelZoom from './ol/interaction/MouseWheelZoom';\nimport $ol$interaction$PinchRotate from './ol/interaction/PinchRotate';\nimport $ol$interaction$PinchZoom from './ol/interaction/PinchZoom';\nimport $ol$interaction$Pointer from './ol/interaction/Pointer';\nimport $ol$interaction$Select from './ol/interaction/Select';\nimport $ol$interaction$Snap from './ol/interaction/Sna
 p';\nimport $ol$interaction$Translate from './ol/interaction/Translate';\nimport $ol$geom$Circle from './ol/geom/Circle';\nimport $ol$geom$Geometry from './ol/geom/Geometry';\nimport $ol$geom$GeometryCollection from './ol/geom/GeometryCollection';\nimport $ol$geom$LineString from './ol/geom/LineString';\nimport $ol$geom$LinearRing from './ol/geom/LinearRing';\nimport $ol$geom$MultiLineString from './ol/geom/MultiLineString';\nimport $ol$geom$MultiPoint from './ol/geom/MultiPoint';\nimport $ol$geom$MultiPolygon from './ol/geom/MultiPolygon';\nimport $ol$geom$Point from './ol/geom/Point';\nimport $ol$geom$Polygon from './ol/geom/Polygon';\nimport {circular as _ol_geom_Polygon$circular} from './ol/geom/Polygon';\nimport {fromExtent as _ol_geom_Polygon$fromExtent} from './ol/geom/Polygon';\nimport {fromCircle as _ol_geom_Polygon$fromCircle} from './ol/geom/Polygon';\nimport $ol$geom$SimpleGeometry from './ol/geom/SimpleGeometry';\nimport $ol$format$EsriJSON from './ol/format/EsriJSON';\
 nimport $ol$format$Feature from './ol/format/Feature';\nimport $ol$format$GML from './ol/format/GML';\nimport $ol$format$GML2 from './ol/format/GML2';\nimport $ol$format$GML3 from './ol/format/GML3';\nimport $ol$format$GML32 from './ol/format/GML32';\nimport $ol$format$GPX from './ol/format/GPX';\nimport $ol$format$GeoJSON from './ol/format/GeoJSON';\nimport $ol$format$IGC from './ol/format/IGC';\nimport $ol$format$IIIFInfo from './ol/format/IIIFInfo';\nimport $ol$format$KML from './ol/format/KML';\nimport $ol$format$MVT from './ol/format/MVT';\nimport $ol$format$OSMXML from './ol/format/OSMXML';\nimport $ol$format$Polyline from './ol/format/Polyline';\nimport {encodeDeltas as _ol_format_Polyline$encodeDeltas} from './ol/format/Polyline';\nimport {decodeDeltas as _ol_format_Polyline$decodeDeltas} from './ol/format/Polyline';\nimport {encodeFloats as _ol_format_Polyline$encodeFloats} from './ol/format/Polyline';\nimport {decodeFloats as _ol_format_Polyline$decodeFloats} from './ol/fo
 rmat/Polyline';\nimport $ol$format$TopoJSON from './ol/format/TopoJSON';\nimport $ol$format$WFS from './ol/format/WFS';\nimport {writeFilter as _ol_format_WFS$writeFilter} from './ol/format/WFS';\nimport $ol$format$WKT from './ol/format/WKT';\nimport $ol$format$WMSCapabilities from './ol/format/WMSCapabilities';\nimport $ol$format$WMSGetFeatureInfo from './ol/format/WMSGetFeatureInfo';\nimport $ol$format$WMTSCapabilities from './ol/format/WMTSCapabilities';\nimport {and as _ol_format_filter$and} from './ol/format/filter';\nimport {or as _ol_format_filter$or} from './ol/format/filter';\nimport {not as _ol_format_filter$not} from './ol/format/filter';\nimport {bbox as _ol_format_filter$bbox} from './ol/format/filter';\nimport {contains as _ol_format_filter$contains} from './ol/format/filter';\nimport {intersects as _ol_format_filter$intersects} from './ol/format/filter';\nimport {within as _ol_format_filter$within} from './ol/format/filter';\nimport {equalTo as _ol_format_filter$equal
 To} from './ol/format/filter';\nimport {notEqualTo as _ol_format_filter$notEqualTo} from './ol/format/filter';\nimport {lessThan as _ol_format_filter$lessThan} from './ol/format/filter';\nimport {lessThanOrEqualTo as _ol_format_filter$lessThanOrEqualTo} from './ol/format/filter';\nimport {greaterThan as _ol_format_filter$greaterThan} from './ol/format/filter';\nimport {greaterThanOrEqualTo as _ol_format_filter$greaterThanOrEqualTo} from './ol/format/filter';\nimport {isNull as _ol_format_filter$isNull} from './ol/format/filter';\nimport {between as _ol_format_filter$between} from './ol/format/filter';\nimport {like as _ol_format_filter$like} from './ol/format/filter';\nimport {during as _ol_format_filter$during} from './ol/format/filter';\nimport $ol$format$filter$Bbox from './ol/format/filter/Bbox';\nimport $ol$format$filter$Contains from './ol/format/filter/Contains';\nimport $ol$format$filter$During from './ol/format/filter/During';\nimport $ol$format$filter$EqualTo from './ol/fo
 rmat/filter/EqualTo';\nimport $ol$format$filter$GreaterThan from './ol/format/filter/GreaterThan';\nimport $ol$format$filter$GreaterThanOrEqualTo from './ol/format/filter/GreaterThanOrEqualTo';\nimport $ol$format$filter$Intersects from './ol/format/filter/Intersects';\nimport $ol$format$filter$IsBetween from './ol/format/filter/IsBetween';\nimport $ol$format$filter$IsLike from './ol/format/filter/IsLike';\nimport $ol$format$filter$IsNull from './ol/format/filter/IsNull';\nimport $ol$format$filter$LessThan from './ol/format/filter/LessThan';\nimport $ol$format$filter$LessThanOrEqualTo from './ol/format/filter/LessThanOrEqualTo';\nimport $ol$format$filter$Not from './ol/format/filter/Not';\nimport $ol$format$filter$NotEqualTo from './ol/format/filter/NotEqualTo';\nimport $ol$format$filter$Or from './ol/format/filter/Or';\nimport $ol$format$filter$Within from './ol/format/filter/Within';\nimport {altKeyOnly as _ol_events_condition$altKeyOnly} from './ol/events/condition';\nimport {altS
 hiftKeysOnly as _ol_events_condition$altShiftKeysOnly} from './ol/events/condition';\nimport {focus as _ol_events_condition$focus} from './ol/events/condition';\nimport {always as _ol_events_condition$always} from './ol/events/condition';\nimport {click as _ol_events_condition$click} from './ol/events/condition';\nimport {never as _ol_events_condition$never} from './ol/events/condition';\nimport {pointerMove as _ol_events_condition$pointerMove} from './ol/events/condition';\nimport {singleClick as _ol_events_condition$singleClick} from './ol/events/condition';\nimport {doubleClick as _ol_events_condition$doubleClick} from './ol/events/condition';\nimport {noModifierKeys as _ol_events_condition$noModifierKeys} from './ol/events/condition';\nimport {platformModifierKeyOnly as _ol_events_condition$platformModifierKeyOnly} from './ol/events/condition';\nimport {shiftKeyOnly as _ol_events_condition$shiftKeyOnly} from './ol/events/condition';\nimport {targetNotEditable as _ol_events_condi
 tion$targetNotEditable} from './ol/events/condition';\nimport {mouseOnly as _ol_events_condition$mouseOnly} from './ol/events/condition';\nimport {touchOnly as _ol_events_condition$touchOnly} from './ol/events/condition';\nimport {penOnly as _ol_events_condition$penOnly} from './ol/events/condition';\nimport {primaryAction as _ol_events_condition$primaryAction} from './ol/events/condition';\nimport $ol$control$Attribution from './ol/control/Attribution';\nimport $ol$control$Control from './ol/control/Control';\nimport $ol$control$FullScreen from './ol/control/FullScreen';\nimport $ol$control$MousePosition from './ol/control/MousePosition';\nimport $ol$control$OverviewMap from './ol/control/OverviewMap';\nimport $ol$control$Rotate from './ol/control/Rotate';\nimport $ol$control$ScaleLine from './ol/control/ScaleLine';\nimport $ol$control$Zoom from './ol/control/Zoom';\nimport $ol$control$ZoomSlider from './ol/control/ZoomSlider';\nimport $ol$control$ZoomToExtent from './ol/control/Zo
 omToExtent';\n\nvar ol = {};\n\nol.array = {};\nol.color = {};\nol.colorlike = {};\nol.control = {};\nol.coordinate = {};\nol.easing = {};\nol.events = {};\nol.events.condition = {};\nol.extent = {};\nol.featureloader = {};\nol.format = {};\nol.format.filter = {};\nol.geom = {};\nol.has = {};\nol.interaction = {};\nol.layer = {};\nol.loadingstrategy = {};\nol.proj = {};\nol.proj.Units = {};\nol.proj.proj4 = {};\nol.render = {};\nol.render.canvas = {};\nol.renderer = {};\nol.renderer.canvas = {};\nol.renderer.webgl = {};\nol.size = {};\nol.source = {};\nol.sphere = {};\nol.style = {};\nol.style.IconImageCache = {};\nol.tilegrid = {};\nol.transform = {};\nol.util = {};\nol.webgl = {};\nol.xml = {};\nol.Collection = $ol$Collection;\nol.Feature = $ol$Feature;\nol.Geolocation = $ol$Geolocation;\nol.Kinetic = $ol$Kinetic;\nol.Map = $ol$Map;\nol.Object = $ol$Object;\nol.Observable = $ol$Observable;\nol.Observable.unByKey = _ol_Observable$unByKey;\nol.Overlay = $ol$Overlay;\nol.PluggableMap
  = $ol$PluggableMap;\nol.View = $ol$View;\nol.array.stableSort = _ol_array$stableSort;\nol.color.asArray = _ol_color$asArray;\nol.color.asString = _ol_color$asString;\nol.colorlike.asColorLike = _ol_colorlike$asColorLike;\nol.control.Attribution = $ol$control$Attribution;\nol.control.Control = $ol$control$Control;\nol.control.FullScreen = $ol$control$FullScreen;\nol.control.MousePosition = $ol$control$MousePosition;\nol.control.OverviewMap = $ol$control$OverviewMap;\nol.control.Rotate = $ol$control$Rotate;\nol.control.ScaleLine = $ol$control$ScaleLine;\nol.control.Zoom = $ol$control$Zoom;\nol.control.ZoomSlider = $ol$control$ZoomSlider;\nol.control.ZoomToExtent = $ol$control$ZoomToExtent;\nol.control.defaults = _ol_control$defaults;\nol.coordinate.add = _ol_coordinate$add;\nol.coordinate.createStringXY = _ol_coordinate$createStringXY;\nol.coordinate.format = _ol_coordinate$format;\nol.coordinate.rotate = _ol_coordinate$rotate;\nol.coordinate.toStringHDMS = _ol_coordinate$toStringHDM
 S;\nol.coordinate.toStringXY = _ol_coordinate$toStringXY;\nol.easing.easeIn = _ol_easing$easeIn;\nol.easing.easeOut = _ol_easing$easeOut;\nol.easing.inAndOut = _ol_easing$inAndOut;\nol.easing.linear = _ol_easing$linear;\nol.easing.upAndDown = _ol_easing$upAndDown;\nol.events.condition.altKeyOnly = _ol_events_condition$altKeyOnly;\nol.events.condition.altShiftKeysOnly = _ol_events_condition$altShiftKeysOnly;\nol.events.condition.always = _ol_events_condition$always;\nol.events.condition.click = _ol_events_condition$click;\nol.events.condition.doubleClick = _ol_events_condition$doubleClick;\nol.events.condition.focus = _ol_events_condition$focus;\nol.events.condition.mouseOnly = _ol_events_condition$mouseOnly;\nol.events.condition.never = _ol_events_condition$never;\nol.events.condition.noModifierKeys = _ol_events_condition$noModifierKeys;\nol.events.condition.penOnly = _ol_events_condition$penOnly;\nol.events.condition.platformModifierKeyOnly = _ol_events_condition$platformModifierKe
 yOnly;\nol.events.condition.pointerMove = _ol_events_condition$pointerMove;\nol.events.condition.primaryAction = _ol_events_condition$primaryAction;\nol.events.condition.shiftKeyOnly = _ol_events_condition$shiftKeyOnly;\nol.events.condition.singleClick = _ol_events_condition$singleClick;\nol.events.condition.targetNotEditable = _ol_events_condition$targetNotEditable;\nol.events.condition.touchOnly = _ol_events_condition$touchOnly;\nol.extent.applyTransform = _ol_extent$applyTransform;\nol.extent.boundingExtent = _ol_extent$boundingExtent;\nol.extent.buffer = _ol_extent$buffer;\nol.extent.containsCoordinate = _ol_extent$containsCoordinate;\nol.extent.containsExtent = _ol_extent$containsExtent;\nol.extent.containsXY = _ol_extent$containsXY;\nol.extent.createEmpty = _ol_extent$createEmpty;\nol.extent.equals = _ol_extent$equals;\nol.extent.extend = _ol_extent$extend;\nol.extent.getArea = _ol_extent$getArea;\nol.extent.getBottomLeft = _ol_extent$getBottomLeft;\nol.extent.getBottomRight =
  _ol_extent$getBottomRight;\nol.extent.getCenter = _ol_extent$getCenter;\nol.extent.getHeight = _ol_extent$getHeight;\nol.extent.getIntersection = _ol_extent$getIntersection;\nol.extent.getSize = _ol_extent$getSize;\nol.extent.getTopLeft = _ol_extent$getTopLeft;\nol.extent.getTopRight = _ol_extent$getTopRight;\nol.extent.getWidth = _ol_extent$getWidth;\nol.extent.intersects = _ol_extent$intersects;\nol.extent.isEmpty = _ol_extent$isEmpty;\nol.featureloader.setWithCredentials = _ol_featureloader$setWithCredentials;\nol.featureloader.xhr = _ol_featureloader$xhr;\nol.format.EsriJSON = $ol$format$EsriJSON;\nol.format.Feature = $ol$format$Feature;\nol.format.GML = $ol$format$GML;\nol.format.GML2 = $ol$format$GML2;\nol.format.GML3 = $ol$format$GML3;\nol.format.GML32 = $ol$format$GML32;\nol.format.GPX = $ol$format$GPX;\nol.format.GeoJSON = $ol$format$GeoJSON;\nol.format.IGC = $ol$format$IGC;\nol.format.IIIFInfo = $ol$format$IIIFInfo;\nol.format.KML = $ol$format$KML;\nol.format.MVT = $ol$fo
 rmat$MVT;\nol.format.OSMXML = $ol$format$OSMXML;\nol.format.Polyline = $ol$format$Polyline;\nol.format.Polyline.decodeDeltas = _ol_format_Polyline$decodeDeltas;\nol.format.Polyline.decodeFloats = _ol_format_Polyline$decodeFloats;\nol.format.Polyline.encodeDeltas = _ol_format_Polyline$encodeDeltas;\nol.format.Polyline.encodeFloats = _ol_format_Polyline$encodeFloats;\nol.format.TopoJSON = $ol$format$TopoJSON;\nol.format.WFS = $ol$format$WFS;\nol.format.WFS.writeFilter = _ol_format_WFS$writeFilter;\nol.format.WKT = $ol$format$WKT;\nol.format.WMSCapabilities = $ol$format$WMSCapabilities;\nol.format.WMSGetFeatureInfo = $ol$format$WMSGetFeatureInfo;\nol.format.WMTSCapabilities = $ol$format$WMTSCapabilities;\nol.format.filter.Bbox = $ol$format$filter$Bbox;\nol.format.filter.Contains = $ol$format$filter$Contains;\nol.format.filter.During = $ol$format$filter$During;\nol.format.filter.EqualTo = $ol$format$filter$EqualTo;\nol.format.filter.GreaterThan = $ol$format$filter$GreaterThan;\nol.forma
 t.filter.GreaterThanOrEqualTo = $ol$format$filter$GreaterThanOrEqualTo;\nol.format.filter.Intersects = $ol$format$filter$Intersects;\nol.format.filter.IsBetween = $ol$format$filter$IsBetween;\nol.format.filter.IsLike = $ol$format$filter$IsLike;\nol.format.filter.IsNull = $ol$format$filter$IsNull;\nol.format.filter.LessThan = $ol$format$filter$LessThan;\nol.format.filter.LessThanOrEqualTo = $ol$format$filter$LessThanOrEqualTo;\nol.format.filter.Not = $ol$format$filter$Not;\nol.format.filter.NotEqualTo = $ol$format$filter$NotEqualTo;\nol.format.filter.Or = $ol$format$filter$Or;\nol.format.filter.Within = $ol$format$filter$Within;\nol.format.filter.and = _ol_format_filter$and;\nol.format.filter.bbox = _ol_format_filter$bbox;\nol.format.filter.between = _ol_format_filter$between;\nol.format.filter.contains = _ol_format_filter$contains;\nol.format.filter.during = _ol_format_filter$during;\nol.format.filter.equalTo = _ol_format_filter$equalTo;\nol.format.filter.greaterThan = _ol_format_fi
 lter$greaterThan;\nol.format.filter.greaterThanOrEqualTo = _ol_format_filter$greaterThanOrEqualTo;\nol.format.filter.intersects = _ol_format_filter$intersects;\nol.format.filter.isNull = _ol_format_filter$isNull;\nol.format.filter.lessThan = _ol_format_filter$lessThan;\nol.format.filter.lessThanOrEqualTo = _ol_format_filter$lessThanOrEqualTo;\nol.format.filter.like = _ol_format_filter$like;\nol.format.filter.not = _ol_format_filter$not;\nol.format.filter.notEqualTo = _ol_format_filter$notEqualTo;\nol.format.filter.or = _ol_format_filter$or;\nol.format.filter.within = _ol_format_filter$within;\nol.geom.Circle = $ol$geom$Circle;\nol.geom.Geometry = $ol$geom$Geometry;\nol.geom.GeometryCollection = $ol$geom$GeometryCollection;\nol.geom.LineString = $ol$geom$LineString;\nol.geom.LinearRing = $ol$geom$LinearRing;\nol.geom.MultiLineString = $ol$geom$MultiLineString;\nol.geom.MultiPoint = $ol$geom$MultiPoint;\nol.geom.MultiPolygon = $ol$geom$MultiPolygon;\nol.geom.Point = $ol$geom$Point;\no
 l.geom.Polygon = $ol$geom$Polygon;\nol.geom.Polygon.circular = _ol_geom_Polygon$circular;\nol.geom.Polygon.fromCircle = _ol_geom_Polygon$fromCircle;\nol.geom.Polygon.fromExtent = _ol_geom_Polygon$fromExtent;\nol.geom.SimpleGeometry = $ol$geom$SimpleGeometry;\nol.has.DEVICE_PIXEL_RATIO = _ol_has$DEVICE_PIXEL_RATIO;\nol.interaction.DoubleClickZoom = $ol$interaction$DoubleClickZoom;\nol.interaction.DragAndDrop = $ol$interaction$DragAndDrop;\nol.interaction.DragBox = $ol$interaction$DragBox;\nol.interaction.DragPan = $ol$interaction$DragPan;\nol.interaction.DragRotate = $ol$interaction$DragRotate;\nol.interaction.DragRotateAndZoom = $ol$interaction$DragRotateAndZoom;\nol.interaction.DragZoom = $ol$interaction$DragZoom;\nol.interaction.Draw = $ol$interaction$Draw;\nol.interaction.Draw.createBox = _ol_interaction_Draw$createBox;\nol.interaction.Draw.createRegularPolygon = _ol_interaction_Draw$createRegularPolygon;\nol.interaction.Extent = $ol$interaction$Extent;\nol.interaction.Interactio
 n = $ol$interaction$Interaction;\nol.interaction.KeyboardPan = $ol$interaction$KeyboardPan;\nol.interaction.KeyboardZoom = $ol$interaction$KeyboardZoom;\nol.interaction.Modify = $ol$interaction$Modify;\nol.interaction.MouseWheelZoom = $ol$interaction$MouseWheelZoom;\nol.interaction.PinchRotate = $ol$interaction$PinchRotate;\nol.interaction.PinchZoom = $ol$interaction$PinchZoom;\nol.interaction.Pointer = $ol$interaction$Pointer;\nol.interaction.Select = $ol$interaction$Select;\nol.interaction.Snap = $ol$interaction$Snap;\nol.interaction.Translate = $ol$interaction$Translate;\nol.interaction.defaults = _ol_interaction$defaults;\nol.layer.Base = $ol$layer$Base;\nol.layer.BaseImage = $ol$layer$BaseImage;\nol.layer.BaseTile = $ol$layer$BaseTile;\nol.layer.BaseVector = $ol$layer$BaseVector;\nol.layer.Graticule = $ol$layer$Graticule;\nol.layer.Group = $ol$layer$Group;\nol.layer.Heatmap = $ol$layer$Heatmap;\nol.layer.Image = $ol$layer$Image;\nol.layer.Layer = $ol$layer$Layer;\nol.layer.Mapb
 oxVector = $ol$layer$MapboxVector;\nol.layer.Tile = $ol$layer$Tile;\nol.layer.Vector = $ol$layer$Vector;\nol.layer.VectorImage = $ol$layer$VectorImage;\nol.layer.VectorTile = $ol$layer$VectorTile;\nol.loadingstrategy.all = _ol_loadingstrategy$all;\nol.loadingstrategy.bbox = _ol_loadingstrategy$bbox;\nol.loadingstrategy.tile = _ol_loadingstrategy$tile;\nol.proj.Projection = $ol$proj$Projection;\nol.proj.Units.METERS_PER_UNIT = _ol_proj_Units$METERS_PER_UNIT;\nol.proj.addCoordinateTransforms = _ol_proj$addCoordinateTransforms;\nol.proj.addEquivalentProjections = _ol_proj$addEquivalentProjections;\nol.proj.addProjection = _ol_proj$addProjection;\nol.proj.equivalent = _ol_proj$equivalent;\nol.proj.fromLonLat = _ol_proj$fromLonLat;\nol.proj.get = _ol_proj$get;\nol.proj.getPointResolution = _ol_proj$getPointResolution;\nol.proj.getTransform = _ol_proj$getTransform;\nol.proj.proj4.register = _ol_proj_proj4$register;\nol.proj.toLonLat = _ol_proj$toLonLat;\nol.proj.transform = _ol_proj$trans
 form;\nol.proj.transformExtent = _ol_proj$transformExtent;\nol.render.VectorContext = $ol$render$VectorContext;\nol.render.canvas.labelCache = _ol_render_canvas$labelCache;\nol.render.getRenderPixel = _ol_render$getRenderPixel;\nol.render.getVectorContext = _ol_render$getVectorContext;\nol.render.toContext = _ol_render$toContext;\nol.renderer.Composite = $ol$renderer$Composite;\nol.renderer.canvas.ImageLayer = $ol$renderer$canvas$ImageLayer;\nol.renderer.canvas.TileLayer = $ol$renderer$canvas$TileLayer;\nol.renderer.canvas.VectorImageLayer = $ol$renderer$canvas$VectorImageLayer;\nol.renderer.canvas.VectorLayer = $ol$renderer$canvas$VectorLayer;\nol.renderer.canvas.VectorTileLayer = $ol$renderer$canvas$VectorTileLayer;\nol.renderer.webgl.PointsLayer = $ol$renderer$webgl$PointsLayer;\nol.size.toSize = _ol_size$toSize;\nol.source.BingMaps = $ol$source$BingMaps;\nol.source.CartoDB = $ol$source$CartoDB;\nol.source.Cluster = $ol$source$Cluster;\nol.source.IIIF = $ol$source$IIIF;\nol.sourc
 e.Image = $ol$source$Image;\nol.source.ImageArcGISRest = $ol$source$ImageArcGISRest;\nol.source.ImageCanvas = $ol$source$ImageCanvas;\nol.source.ImageMapGuide = $ol$source$ImageMapGuide;\nol.source.ImageStatic = $ol$source$ImageStatic;\nol.source.ImageWMS = $ol$source$ImageWMS;\nol.source.OSM = $ol$source$OSM;\nol.source.OSM.ATTRIBUTION = _ol_source_OSM$ATTRIBUTION;\nol.source.Raster = $ol$source$Raster;\nol.source.Source = $ol$source$Source;\nol.source.Stamen = $ol$source$Stamen;\nol.source.Tile = $ol$source$Tile;\nol.source.TileArcGISRest = $ol$source$TileArcGISRest;\nol.source.TileDebug = $ol$source$TileDebug;\nol.source.TileImage = $ol$source$TileImage;\nol.source.TileJSON = $ol$source$TileJSON;\nol.source.TileWMS = $ol$source$TileWMS;\nol.source.UTFGrid = $ol$source$UTFGrid;\nol.source.Vector = $ol$source$Vector;\nol.source.VectorTile = $ol$source$VectorTile;\nol.source.WMTS = $ol$source$WMTS;\nol.source.WMTS.optionsFromCapabilities = _ol_source_WMTS$optionsFromCapabilities;\no
 l.source.XYZ = $ol$source$XYZ;\nol.source.Zoomify = $ol$source$Zoomify;\nol.sphere.getArea = _ol_sphere$getArea;\nol.sphere.getDistance = _ol_sphere$getDistance;\nol.sphere.getLength = _ol_sphere$getLength;\nol.style.Circle = $ol$style$Circle;\nol.style.Fill = $ol$style$Fill;\nol.style.Icon = $ol$style$Icon;\nol.style.IconImageCache.shared = _ol_style_IconImageCache$shared;\nol.style.Image = $ol$style$Image;\nol.style.RegularShape = $ol$style$RegularShape;\nol.style.Stroke = $ol$style$Stroke;\nol.style.Style = $ol$style$Style;\nol.style.Text = $ol$style$Text;\nol.tilegrid.TileGrid = $ol$tilegrid$TileGrid;\nol.tilegrid.WMTS = $ol$tilegrid$WMTS;\nol.tilegrid.WMTS.createFromCapabilitiesMatrixSet = _ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet;\nol.tilegrid.createXYZ = _ol_tilegrid$createXYZ;\nol.transform.composeCssTransform = _ol_transform$composeCssTransform;\nol.util.getUid = _ol_util$getUid;\nol.webgl.ARRAY_BUFFER = _ol_webgl$ARRAY_BUFFER;\nol.webgl.Buffer = $ol$webgl$Buffer;\n
 ol.webgl.DYNAMIC_DRAW = _ol_webgl$DYNAMIC_DRAW;\nol.webgl.ELEMENT_ARRAY_BUFFER = _ol_webgl$ELEMENT_ARRAY_BUFFER;\nol.webgl.Helper = $ol$webgl$Helper;\nol.webgl.Helper.computeAttributesStride = _ol_webgl_Helper$computeAttributesStride;\nol.webgl.PostProcessingPass = $ol$webgl$PostProcessingPass;\nol.webgl.RenderTarget = $ol$webgl$RenderTarget;\nol.webgl.STATIC_DRAW = _ol_webgl$STATIC_DRAW;\nol.webgl.STREAM_DRAW = _ol_webgl$STREAM_DRAW;\nol.xml.getAllTextContent = _ol_xml$getAllTextContent;\nol.xml.parse = _ol_xml$parse;\nol.xml.registerDocument = _ol_xml$registerDocument;\nol.xml.registerXMLSerializer = _ol_xml$registerXMLSerializer;\n\nexport default ol;","/**\n * @module ol/proj/proj4\n */\nimport Projection from './Projection.js';\nimport { addCoordinateTransforms, addEquivalentProjections, addProjection, createSafeCoordinateTransform, get, } from '../proj.js';\nimport { assign } from '../obj.js';\nimport { get as getTransform } from './transforms.js';\n/**\n * Make projections de
 fined in proj4 (with `proj4.defs()`) available in\n * OpenLayers.\n *\n * This function should be called whenever changes are made to the proj4\n * registry, e.g. after calling `proj4.defs()`. Existing transforms will not be\n * modified by this function.\n *\n * @param {?} proj4 Proj4.\n * @api\n */\nexport function register(proj4) {\n    var projCodes = Object.keys(proj4.defs);\n    var len = projCodes.length;\n    var i, j;\n    for (i = 0; i < len; ++i) {\n        var code = projCodes[i];\n        if (!get(code)) {\n            var def = proj4.defs(code);\n            addProjection(new Projection({\n                code: code,\n                axisOrientation: def.axis,\n                metersPerUnit: def.to_meter,\n                units: def.units,\n            }));\n        }\n    }\n    for (i = 0; i < len; ++i) {\n        var code1 = projCodes[i];\n        var proj1 = get(code1);\n        for (j = 0; j < len; ++j) {\n            var code2 = projCodes[j];\n            var pro
 j2 = get(code2);\n            if (!getTransform(code1, code2)) {\n                var def1 = proj4.defs(code1);\n                var def2 = proj4.defs(code2);\n                if (def1 === def2) {\n                    addEquivalentProjections([proj1, proj2]);\n                }\n                else {\n                    // Reset axis because OpenLayers always uses x, y axis order\n                    var transform = proj4(assign({}, def1, { axis: undefined }), assign({}, def2, { axis: undefined }));\n                    addCoordinateTransforms(proj1, proj2, createSafeCoordinateTransform(proj1, proj2, transform.forward), createSafeCoordinateTransform(proj2, proj1, transform.inverse));\n                }\n            }\n        }\n    }\n}\n//# sourceMappingURL=proj4.js.map"],"sourceRoot":""}
\ No newline at end of file

Copied: trunk/MgDev/cmake/modules/FindCppHttpLib.cmake (from rev 9698, sandbox/jng/ogc_viewer_representation/cmake/modules/FindCppHttpLib.cmake)
===================================================================
--- trunk/MgDev/cmake/modules/FindCppHttpLib.cmake	                        (rev 0)
+++ trunk/MgDev/cmake/modules/FindCppHttpLib.cmake	2020-08-04 12:00:10 UTC (rev 9699)
@@ -0,0 +1,23 @@
+# - Find CppHttpLib
+# Find the headers for the cpp-httplib library
+# This module defines
+#  CPP_HTTPLIB_INCLUDE_DIR, where to find headers
+
+find_path(CPP_HTTPLIB_INCLUDE_DIR 
+    NAMES "httplib.h"
+    PATHS 
+        /usr/include
+        ${MG_OEM_ROOT_DIR}/cpp-httplib)
+
+include(FindPackageHandleStandardArgs)
+
+# handle the QUIETLY and REQUIRED arguments and set CppHttpLib_FOUND to TRUE if 
+# all listed variables are TRUE
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CppHttpLib DEFAULT_MSG CPP_HTTPLIB_INCLUDE_DIR)
+
+if (CppHttpLib_FOUND)
+   message(STATUS "Found cpp-httplib: ${CPP_HTTPLIB_INCLUDE_DIR}")
+endif (CppHttpLib_FOUND)
+
+mark_as_advanced(CPP_HTTPLIB_INCLUDE_DIR)
+

Modified: trunk/MgDev/cmake/modules/FindMapGuideThirdparty.cmake
===================================================================
--- trunk/MgDev/cmake/modules/FindMapGuideThirdparty.cmake	2020-08-03 12:47:50 UTC (rev 9698)
+++ trunk/MgDev/cmake/modules/FindMapGuideThirdparty.cmake	2020-08-04 12:00:10 UTC (rev 9699)
@@ -187,6 +187,7 @@
 
 find_package(FDO REQUIRED)
 find_package(TCLAP REQUIRED)
+find_package(CppHttpLib REQUIRED)
 find_package(LinuxApt REQUIRED)
 find_package(DbXmlInternal REQUIRED)
 find_package(Ant REQUIRED)
\ No newline at end of file



More information about the mapguide-commits mailing list